Adds common code for collecting basic statistics used by many
SW based PMD's such as af_packet, af_xdp, tap and ring.

Solves the problem where counters could tear because of
32 bit load/store on 32 bit platforms.

v3 - fix missing const on 32 bit
   - add some docbook comments
   - get rid of unused statistics from previous version

Stephen Hemminger (7):
  eal: generic 64 bit counter
  ethdev: add internal helper of SW driver statistics
  net/af_packet: use SW stats helper
  net/af_xdp: use generic SW stats
  net/pcap: use generic SW stats
  net/ring: use generic SW stats
  net/tap: use generic SW stats

 drivers/net/af_packet/rte_eth_af_packet.c |  82 +++-----------
 drivers/net/af_xdp/rte_eth_af_xdp.c       |  98 +++++------------
 drivers/net/pcap/pcap_ethdev.c            | 125 +++++-----------------
 drivers/net/ring/rte_eth_ring.c           |  71 +++++-------
 drivers/net/tap/rte_eth_tap.c             |  88 +++------------
 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               | 106 ++++++++++++++++++
 lib/ethdev/ethdev_swstats.h               | 124 +++++++++++++++++++++
 lib/ethdev/meson.build                    |   2 +
 lib/ethdev/version.map                    |   3 +
 12 files changed, 438 insertions(+), 368 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

Reply via email to