From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Chengwen Feng <fengchengwen@huawei.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Thomas Monjalon <thomas@monjalon.net>
Subject: [PATCH v2 9/9] ethdev: remove support for queue stats mapping
Date: Thu, 23 Jul 2026 13:28:14 -0700 [thread overview]
Message-ID: <20260723202936.378793-10-stephen@networkplumber.org> (raw)
In-Reply-To: <20260723202936.378793-1-stephen@networkplumber.org>
The support for queue stats mapping has been deprecated since 25.11
release by commit 2863cbd9ee6d ("ethdev: deprecate queue stats mapping
functions")
This patch completes final removal from ethdev and documentation.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
doc/guides/nics/features.rst | 7 ---
doc/guides/rel_notes/deprecation.rst | 6 ---
doc/guides/rel_notes/release_26_11.rst | 5 +++
lib/ethdev/ethdev_driver.h | 11 -----
lib/ethdev/ethdev_trace.h | 20 ---------
lib/ethdev/ethdev_trace_points.c | 6 ---
lib/ethdev/rte_ethdev.c | 62 --------------------------
lib/ethdev/rte_ethdev.h | 45 -------------------
8 files changed, 5 insertions(+), 157 deletions(-)
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 0b0c69e7cd..d6852b063c 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -764,13 +764,6 @@ If driver does not support this feature the per queue stats will be zero.
* **[implements] eth_dev_ops**: ``stats_get``, ``stats_reset``.
* **[related] API**: ``rte_eth_stats_get``, ``rte_eth_stats_reset()``.
-May also support configuring per-queue stat counter mapping.
-Used by some drivers to workaround HW limitations.
-
-* **[implements] eth_dev_ops**: ``queue_stats_mapping_set``.
-* **[related] API**: ``rte_eth_dev_set_rx_queue_stats_mapping()``,
- ``rte_eth_dev_set_tx_queue_stats_mapping()``.
-
.. _nic_features_extended_stats:
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 6ad7698c6b..aaa2918865 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -83,12 +83,6 @@ Deprecation Notices
and the header struct ``rte_vxlan_gpe_hdr`` with the macro ``RTE_ETHER_VXLAN_GPE_HLEN``
will be removed in DPDK 25.11.
-* ethdev: The queue stats mapping functions
- ``rte_eth_dev_set_tx_queue_stats_mapping`` and ``rte_eth_dev_set_rx_queue_stats_mapping``
- are deprecated and will be removed in a future release.
- Following the removal of queue statistics from the main ethdev statistics structure,
- these functions are no longer needed.
-
* ethdev: The flow API matching pattern structures, ``struct rte_flow_item_*``,
should start with relevant protocol header structure from lib/net/.
The individual protocol header fields and the protocol header struct
diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index 938617ca75..ed6937c8b5 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -68,6 +68,11 @@ Removed Items
Also, make sure to start the actual text at the margin.
=======================================================
+* ethdev: Removed support for ethdev queue stats mapping.
+
+ ``rte_eth_dev_set_tx_queue_stats_mapping`` and ``rte_eth_dev_set_rx_queue_stats_mapping``
+ were deprecated and are now removed.
+
API Changes
-----------
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 0f336f9567..0477579cc3 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -567,15 +567,6 @@ typedef int (*eth_xstats_disable_counter_t)(struct rte_eth_dev *dev, uint64_t id
/** @internal Query the state of an xstat the can be enabled and disabled in runtime. */
typedef int (*eth_xstats_query_state_t)(struct rte_eth_dev *dev, uint64_t id);
-/**
- * @internal
- * Set a queue statistics mapping for a Tx/Rx queue of an Ethernet device.
- */
-typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx);
-
/** @internal Get specific information of an Ethernet device. */
typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
struct rte_eth_dev_info *dev_info);
@@ -1454,8 +1445,6 @@ struct eth_dev_ops {
eth_xstats_reset_t xstats_reset;
/** Get names of extended statistics */
eth_xstats_get_names_t xstats_get_names;
- /** Configure per queue stat counter mapping */
- eth_queue_stats_mapping_set_t queue_stats_mapping_set;
eth_dev_infos_get_t dev_infos_get; /**< Get device info */
/** Retrieve Rx queue information */
diff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h
index 6554cc1a21..6f1804a765 100644
--- a/lib/ethdev/ethdev_trace.h
+++ b/lib/ethdev/ethdev_trace.h
@@ -310,26 +310,6 @@ RTE_TRACE_POINT(
rte_trace_point_emit_int(ret);
)
-RTE_TRACE_POINT(
- rte_ethdev_trace_set_rx_queue_stats_mapping,
- RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t rx_queue_id,
- uint8_t stat_idx, int ret),
- rte_trace_point_emit_u16(port_id);
- rte_trace_point_emit_u16(rx_queue_id);
- rte_trace_point_emit_u8(stat_idx);
- rte_trace_point_emit_int(ret);
-)
-
-RTE_TRACE_POINT(
- rte_ethdev_trace_set_tx_queue_stats_mapping,
- RTE_TRACE_POINT_ARGS(uint16_t port_id, uint16_t tx_queue_id,
- uint8_t stat_idx, int ret),
- rte_trace_point_emit_u16(port_id);
- rte_trace_point_emit_u16(tx_queue_id);
- rte_trace_point_emit_u8(stat_idx);
- rte_trace_point_emit_int(ret);
-)
-
RTE_TRACE_POINT(
rte_ethdev_trace_fw_version_get,
RTE_TRACE_POINT_ARGS(uint16_t port_id, const char *fw_version,
diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c
index 0a28378a56..b0644ea489 100644
--- a/lib/ethdev/ethdev_trace_points.c
+++ b/lib/ethdev/ethdev_trace_points.c
@@ -230,12 +230,6 @@ RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_get,
RTE_TRACE_POINT_REGISTER(rte_eth_trace_xstats_reset,
lib.ethdev.xstats_reset)
-RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_tx_queue_stats_mapping,
- lib.ethdev.set_tx_queue_stats_mapping)
-
-RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_set_rx_queue_stats_mapping,
- lib.ethdev.set_rx_queue_stats_mapping)
-
RTE_TRACE_POINT_REGISTER(rte_ethdev_trace_fw_version_get,
lib.ethdev.fw_version_get)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 9efeaf77cb..d6915a6b08 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -160,11 +160,6 @@ static const struct {
{RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP, "FLOW_SHARED_OBJECT_KEEP"},
};
-enum {
- STAT_QMAP_TX = 0,
- STAT_QMAP_RX
-};
-
static const struct {
enum rte_eth_hash_function algo;
const char *name;
@@ -4005,63 +4000,6 @@ rte_eth_xstats_query_state(uint16_t port_id, uint64_t id)
return -ENOTSUP;
}
-static int
-eth_dev_set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id,
- uint8_t stat_idx, uint8_t is_rx)
-{
- struct rte_eth_dev *dev;
-
- RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
- dev = &rte_eth_devices[port_id];
-
- if (is_rx && (queue_id >= dev->data->nb_rx_queues))
- return -EINVAL;
-
- if (!is_rx && (queue_id >= dev->data->nb_tx_queues))
- return -EINVAL;
-
- if (stat_idx >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
- return -EINVAL;
-
- if (dev->dev_ops->queue_stats_mapping_set == NULL)
- return -ENOTSUP;
- return dev->dev_ops->queue_stats_mapping_set(dev, queue_id, stat_idx, is_rx);
-}
-
-RTE_EXPORT_SYMBOL(rte_eth_dev_set_tx_queue_stats_mapping)
-int
-rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id, uint16_t tx_queue_id,
- uint8_t stat_idx)
-{
- int ret;
-
- ret = eth_err(port_id, eth_dev_set_queue_stats_mapping(port_id,
- tx_queue_id,
- stat_idx, STAT_QMAP_TX));
-
- rte_ethdev_trace_set_tx_queue_stats_mapping(port_id, tx_queue_id,
- stat_idx, ret);
-
- return ret;
-}
-
-RTE_EXPORT_SYMBOL(rte_eth_dev_set_rx_queue_stats_mapping)
-int
-rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id, uint16_t rx_queue_id,
- uint8_t stat_idx)
-{
- int ret;
-
- ret = eth_err(port_id, eth_dev_set_queue_stats_mapping(port_id,
- rx_queue_id,
- stat_idx, STAT_QMAP_RX));
-
- rte_ethdev_trace_set_rx_queue_stats_mapping(port_id, rx_queue_id,
- stat_idx, ret);
-
- return ret;
-}
-
RTE_EXPORT_SYMBOL(rte_eth_dev_fw_version_get)
int
rte_eth_dev_fw_version_get(uint16_t port_id, char *fw_version, size_t fw_size)
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index ee400b386f..3aa7a22fbc 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -3491,51 +3491,6 @@ int rte_eth_xstats_query_state(uint16_t port_id, uint64_t id);
*/
int rte_eth_xstats_reset(uint16_t port_id);
-/**
- * Set a mapping for the specified transmit queue to the specified per-queue
- * statistics counter.
- *
- * @param port_id
- * The port identifier of the Ethernet device.
- * @param tx_queue_id
- * The index of the transmit queue for which a queue stats mapping is required.
- * The value must be in the range [0, nb_tx_queue - 1] previously supplied
- * to rte_eth_dev_configure().
- * @param stat_idx
- * The per-queue packet statistics functionality number that the transmit
- * queue is to be assigned.
- * The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
- * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
- * @return
- * Zero if successful. Non-zero otherwise.
- */
-__rte_deprecated
-int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
- uint16_t tx_queue_id, uint8_t stat_idx);
-
-/**
- * Set a mapping for the specified receive queue to the specified per-queue
- * statistics counter.
- *
- * @param port_id
- * The port identifier of the Ethernet device.
- * @param rx_queue_id
- * The index of the receive queue for which a queue stats mapping is required.
- * The value must be in the range [0, nb_rx_queue - 1] previously supplied
- * to rte_eth_dev_configure().
- * @param stat_idx
- * The per-queue packet statistics functionality number that the receive
- * queue is to be assigned.
- * The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
- * Max RTE_ETHDEV_QUEUE_STAT_CNTRS being 256.
- * @return
- * Zero if successful. Non-zero otherwise.
- */
-__rte_deprecated
-int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
- uint16_t rx_queue_id,
- uint8_t stat_idx);
-
/**
* Retrieve the Ethernet address of an Ethernet device.
*
--
2.53.0
prev parent reply other threads:[~2026-07-23 20:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
2026-05-30 16:09 ` [RFC 1/7] net/virtio: remove unused " Stephen Hemminger
2026-05-30 16:09 ` [RFC 2/7] net/enic: remove queue_stats_mapping ethdev_op Stephen Hemminger
2026-05-30 16:09 ` [RFC 3/7] net/cnxk: remove queue stats mapping Stephen Hemminger
2026-05-30 16:09 ` [RFC 4/7] net/e1000: " Stephen Hemminger
2026-05-30 16:10 ` [RFC 5/7] net/ixgbe: " Stephen Hemminger
2026-05-30 16:10 ` [RFC 6/7] net/txgbe: " Stephen Hemminger
2026-05-30 16:10 ` [RFC 7/7] ethdev: remove support for " Stephen Hemminger
2026-06-01 1:56 ` fengchengwen
2026-06-01 8:45 ` Andrew Rybchenko
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 1/9] net/virtio: remove unused " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 2/9] app/testpmd: remove unused function prototype Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 3/9] net/enic: remove unneeded ops initialization Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 4/9] net/cnxk: remove queue stats mapping Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 5/9] net/e1000: " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 6/9] net/ixgbe: " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 7/9] net/txgbe: " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 8/9] net/sxe2: " Stephen Hemminger
2026-07-23 20:28 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260723202936.378793-10-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox