netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v5 0/2] net: stmmac: improve driver statistics
@ 2023-07-17 16:06 Jisheng Zhang
  2023-07-17 16:06 ` [PATCH net-next v5 1/2] net: stmmac: don't clear network statistics in .ndo_open() Jisheng Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Jisheng Zhang @ 2023-07-17 16:06 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, linux-sunxi

improve the stmmac driver statistics:

1. don't clear network driver statistics in .ndo_close() and
.ndo_open() cycle
2. avoid some network driver statistics overflow on 32 bit platforms
3. use per-queue statistics where necessary to remove frequent
cacheline ping pongs.

NOTE: v1 and v2 are back ported from an internal LTS tree, I made
some mistakes when backporting and squashing. Now, net-next + v3
has been well tested with 'ethtool -s' and 'ip -s link show'.

Since v4:
  - rebased on the latest net-next

Since v3:
  - coding style pointed out by Simon, I.E reverse xmas tree for local
    variable declarations and so on.
  - put the counters in queue structs, I.E per-queue rather than per-cpu
  - use _irqsave() variant where necessary.

Since v2:
  - fix ethtool .get_sset_count, .get_strings and per queue stats
    couting.
  - fix .ndo_get_stats64 only counts the last cpu's pcpu stats.
  - fix typo: s/iff/if in commit msg.
  - remove unnecessary if statement brackets since we have removed
    one LoC.

Since v1:
  - rebase on net-next
  - fold two original patches into one patch
  - fix issues found by lkp
  - update commit msg


Jisheng Zhang (2):
  net: stmmac: don't clear network statistics in .ndo_open()
  net: stmmac: use per-queue 64 bit statistics where necessary

 drivers/net/ethernet/stmicro/stmmac/common.h  |  39 ++--
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |  12 +-
 .../ethernet/stmicro/stmmac/dwmac100_dma.c    |   7 +-
 .../ethernet/stmicro/stmmac/dwmac4_descs.c    |  16 +-
 .../net/ethernet/stmicro/stmmac/dwmac4_lib.c  |  15 +-
 .../net/ethernet/stmicro/stmmac/dwmac_lib.c   |  12 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_descs.c  |   6 +-
 .../ethernet/stmicro/stmmac/dwxgmac2_dma.c    |  14 +-
 .../net/ethernet/stmicro/stmmac/enh_desc.c    |  20 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |  12 +-
 .../net/ethernet/stmicro/stmmac/norm_desc.c   |  15 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |   2 +
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  | 123 ++++++++---
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 206 ++++++++++++++----
 14 files changed, 337 insertions(+), 162 deletions(-)

-- 
2.40.0


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

end of thread, other threads:[~2023-09-21 20:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 16:06 [PATCH net-next v5 0/2] net: stmmac: improve driver statistics Jisheng Zhang
2023-07-17 16:06 ` [PATCH net-next v5 1/2] net: stmmac: don't clear network statistics in .ndo_open() Jisheng Zhang
2023-07-17 16:06 ` [PATCH net-next v5 2/2] net: stmmac: use per-queue 64 bit statistics where necessary Jisheng Zhang
2023-09-11 17:11   ` [REGRESSION] " Uwe Kleine-König
2023-09-12  8:01     ` Jisheng Zhang
2023-09-12  9:04       ` Lucas Stach
2023-09-12  9:24         ` Uwe Kleine-König
2023-09-12  9:30           ` Johannes Berg
2023-09-13 14:34             ` Jisheng Zhang
2023-09-13 14:49               ` Johannes Berg
2023-09-13 20:12               ` Uwe Kleine-König
2023-09-12  8:23     ` Jisheng Zhang
2023-09-12  9:26       ` Uwe Kleine-König
2023-09-21 18:34   ` Guenter Roeck
2023-09-21 19:56     ` Uwe Kleine-König
2023-09-21 20:14       ` Guenter Roeck
2023-07-19  1:01 ` [PATCH net-next v5 0/2] net: stmmac: improve driver statistics Jakub Kicinski
2023-07-20  4:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).