netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Expand statistics reported in ethtool
@ 2024-08-23 23:53 Nelson Escobar
  2024-08-23 23:54 ` [PATCH net-next 1/2] enic: Use macro instead of static const variables for array sizes Nelson Escobar
  2024-08-23 23:54 ` [PATCH net-next 2/2] enic: Expand statistics gathering and reporting Nelson Escobar
  0 siblings, 2 replies; 4+ messages in thread
From: Nelson Escobar @ 2024-08-23 23:53 UTC (permalink / raw)
  To: netdev; +Cc: satishkh, johndale, Nelson Escobar

Hi,

The following patches expand the statistics reported in ethtool for the enic
driver:

Patch #1: Use a macro instead of static const variables for array sizes.  I
          didn't want to add more static const variables in the next patch
          so clean up the existing ones first.

Patch #2: Expand the statistics to include per wq and per rq statistics in the
          ethtool output.

Example output after these patches:

# ethtool -S enp1s0
NIC statistics:
     tx_frames_ok: 23093667316
     tx_unicast_frames_ok: 23093667263
     tx_multicast_frames_ok: 47
     tx_broadcast_frames_ok: 6
     tx_bytes_ok: 34011338518116
     tx_unicast_bytes_ok: 34011338512894
     tx_multicast_bytes_ok: 4970
     tx_broadcast_bytes_ok: 252
     tx_drops: 0
     tx_errors: 0
     tx_tso: 22435852597
     rx_frames_ok: 36167593711
     rx_frames_total: 36178256385
     rx_unicast_frames_ok: 36178256384
     rx_multicast_frames_ok: 0
     rx_broadcast_frames_ok: 1
     rx_bytes_ok: 54176088602603
     rx_unicast_bytes_ok: 54192231882399
     rx_multicast_bytes_ok: 0
     rx_broadcast_bytes_ok: 56
     rx_drop: 0
     rx_no_bufs: 10662674
     rx_errors: 0
     rx_rss: 36178256124
     rx_crc_errors: 0
     rx_frames_64: 262
     rx_frames_127: 401677158
     rx_frames_255: 3113
     rx_frames_511: 6153
     rx_frames_1023: 12325
     rx_frames_1518: 35776557376
     rx_frames_to_max: 34359738368
     dma_map_error: 0
     rq[0]_packets: 15203911650
     rq[0]_bytes: 23018700775410
     rq[0]_l4_rss_hash: 15203911388
     rq[0]_l3_rss_hash: 0
     rq[0]_csum_unnecessary: 15203911388
     rq[0]_csum_unnecessary_encap: 0
     rq[0]_vlan_stripped: 15203911650
     rq[0]_napi_complete: 32258306
     rq[0]_napi_repoll: 218149461
     rq[0]_bad_fcs: 0
     rq[0]_pkt_truncated: 0
     rq[0]_no_skb: 0
     rq[0]_desc_skip: 0
     rq[1]_packets: 401675700
     rq[1]_bytes: 26514408889
     rq[1]_l4_rss_hash: 401675700
     rq[1]_l3_rss_hash: 0
     rq[1]_csum_unnecessary: 401675700
     rq[1]_csum_unnecessary_encap: 0
     rq[1]_vlan_stripped: 401675700
     rq[1]_napi_complete: 180387886
     rq[1]_napi_repoll: 0
     rq[1]_bad_fcs: 0
     rq[1]_pkt_truncated: 0
     rq[1]_no_skb: 0
     rq[1]_desc_skip: 0
     rq[2]_packets: 20562006510
     rq[2]_bytes: 31130873649489
     rq[2]_l4_rss_hash: 20562006510
     rq[2]_l3_rss_hash: 0
     rq[2]_csum_unnecessary: 20562006510
     rq[2]_csum_unnecessary_encap: 0
     rq[2]_vlan_stripped: 20562006510
     rq[2]_napi_complete: 35277758
     rq[2]_napi_repoll: 301947558
     rq[2]_bad_fcs: 0
     rq[2]_pkt_truncated: 0
     rq[2]_no_skb: 0
     rq[2]_desc_skip: 0
     rq[3]_packets: 7
     rq[3]_bytes: 655
     rq[3]_l4_rss_hash: 7
     rq[3]_l3_rss_hash: 0
     rq[3]_csum_unnecessary: 7
     rq[3]_csum_unnecessary_encap: 0
     rq[3]_vlan_stripped: 7
     rq[3]_napi_complete: 6
     rq[3]_napi_repoll: 0
     rq[3]_bad_fcs: 0
     rq[3]_pkt_truncated: 0
     rq[3]_no_skb: 0
     rq[3]_desc_skip: 0
     wq[0]_packets: 1156987579
     wq[0]_stopped: 0
     wq[0]_wake: 0
     wq[0]_tso: 499172850
     wq[0]_encap_tso: 0
     wq[0]_encap_csum: 0
     wq[0]_csum_partial: 657814425
     wq[0]_csum: 304
     wq[0]_bytes: 32563518059466
     wq[0]_add_vlan: 0
     wq[0]_cq_work: 3638574289
     wq[0]_cq_bytes: 32563517667582
     wq[0]_null_pkt: 0
     wq[0]_skb_linear_fail: 0
     wq[0]_desc_full_awake: 0



Thanks,
Nelson.

Nelson Escobar (2):
  enic: Use macro instead of static const variables for array sizes
  enic: Expand statistics gathering and reporting

 drivers/net/ethernet/cisco/enic/enic.h        |  38 +++++-
 .../net/ethernet/cisco/enic/enic_ethtool.c    | 114 ++++++++++++++++--
 drivers/net/ethernet/cisco/enic/enic_main.c   |  89 +++++++++++---
 3 files changed, 211 insertions(+), 30 deletions(-)

-- 
2.35.2


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

end of thread, other threads:[~2024-08-26 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 23:53 [PATCH net-next 0/2] Expand statistics reported in ethtool Nelson Escobar
2024-08-23 23:54 ` [PATCH net-next 1/2] enic: Use macro instead of static const variables for array sizes Nelson Escobar
2024-08-23 23:54 ` [PATCH net-next 2/2] enic: Expand statistics gathering and reporting Nelson Escobar
2024-08-26 21:48   ` Jakub Kicinski

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).