[RFC PATCH 5/6] app: remove queue stats from eth stats
Bruce Richardson
bruce.richardson at intel.com
Tue Sep 23 16:12:05 CEST 2025
Adjust applications to take account of the fact that queue stats are no
longer part of ethdev stats.
- For proc-info, we have to drop the output of the stats, since they are
no longer present.
- For the virtual_pmd in the test app, we adjust our stats_get function.
- For testpmd, we can no longer reference the queue stats counter to
check it, however, the range is checked in the ethdev APIs anyway, so
just remove the check.
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
app/proc-info/main.c | 16 ----------------
app/test-pmd/config.c | 6 ------
app/test/virtual_pmd.c | 3 ++-
3 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index be67386658..1b9979b7c8 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -657,7 +657,6 @@ static void
nic_stats_display(uint16_t port_id)
{
struct rte_eth_stats stats;
- uint8_t i;
static const char *nic_stats_border = "########################";
@@ -673,21 +672,6 @@ nic_stats_display(uint16_t port_id)
" TX-bytes: %-10"PRIu64"\n", stats.opackets, stats.oerrors,
stats.obytes);
- printf("\n");
- for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
- printf(" Stats reg %2d RX-packets: %-10"PRIu64
- " RX-errors: %-10"PRIu64
- " RX-bytes: %-10"PRIu64"\n",
- i, stats.q_ipackets[i], stats.q_errors[i], stats.q_ibytes[i]);
- }
-
- printf("\n");
- for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
- printf(" Stats reg %2d TX-packets: %-10"PRIu64
- " TX-bytes: %-10"PRIu64"\n",
- i, stats.q_opackets[i], stats.q_obytes[i]);
- }
-
printf(" %s############################%s\n",
nic_stats_border, nic_stats_border);
}
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index c1bd6921ea..ff170159a1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -6727,12 +6727,6 @@ set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value)
if (is_rx ? (rx_queue_id_is_invalid(queue_id)) : (tx_queue_id_is_invalid(queue_id)))
return;
- if (map_value >= RTE_ETHDEV_QUEUE_STAT_CNTRS) {
- fprintf(stderr, "map_value not in required range 0..%d\n",
- RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
- return;
- }
-
if (!is_rx) { /* tx */
ret = rte_eth_dev_set_tx_queue_stats_mapping(port_id, queue_id,
map_value);
diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index b7d74a467a..aa37e4073c 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -181,7 +181,8 @@ virtual_ethdev_link_update_fail(struct rte_eth_dev *bonding_eth_dev __rte_unused
}
static int
-virtual_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+virtual_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
+ struct eth_queue_stats *qstats __rte_unused)
{
struct virtual_ethdev_private *dev_private = dev->data->dev_private;
--
2.48.1
More information about the dev
mailing list