All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up
@ 2018-05-16 12:50 Jose Abreu
  2018-05-16 12:50 ` [PATCH v2 net-next 01/12] net: stmmac: Enable OSP for GMAC4 Jose Abreu
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Jose Abreu @ 2018-05-16 12:50 UTC (permalink / raw)
  To: netdev
  Cc: Jose Abreu, David S. Miller, Joao Pinto, Vitor Soares,
	Giuseppe Cavallaro, Alexandre Torgue

This targets to uniformize the handling of the different GMAC versions in
stmmac_main.c file and also tune-up the HW.

Currently there are some if/else conditions in the main source file which
calls different callbacks depending on the ID of GMAC.

With the introducion of a generic HW interface handling which automatically
selects the GMAC callbacks to be used, it is now unpleasant to see if
conditions in the main code because this should be completely agnostic of the
GMAC version.

This series removes most of these conditions. There are some if conditions
that remain untouched but the callbacks handling are now uniformized.

Tested in GMAC5, hope I didn't break any previous versions.

David raised some rightfull constrains about the use of indirect callbacks in
the code. I did iperf tests with and without patches 3-12 and the performance
remained equal. I guess for 1Gb/s and because my setup has a powerfull
processor these patches don't affect the performance.

Perhaps someone using a SoC with a slow CPU could test this?

Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Vitor Soares <soares@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>

Jose Abreu (12):
  net: stmmac: Enable OSP for GMAC4
  net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit
  net: stmmac: Let descriptor code set skbuff address
  net: stmmac: Let descriptor code clear the descriptor
  net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks
  net: stmmac: Remove uneeded checks for GMAC version
  net: stmmac: Move PTP and MMC base address calculation to hwif.c
  net: stmmac: Uniformize the use of dma_init_* callbacks
  net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit
  net: stmmac: Uniformize set_rx_owner()
  net: stmmac: Let descriptor code get skbuff address
  net: stmmac: Remove if condition by taking advantage of hwif return
    code

 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c  |   57 +++---
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c    |   92 ++++++----
 drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c |   35 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c |   34 +++-
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   |    7 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h   |    1 -
 drivers/net/ethernet/stmicro/stmmac/enh_desc.c     |   20 ++-
 drivers/net/ethernet/stmicro/stmmac/hwif.c         |   34 ++++
 drivers/net/ethernet/stmicro/stmmac/hwif.h         |   27 ++-
 drivers/net/ethernet/stmicro/stmmac/norm_desc.c    |   20 ++-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |    1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |  198 +++++++-------------
 12 files changed, 304 insertions(+), 222 deletions(-)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-05-18  9:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 12:50 [PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 01/12] net: stmmac: Enable OSP for GMAC4 Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 02/12] net: stmmac: Do not keep rearming the coalesce timer in stmmac_xmit Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 03/12] net: stmmac: Let descriptor code set skbuff address Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 04/12] net: stmmac: Let descriptor code clear the descriptor Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 05/12] net: stmmac: Uniformize the use of dma_{rx/tx}_mode callbacks Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 06/12] net: stmmac: Remove uneeded checks for GMAC version Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 07/12] net: stmmac: Move PTP and MMC base address calculation to hwif.c Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 08/12] net: stmmac: Uniformize the use of dma_init_* callbacks Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 09/12] net: stmmac: Remove uneeded check for GMAC version in stmmac_xmit Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 10/12] net: stmmac: Uniformize set_rx_owner() Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 11/12] net: stmmac: Let descriptor code get skbuff address Jose Abreu
2018-05-16 12:50 ` [PATCH v2 net-next 12/12] net: stmmac: Remove if condition by taking advantage of hwif return code Jose Abreu
2018-05-16 18:56 ` [PATCH v2 net-next 00/12] net: stmmac: Clean-up and tune-up David Miller
2018-05-16 19:01   ` Florian Fainelli
2018-05-17 13:24     ` Jose Abreu
2018-05-17 18:41       ` David Miller
2018-05-17 18:47         ` David Miller
2018-05-18  9:17           ` Jose Abreu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.