[PATCH v3 00/16] remove stats mapping an RTE_ETHDEV_QUEUE_STAT_CNTRS

Stephen Hemminger <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
This patch series completes the removal (with help of AI) of the queue
stats counters an mapping. There are also a couple of uncovered bugs
in the process.

The per-queue stats mapping mechanism (rte_eth_dev_set_{rx,tx}_queue_stats_mapping
and the queue_stats_mapping_set ethdev op) was a workaround for hardware that
could only expose a limited number of queue stat registers. It let an application
fold many queues onto a small set of counters. Since 25.11 queue statistics are
filled in directly by the ethdev layer indexed by queue id, so the mapping is no
longer needed; the functions were deprecated then by commit 2863cbd9ee6d.

Tried to split out the bug fixes where possible.

The big patch is a tree wide removal of RTE_ETHDEV_QUEUE_STAT_CNTRS.
Instead the rte_ethdev allocates the temporary qstats array based
on what the driver reports as number of queues; before querying the
driver for its stats. The error counters are no longer per-queue
because that wasn't that helpful, instead error counters are global.

The same logic to map per-queue stats into xstats still exists and
the user visible xstats remain the same. The impact is only to the
driver API.

Also added test for statistics in pmd_ring test to make sure
there is test coverage.

Stephen Hemminger (16):
  net/virtio: remove unused queue stats mapping
  app/testpmd: remove leftover set qmap
  net/enic: remove unneeded ops initialization
  net/cnxk: fix Tx drops added to Rx queue errors
  net/cnxk: remove queue stats mapping
  net/e1000: remove queue stats mapping
  net/ixgbe: remove queue stats mapping
  net/txgbe: remove queue stats mapping
  net/sxe2: fix null dereference in stats get
  net/sxe2: remove queue stats mapping
  ethdev: remove support for queue stats mapping
  net/mvpp2: fix out of range Tx queue stats write
  net/ntnic: fix Tx errors reported as Rx queue errors
  net/xsc: fix Tx errors added to Rx queue errors
  ethdev: remove queue stats counter limit
  test/pmd_ring: test per-queue xstats

 app/test-pmd/cmdline.c                        |   6 -
 app/test-pmd/testpmd.h                        |   2 -
 app/test/test_pmd_ring.c                      | 145 ++++++++++++++++++
 doc/guides/howto/debug_troubleshoot.rst       |   5 +-
 doc/guides/nics/bnxt.rst                      |   4 +-
 doc/guides/nics/features.rst                  |  12 +-
 doc/guides/rel_notes/deprecation.rst          |   6 -
 doc/guides/rel_notes/release_26_11.rst        |   9 ++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst   |  11 --
 drivers/net/af_packet/rte_eth_af_packet.c     |  15 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c           |  13 +-
 drivers/net/ark/ark_ethdev_rx.c               |   7 +-
 drivers/net/ark/ark_ethdev_tx.c               |   6 +-
 drivers/net/atlantic/atl_ethdev.c             |  13 +-
 drivers/net/atlantic/atl_rxtx.c               |   8 +-
 drivers/net/atlantic/atl_types.h              |  15 +-
 drivers/net/avp/avp_ethdev.c                  |  13 +-
 drivers/net/axgbe/axgbe_ethdev.c              |  13 +-
 drivers/net/bnxt/bnxt_ethdev.c                |   5 -
 drivers/net/bnxt/bnxt_reps.c                  |   9 +-
 drivers/net/bnxt/bnxt_stats.c                 |  40 ++---
 drivers/net/cnxk/cnxk_ethdev.c                |   1 -
 drivers/net/cnxk/cnxk_ethdev.h                |   6 -
 drivers/net/cnxk/cnxk_rep_ops.c               |   8 +-
 drivers/net/cnxk/cnxk_stats.c                 |  67 +++-----
 drivers/net/dpaa2/dpaa2_ethdev.c              |  17 +-
 drivers/net/ena/ena_ethdev.c                  |  21 +--
 drivers/net/enic/enic_ethdev.c                |  11 --
 drivers/net/hinic/hinic_pmd_ethdev.c          |  17 +-
 drivers/net/hinic3/hinic3_ethdev.c            |  13 +-
 drivers/net/intel/e1000/igc_ethdev.c          |  57 ++-----
 drivers/net/intel/e1000/igc_ethdev.h          |   2 -
 drivers/net/intel/fm10k/fm10k_ethdev.c        |  16 +-
 drivers/net/intel/ixgbe/ixgbe_ethdev.c        | 137 ++++-------------
 drivers/net/intel/ixgbe/ixgbe_ethdev.h        |   9 --
 drivers/net/ionic/ionic_lif.c                 |  24 +--
 drivers/net/mana/mana.c                       |  12 +-
 drivers/net/memif/rte_eth_memif.c             |  16 +-
 drivers/net/mlx4/mlx4_ethdev.c                |  14 +-
 drivers/net/mlx5/mlx5_rx.h                    |   3 +-
 drivers/net/mlx5/mlx5_stats.c                 |  22 ++-
 drivers/net/mvpp2/mrvl_ethdev.c               |  21 ++-
 drivers/net/nbl/nbl_dev/nbl_dev.c             |   2 -
 drivers/net/nbl/nbl_hw/nbl_txrx.c             |  12 +-
 drivers/net/netvsc/hn_ethdev.c                |  12 +-
 drivers/net/netvsc/hn_vf.c                    |   3 +-
 drivers/net/nfb/nfb_stats.c                   |  12 +-
 drivers/net/nfp/flower/nfp_flower.c           |   8 +-
 .../net/nfp/flower/nfp_flower_representor.c   |  32 ++--
 .../net/nfp/flower/nfp_flower_representor.h   |   4 +-
 drivers/net/nfp/nfp_ethdev.c                  |  13 ++
 drivers/net/nfp/nfp_ethdev_vf.c               |  13 ++
 drivers/net/nfp/nfp_net_common.c              |  36 ++---
 drivers/net/nfp/nfp_net_common.h              |   3 +-
 drivers/net/ngbe/ngbe_ethdev.c                |  34 +---
 drivers/net/ngbe/ngbe_ethdev.h                |  12 --
 drivers/net/ntnic/ntnic_ethdev.c              |  13 +-
 drivers/net/null/rte_eth_null.c               |  12 +-
 drivers/net/octeon_ep/otx_ep_ethdev.c         |  13 +-
 drivers/net/pcap/pcap_ethdev.c                |  14 +-
 drivers/net/qede/qede_ethdev.c                |  36 +----
 drivers/net/ring/rte_eth_ring.c               |  10 +-
 drivers/net/rnp/rnp_ethdev.c                  |  12 +-
 drivers/net/sxe2/sxe2_cmd_chnl.c              | 119 ++------------
 drivers/net/sxe2/sxe2_cmd_chnl.h              |  10 --
 drivers/net/sxe2/sxe2_ethdev.c                |   5 -
 drivers/net/sxe2/sxe2_mp.c                    |  17 +-
 drivers/net/sxe2/sxe2_mp.h                    |   7 +-
 drivers/net/sxe2/sxe2_stats.c                 |  84 +---------
 drivers/net/sxe2/sxe2_stats.h                 |   5 -
 drivers/net/tap/rte_eth_tap.c                 |  12 +-
 drivers/net/thunderx/nicvf_ethdev.c           |  24 +--
 drivers/net/txgbe/txgbe_ethdev.c              |  89 +----------
 drivers/net/txgbe/txgbe_ethdev.h              |  13 --
 drivers/net/vhost/rte_eth_vhost.c             |  14 +-
 drivers/net/virtio/virtio_ethdev.c            |  33 +---
 drivers/net/vmxnet3/vmxnet3_ethdev.c          |  13 +-
 drivers/net/xsc/xsc_ethdev.c                  |  15 +-
 drivers/net/zxdh/zxdh_ethdev_ops.c            |  24 +--
 lib/ethdev/ethdev_driver.h                    |  38 ++---
 lib/ethdev/ethdev_private.c                   |   2 -
 lib/ethdev/ethdev_trace.h                     |  20 ---
 lib/ethdev/ethdev_trace_points.c              |   6 -
 lib/ethdev/rte_ethdev.c                       | 128 +++++-----------
 lib/ethdev/rte_ethdev.h                       |  45 ------
 85 files changed, 665 insertions(+), 1215 deletions(-)

-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.