[RFC v2 0/7] generic SW counters
Stephen Hemminger
stephen at networkplumber.org
Mon May 13 20:52:10 CEST 2024
This is second attempt to demonstrate:
- generic counters for SW drivers, the example does covers:
af_packet, af_xdp, tap, ring but could be applied to virtio, etc.
- counters are safe against 64 bit tearing on 32 bit platform
v2 - renamed and reorganized
- put counters in eal, stats in ethdev internal functions
- use offset to find stats in queue struct
Stephen Hemminger (3):
ethdev: add internal helper of SW driver statistics
net/af_packet: use SW stats helper
net/tap: use generic SW stats
Stephen Hemminger (7):
eal: generic 64 bit counter
ethdev: add internal helper of SW driver statistics
net/af_packet: use SW stats helper
net/tap: use generic SW stats
net/pcap: use generic SW stats
net/af_xdp: use generic SW stats
net/ring: use generic SW stats
drivers/net/af_packet/rte_eth_af_packet.c | 95 +++-----
drivers/net/af_xdp/rte_eth_af_xdp.c | 115 ++++-----
drivers/net/pcap/pcap_ethdev.c | 146 ++++--------
drivers/net/ring/rte_eth_ring.c | 85 +++----
drivers/net/tap/rte_eth_tap.c | 102 +++-----
drivers/net/tap/rte_eth_tap.h | 15 +-
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_counter.h | 91 ++++++++
lib/ethdev/ethdev_swstats.c | 270 ++++++++++++++++++++++
lib/ethdev/ethdev_swstats.h | 54 +++++
lib/ethdev/meson.build | 2 +
lib/ethdev/version.map | 8 +
12 files changed, 624 insertions(+), 360 deletions(-)
create mode 100644 lib/eal/include/rte_counter.h
create mode 100644 lib/ethdev/ethdev_swstats.c
create mode 100644 lib/ethdev/ethdev_swstats.h
--
2.43.0
More information about the dev
mailing list