[PATCH v2 0/3] add new API to enable/disable xstat counters

Shani Peretz shperetz at nvidia.com
Fri Jan 24 12:43:32 CET 2025


These series introduce new API functionality to manage xstats counters, allowing users to enable, disable, and query them.
Additionally, we've implemented testpmd commands to show xstats along with their current state. 
The changes also include a new feature in the mlx5 driver that utilizes these APIs, introducing a new xstat counter designed to track hairpin packet drops.

Shani Peretz (3):
  ethdev: add new API to enable/disable xstat by counters ID
  app/testpmd: added testpmd commands to enable/disable xstat
  net/mlx5: add port and queue level counters of hairpin drops

 app/test-pmd/cmdline.c                  | 125 ++++++++++
 app/test-pmd/config.c                   |  96 ++++++++
 app/test-pmd/testpmd.c                  |  10 +
 app/test-pmd/testpmd.h                  |   5 +
 drivers/common/mlx5/mlx5_devx_cmds.c    |   9 +-
 drivers/common/mlx5/mlx5_devx_cmds.h    |   2 +-
 drivers/common/mlx5/mlx5_prm.h          |   3 +
 drivers/net/mlx5/linux/mlx5_ethdev_os.c |   5 +
 drivers/net/mlx5/linux/mlx5_os.c        |  21 +-
 drivers/net/mlx5/mlx5.c                 | 288 ++++++++++++++++++++++-
 drivers/net/mlx5/mlx5.h                 |  28 ++-
 drivers/net/mlx5/mlx5_devx.c            |  75 ++----
 drivers/net/mlx5/mlx5_rx.h              |  20 ++
 drivers/net/mlx5/mlx5_rxq.c             |  36 +++
 drivers/net/mlx5/mlx5_stats.c           | 292 +++++++++++++++++++++++-
 drivers/net/mlx5/windows/mlx5_os.c      |   3 +-
 lib/cmdline/cmdline_parse_bool.c        |  49 ++++
 lib/cmdline/cmdline_parse_bool.h        |  39 ++++
 lib/cmdline/cmdline_parse_num.c         |   2 +-
 lib/cmdline/cmdline_parse_num.h         |   1 +
 lib/cmdline/meson.build                 |   2 +
 lib/cmdline/version.map                 |   7 +
 lib/ethdev/ethdev_driver.h              |  13 ++
 lib/ethdev/rte_ethdev.c                 |  49 ++++
 lib/ethdev/rte_ethdev.h                 |  32 +++
 lib/ethdev/version.map                  |   2 +
 26 files changed, 1122 insertions(+), 92 deletions(-)
 create mode 100644 lib/cmdline/cmdline_parse_bool.c
 create mode 100644 lib/cmdline/cmdline_parse_bool.h

-- 
2.34.1



More information about the dev mailing list