* [RFC 0/7] Complete removal of queue stats mapping
@ 2026-05-30 16:09 Stephen Hemminger
2026-05-30 16:09 ` [RFC 1/7] net/virtio: remove unused " Stephen Hemminger
` (7 more replies)
0 siblings, 8 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:09 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
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.
This series finishes the job. The drivers that still implemented the op are
converted to report queue stats directly by queue id (bounded by
RTE_ETHDEV_QUEUE_STAT_CNTRS), and the op, the two public functions, their trace
points, and the documentation are removed from ethdev. The leftover per-driver
mapping tables, accessor macros, and init code go away with them.
This is an RFC against 26.11, where the ABI break from removing the two stable
symbols is expected. The Removed Items / ABI Changes release notes entry will be
added once the 26.11 notes file is opened.
Stephen Hemminger (7):
net/virtio: remove unused queue stats mapping
net/enic: remove queue_stats_mapping ethdev_op
net/cnxk: remove queue stats mapping
net/e1000: remove queue stats mapping
net/ixgbe: remove queue stats mapping
net/txgbe: remove queue stats mapping
ethdev: remove support for queue stats mapping
doc/guides/nics/features.rst | 7 --
doc/guides/rel_notes/deprecation.rst | 6 --
drivers/net/cnxk/cnxk_ethdev.c | 1 -
drivers/net/cnxk/cnxk_ethdev.h | 6 --
drivers/net/cnxk/cnxk_stats.c | 76 ++++++++------------
drivers/net/enic/enic_ethdev.c | 11 ---
drivers/net/intel/e1000/igc_ethdev.c | 54 ++------------
drivers/net/intel/e1000/igc_ethdev.h | 2 -
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 97 --------------------------
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 9 ---
drivers/net/txgbe/txgbe_ethdev.c | 87 ++---------------------
drivers/net/txgbe/txgbe_ethdev.h | 13 ----
drivers/net/virtio/virtio_ethdev.c | 21 ------
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 ------------
18 files changed, 45 insertions(+), 489 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [RFC 1/7] net/virtio: remove unused queue stats mapping
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
@ 2026-05-30 16:09 ` Stephen Hemminger
2026-05-30 16:09 ` [RFC 2/7] net/enic: remove queue_stats_mapping ethdev_op Stephen Hemminger
` (6 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:09 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Maxime Coquelin, Chenbo Xia
The queue_stats_mapping op in virtio looks like a vestiage
from when it was needed to get per queue stats. That hasn't
been true since 25.11 release.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/virtio/virtio_ethdev.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 9fd746b80f..0b2574bd02 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -90,12 +90,6 @@ static int virtio_intr_disable(struct rte_eth_dev *dev);
static int virtio_get_monitor_addr(void *rx_queue,
struct rte_power_monitor_cond *pmc);
-static int virtio_dev_queue_stats_mapping_set(
- struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx);
-
static void virtio_notify_peers(struct rte_eth_dev *dev);
static void virtio_ack_link_announce(struct rte_eth_dev *dev);
@@ -672,8 +666,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
.rss_hash_conf_get = virtio_dev_rss_hash_conf_get,
.reta_update = virtio_dev_rss_reta_update,
.reta_query = virtio_dev_rss_reta_query,
- /* collect stats per queue */
- .queue_stats_mapping_set = virtio_dev_queue_stats_mapping_set,
.vlan_filter_set = virtio_vlan_filter_set,
.mac_addr_add = virtio_mac_addr_add,
.mac_addr_remove = virtio_mac_addr_remove,
@@ -693,8 +685,6 @@ const struct eth_dev_ops virtio_user_secondary_eth_dev_ops = {
.xstats_get_names = virtio_dev_xstats_get_names,
.stats_reset = virtio_dev_stats_reset,
.xstats_reset = virtio_dev_stats_reset,
- /* collect stats per queue */
- .queue_stats_mapping_set = virtio_dev_queue_stats_mapping_set,
};
static void
@@ -2823,16 +2813,5 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
return 0;
}
-/*
- * It enables testpmd to collect per queue stats.
- */
-static int
-virtio_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_dev,
-__rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx,
-__rte_unused uint8_t is_rx)
-{
- return 0;
-}
-
RTE_LOG_REGISTER_SUFFIX(virtio_logtype_init, init, NOTICE);
RTE_LOG_REGISTER_SUFFIX(virtio_logtype_driver, driver, NOTICE);
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC 2/7] net/enic: remove queue_stats_mapping ethdev_op
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 ` Stephen Hemminger
2026-05-30 16:09 ` [RFC 3/7] net/cnxk: remove queue stats mapping Stephen Hemminger
` (5 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:09 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, John Daley, Hyong Youb Kim
Better to just let compiler initialize fields to NULL since then
if fields change that driver doesn't use, the driver source
will not need to be changed.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/enic/enic_ethdev.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index a853a5047a..545edf12bd 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1119,8 +1119,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
.dev_configure = enicpmd_dev_configure,
.dev_start = enicpmd_dev_start,
.dev_stop = enicpmd_dev_stop,
- .dev_set_link_up = NULL,
- .dev_set_link_down = NULL,
.dev_close = enicpmd_dev_close,
.promiscuous_enable = enicpmd_dev_promiscuous_enable,
.promiscuous_disable = enicpmd_dev_promiscuous_disable,
@@ -1129,14 +1127,10 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
.link_update = enicpmd_dev_link_update,
.stats_get = enicpmd_dev_stats_get,
.stats_reset = enicpmd_dev_stats_reset,
- .queue_stats_mapping_set = NULL,
.dev_infos_get = enicpmd_dev_info_get,
.dev_supported_ptypes_get = enicpmd_dev_supported_ptypes_get,
.mtu_set = enicpmd_mtu_set,
- .vlan_filter_set = NULL,
- .vlan_tpid_set = NULL,
.vlan_offload_set = enicpmd_vlan_offload_set,
- .vlan_strip_queue_set = NULL,
.rx_queue_start = enicpmd_dev_rx_queue_start,
.rx_queue_stop = enicpmd_dev_rx_queue_stop,
.tx_queue_start = enicpmd_dev_tx_queue_start,
@@ -1151,11 +1145,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
.txq_info_get = enicpmd_dev_txq_info_get,
.rx_burst_mode_get = enicpmd_dev_rx_burst_mode_get,
.tx_burst_mode_get = enicpmd_dev_tx_burst_mode_get,
- .dev_led_on = NULL,
- .dev_led_off = NULL,
- .flow_ctrl_get = NULL,
- .flow_ctrl_set = NULL,
- .priority_flow_ctrl_set = NULL,
.mac_addr_add = enicpmd_add_mac_addr,
.mac_addr_remove = enicpmd_remove_mac_addr,
.mac_addr_set = enicpmd_set_mac_addr,
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC 3/7] net/cnxk: remove queue stats mapping
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 ` Stephen Hemminger
2026-05-30 16:09 ` [RFC 4/7] net/e1000: " Stephen Hemminger
` (4 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:09 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra
The queue stats mapping feature has been deprecated since 25.11.
Remove support in this driver for stats map.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cnxk/cnxk_ethdev.c | 1 -
drivers/net/cnxk/cnxk_ethdev.h | 6 ---
drivers/net/cnxk/cnxk_stats.c | 76 ++++++++++++++--------------------
3 files changed, 31 insertions(+), 52 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 06d1c9b362..c8e7d70c2a 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -2104,7 +2104,6 @@ struct eth_dev_ops cnxk_eth_dev_ops = {
.rx_queue_intr_enable = cnxk_nix_rx_queue_intr_enable,
.rx_queue_intr_disable = cnxk_nix_rx_queue_intr_disable,
.pool_ops_supported = cnxk_nix_pool_ops_supported,
- .queue_stats_mapping_set = cnxk_nix_queue_stats_mapping,
.stats_get = cnxk_nix_stats_get,
.stats_reset = cnxk_nix_stats_reset,
.xstats_get = cnxk_nix_xstats_get,
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index 8691acc642..d73a4ff3d3 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -416,10 +416,6 @@ struct cnxk_eth_dev {
/* LSO Tunnel format indices */
uint64_t lso_tun_fmt;
- /* Per queue statistics counters */
- uint32_t txq_stat_map[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- uint32_t rxq_stat_map[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-
/* Security data */
struct cnxk_eth_dev_sec_inb inb;
struct cnxk_eth_dev_sec_outb outb;
@@ -687,8 +683,6 @@ void cnxk_eth_dev_link_status_get_cb(struct roc_nix *nix,
void cnxk_eth_dev_q_err_cb(struct roc_nix *nix, void *data);
int cnxk_nix_link_info_configure(struct rte_eth_dev *eth_dev);
int cnxk_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete);
-int cnxk_nix_queue_stats_mapping(struct rte_eth_dev *dev, uint16_t queue_id,
- uint8_t stat_idx, uint8_t is_rx);
int cnxk_nix_stats_reset(struct rte_eth_dev *dev);
int cnxk_nix_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
struct eth_queue_stats *qstats);
diff --git a/drivers/net/cnxk/cnxk_stats.c b/drivers/net/cnxk/cnxk_stats.c
index d57659ef51..e5d29a78b3 100644
--- a/drivers/net/cnxk/cnxk_stats.c
+++ b/drivers/net/cnxk/cnxk_stats.c
@@ -14,7 +14,8 @@ cnxk_nix_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats,
struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
struct roc_nix *nix = &dev->nix;
struct roc_nix_stats nix_stats;
- int rc = 0, i;
+ unsigned int i;
+ int rc = 0;
rc = roc_nix_stats_get(nix, &nix_stats);
if (rc)
@@ -33,31 +34,35 @@ cnxk_nix_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats,
stats->ibytes = nix_stats.rx_octs;
stats->ierrors = nix_stats.rx_err;
- if (qstats != NULL) {
- for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
- struct roc_nix_stats_queue qstats_data;
- uint16_t qidx;
-
- if (dev->txq_stat_map[i] & (1U << 31)) {
- qidx = dev->txq_stat_map[i] & 0xFFFF;
- rc = roc_nix_stats_queue_get(nix, qidx, 0, &qstats_data);
- if (rc)
- goto exit;
- qstats->q_opackets[i] = qstats_data.tx_pkts;
- qstats->q_obytes[i] = qstats_data.tx_octs;
- qstats->q_errors[i] = qstats_data.tx_drop_pkts;
- }
-
- if (dev->rxq_stat_map[i] & (1U << 31)) {
- qidx = dev->rxq_stat_map[i] & 0xFFFF;
- rc = roc_nix_stats_queue_get(nix, qidx, 1, &qstats_data);
- if (rc)
- goto exit;
- qstats->q_ipackets[i] = qstats_data.rx_pkts;
- qstats->q_ibytes[i] = qstats_data.rx_octs;
- qstats->q_errors[i] += qstats_data.rx_drop_pkts;
- }
- }
+ if (qstats == NULL)
+ goto exit;
+
+ for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+ struct roc_nix_stats_queue qstats_data;
+
+ if (i >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ break;
+
+ rc = roc_nix_stats_queue_get(nix, i, 0, &qstats_data);
+ if (rc)
+ goto exit;
+ qstats->q_opackets[i] = qstats_data.tx_pkts;
+ qstats->q_obytes[i] = qstats_data.tx_octs;
+ qstats->q_errors[i] = qstats_data.tx_drop_pkts;
+ }
+
+ for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
+ struct roc_nix_stats_queue qstats_data;
+
+ if (i >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ break;
+
+ rc = roc_nix_stats_queue_get(nix, i, 1, &qstats_data);
+ if (rc)
+ goto exit;
+ qstats->q_ipackets[i] = qstats_data.rx_pkts;
+ qstats->q_ibytes[i] = qstats_data.rx_octs;
+ qstats->q_errors[i] += qstats_data.rx_drop_pkts;
}
exit:
return rc;
@@ -71,25 +76,6 @@ cnxk_nix_stats_reset(struct rte_eth_dev *eth_dev)
return roc_nix_stats_reset(&dev->nix);
}
-int
-cnxk_nix_queue_stats_mapping(struct rte_eth_dev *eth_dev, uint16_t queue_id,
- uint8_t stat_idx, uint8_t is_rx)
-{
- struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
-
- if (is_rx) {
- if (queue_id >= dev->nb_rxq)
- return -EINVAL;
- dev->rxq_stat_map[stat_idx] = ((1U << 31) | queue_id);
- } else {
- if (queue_id >= dev->nb_txq)
- return -EINVAL;
- dev->txq_stat_map[stat_idx] = ((1U << 31) | queue_id);
- }
-
- return 0;
-}
-
int
cnxk_nix_xstats_get(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *xstats,
unsigned int n)
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC 4/7] net/e1000: remove queue stats mapping
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
` (2 preceding siblings ...)
2026-05-30 16:09 ` [RFC 3/7] net/cnxk: remove queue stats mapping Stephen Hemminger
@ 2026-05-30 16:09 ` Stephen Hemminger
2026-05-30 16:10 ` [RFC 5/7] net/ixgbe: " Stephen Hemminger
` (3 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:09 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Support for queue stats mapping has been deprecated since 25.11.
Remove support for this operation in the e1000 driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/e1000/igc_ethdev.c | 54 ++++------------------------
drivers/net/intel/e1000/igc_ethdev.h | 2 --
2 files changed, 7 insertions(+), 49 deletions(-)
diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
index 727ea36c2b..891c810132 100644
--- a/drivers/net/intel/e1000/igc_ethdev.c
+++ b/drivers/net/intel/e1000/igc_ethdev.c
@@ -239,9 +239,7 @@ static int eth_igc_xstats_get_names_by_id(struct rte_eth_dev *dev,
const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
unsigned int limit);
static int eth_igc_xstats_reset(struct rte_eth_dev *dev);
-static int
-eth_igc_queue_stats_mapping_set(struct rte_eth_dev *dev,
- uint16_t queue_id, uint8_t stat_idx, uint8_t is_rx);
+
static int
eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id);
static int
@@ -317,7 +315,6 @@ static const struct eth_dev_ops eth_igc_ops = {
.xstats_get_names = eth_igc_xstats_get_names,
.stats_reset = eth_igc_xstats_reset,
.xstats_reset = eth_igc_xstats_reset,
- .queue_stats_mapping_set = eth_igc_queue_stats_mapping_set,
.rx_queue_intr_enable = eth_igc_rx_queue_intr_enable,
.rx_queue_intr_disable = eth_igc_rx_queue_intr_disable,
.flow_ctrl_get = eth_igc_flow_ctrl_get,
@@ -1362,7 +1359,7 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct igc_adapter *igc = IGC_DEV_PRIVATE(dev);
struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
- int i, error = 0;
+ int error = 0;
PMD_INIT_FUNC_TRACE();
dev->dev_ops = ð_igc_ops;
@@ -1493,12 +1490,6 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
/* enable support intr */
igc_intr_other_enable(dev);
- /* initiate queue status */
- for (i = 0; i < IGC_QUEUE_PAIRS_NUM; i++) {
- igc->txq_stats_map[i] = -1;
- igc->rxq_stats_map[i] = -1;
- }
-
igc_flow_init(dev);
igc_clear_all_filter(dev);
return 0;
@@ -2031,7 +2022,6 @@ static int
eth_igc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats,
struct eth_queue_stats *qstats)
{
- struct igc_adapter *igc = IGC_DEV_PRIVATE(dev);
struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
struct e1000_hw_stats *stats = IGC_DEV_PRIVATE_STATS(dev);
struct igc_hw_queue_stats *queue_stats =
@@ -2070,19 +2060,11 @@ eth_igc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats,
/* Get per-queue statuses */
if (qstats) {
for (i = 0; i < IGC_QUEUE_PAIRS_NUM; i++) {
- /* GET TX queue statuses */
- int map_id = igc->txq_stats_map[i];
- if (map_id >= 0) {
- qstats->q_opackets[map_id] += queue_stats->pqgptc[i];
- qstats->q_obytes[map_id] += queue_stats->pqgotc[i];
- }
- /* Get RX queue statuses */
- map_id = igc->rxq_stats_map[i];
- if (map_id >= 0) {
- qstats->q_ipackets[map_id] += queue_stats->pqgprc[i];
- qstats->q_ibytes[map_id] += queue_stats->pqgorc[i];
- qstats->q_errors[map_id] += queue_stats->rqdpc[i];
- }
+ qstats->q_opackets[i] += queue_stats->pqgptc[i];
+ qstats->q_obytes[i] += queue_stats->pqgotc[i];
+ qstats->q_ipackets[i] += queue_stats->pqgprc[i];
+ qstats->q_ibytes[i] += queue_stats->pqgorc[i];
+ qstats->q_errors[i] += queue_stats->rqdpc[i];
}
}
@@ -2231,28 +2213,6 @@ eth_igc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
}
}
-static int
-eth_igc_queue_stats_mapping_set(struct rte_eth_dev *dev,
- uint16_t queue_id, uint8_t stat_idx, uint8_t is_rx)
-{
- struct igc_adapter *igc = IGC_DEV_PRIVATE(dev);
-
- /* check queue id is valid */
- if (queue_id >= IGC_QUEUE_PAIRS_NUM) {
- PMD_DRV_LOG(ERR, "queue id(%u) error, max is %u",
- queue_id, IGC_QUEUE_PAIRS_NUM - 1);
- return -EINVAL;
- }
-
- /* store the mapping status id */
- if (is_rx)
- igc->rxq_stats_map[queue_id] = stat_idx;
- else
- igc->txq_stats_map[queue_id] = stat_idx;
-
- return 0;
-}
-
static int
eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
{
diff --git a/drivers/net/intel/e1000/igc_ethdev.h b/drivers/net/intel/e1000/igc_ethdev.h
index 7fa7877adf..96ff520da7 100644
--- a/drivers/net/intel/e1000/igc_ethdev.h
+++ b/drivers/net/intel/e1000/igc_ethdev.h
@@ -227,8 +227,6 @@ struct igc_adapter {
struct e1000_hw hw;
struct e1000_hw_stats stats;
struct igc_hw_queue_stats queue_stats;
- int16_t txq_stats_map[IGC_QUEUE_PAIRS_NUM];
- int16_t rxq_stats_map[IGC_QUEUE_PAIRS_NUM];
struct igc_interrupt intr;
struct igc_vfta shadow_vfta;
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC 5/7] net/ixgbe: remove queue stats mapping
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
` (3 preceding siblings ...)
2026-05-30 16:09 ` [RFC 4/7] net/e1000: " Stephen Hemminger
@ 2026-05-30 16:10 ` Stephen Hemminger
2026-05-30 16:10 ` [RFC 6/7] net/txgbe: " Stephen Hemminger
` (2 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:10 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin
The support for queue_stats_map has been deprecated since 25.11.
Remove support for queue mapping in ixgbe driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 97 --------------------------
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 9 ---
2 files changed, 106 deletions(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
index 9dc015dfff..a7d995a768 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
@@ -182,10 +182,6 @@ static int ixgbe_dev_xstats_get_names_by_id(
const uint64_t *ids,
struct rte_eth_xstat_name *xstats_names,
unsigned int limit);
-static int ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx);
static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
size_t fw_size);
static int ixgbe_dev_info_get(struct rte_eth_dev *dev,
@@ -511,7 +507,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
.xstats_reset = ixgbe_dev_xstats_reset,
.xstats_get_names = ixgbe_dev_xstats_get_names,
.xstats_get_names_by_id = ixgbe_dev_xstats_get_names_by_id,
- .queue_stats_mapping_set = ixgbe_dev_queue_stats_mapping_set,
.fw_version_get = ixgbe_fw_version_get,
.dev_infos_get = ixgbe_dev_info_get,
.dev_supported_ptypes_get = ixgbe_dev_supported_ptypes_get,
@@ -886,96 +881,6 @@ ixgbe_reset_qstat_mappings(struct ixgbe_hw *hw)
}
}
-
-static int
-ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx)
-{
-#define QSM_REG_NB_BITS_PER_QMAP_FIELD 8
-#define NB_QMAP_FIELDS_PER_QSM_REG 4
-#define QMAP_FIELD_RESERVED_BITS_MASK 0x0f
-
- struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
- struct ixgbe_stat_mapping_registers *stat_mappings =
- IXGBE_DEV_PRIVATE_TO_STAT_MAPPINGS(eth_dev->data->dev_private);
- uint32_t qsmr_mask = 0;
- uint32_t clearing_mask = QMAP_FIELD_RESERVED_BITS_MASK;
- uint32_t q_map;
- uint8_t n, offset;
-
- if ((hw->mac.type != ixgbe_mac_82599EB) &&
- (hw->mac.type != ixgbe_mac_X540) &&
- (hw->mac.type != ixgbe_mac_X550) &&
- (hw->mac.type != ixgbe_mac_X550EM_x) &&
- (hw->mac.type != ixgbe_mac_X550EM_a) &&
- (hw->mac.type != ixgbe_mac_E610))
- return -ENOSYS;
-
- PMD_INIT_LOG(DEBUG, "Setting port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
-
- n = (uint8_t)(queue_id / NB_QMAP_FIELDS_PER_QSM_REG);
- if (n >= IXGBE_NB_STAT_MAPPING_REGS) {
- PMD_INIT_LOG(ERR, "Nb of stat mapping registers exceeded");
- return -EIO;
- }
- offset = (uint8_t)(queue_id % NB_QMAP_FIELDS_PER_QSM_REG);
-
- /* Now clear any previous stat_idx set */
- clearing_mask <<= (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] &= ~clearing_mask;
- else
- stat_mappings->rqsmr[n] &= ~clearing_mask;
-
- q_map = (uint32_t)stat_idx;
- q_map &= QMAP_FIELD_RESERVED_BITS_MASK;
- qsmr_mask = q_map << (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] |= qsmr_mask;
- else
- stat_mappings->rqsmr[n] |= qsmr_mask;
-
- PMD_INIT_LOG(DEBUG, "Set port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
- PMD_INIT_LOG(DEBUG, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n,
- is_rx ? stat_mappings->rqsmr[n] : stat_mappings->tqsm[n]);
-
- /* Now write the mapping in the appropriate register */
- if (is_rx) {
- PMD_INIT_LOG(DEBUG, "Write 0x%x to RX IXGBE stat mapping reg:%d",
- stat_mappings->rqsmr[n], n);
- IXGBE_WRITE_REG(hw, IXGBE_RQSMR(n), stat_mappings->rqsmr[n]);
- } else {
- PMD_INIT_LOG(DEBUG, "Write 0x%x to TX IXGBE stat mapping reg:%d",
- stat_mappings->tqsm[n], n);
- IXGBE_WRITE_REG(hw, IXGBE_TQSM(n), stat_mappings->tqsm[n]);
- }
- return 0;
-}
-
-static void
-ixgbe_restore_statistics_mapping(struct rte_eth_dev *dev)
-{
- struct ixgbe_stat_mapping_registers *stat_mappings =
- IXGBE_DEV_PRIVATE_TO_STAT_MAPPINGS(dev->data->dev_private);
- struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- int i;
-
- /* write whatever was in stat mapping table to the NIC */
- for (i = 0; i < IXGBE_NB_STAT_MAPPING_REGS; i++) {
- /* rx */
- IXGBE_WRITE_REG(hw, IXGBE_RQSMR(i), stat_mappings->rqsmr[i]);
-
- /* tx */
- IXGBE_WRITE_REG(hw, IXGBE_TQSM(i), stat_mappings->tqsm[i]);
- }
-}
-
static void
ixgbe_dcb_init(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
{
@@ -2742,8 +2647,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
RTE_BIT64(idx));
}
- ixgbe_restore_statistics_mapping(dev);
-
err = ixgbe_flow_ctrl_enable(dev, hw);
if (err < 0) {
PMD_INIT_LOG(ERR, "enable flow ctrl err");
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
index 5d3243cb4d..ba826b6d8d 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
@@ -216,11 +216,6 @@ struct ixgbe_interrupt {
uint32_t mask_original;
};
-struct ixgbe_stat_mapping_registers {
- uint32_t tqsm[IXGBE_NB_STAT_MAPPING_REGS];
- uint32_t rqsmr[IXGBE_NB_STAT_MAPPING_REGS];
-};
-
struct ixgbe_vfta {
uint32_t vfta[IXGBE_VFTA_SIZE];
};
@@ -471,7 +466,6 @@ struct ixgbe_adapter {
struct rte_eth_fdir_conf fdir_conf;
struct ixgbe_hw_fdir_info fdir;
struct ixgbe_interrupt intr;
- struct ixgbe_stat_mapping_registers stat_mappings;
struct ixgbe_vfta shadow_vfta;
struct ixgbe_hwstrip hwstrip;
struct ixgbe_dcb_config dcb_config;
@@ -546,9 +540,6 @@ uint16_t ixgbe_vf_representor_tx_burst(void *tx_queue, struct rte_mbuf **tx_pkts
#define IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter) \
(&((struct ixgbe_adapter *)adapter)->fdir)
-#define IXGBE_DEV_PRIVATE_TO_STAT_MAPPINGS(adapter) \
- (&((struct ixgbe_adapter *)adapter)->stat_mappings)
-
#define IXGBE_DEV_PRIVATE_TO_VFTA(adapter) \
(&((struct ixgbe_adapter *)adapter)->shadow_vfta)
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC 6/7] net/txgbe: remove queue stats mapping
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
` (4 preceding siblings ...)
2026-05-30 16:10 ` [RFC 5/7] net/ixgbe: " Stephen Hemminger
@ 2026-05-30 16:10 ` Stephen Hemminger
2026-05-30 16:10 ` [RFC 7/7] ethdev: remove support for " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
7 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:10 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jiawen Wu, Zaiyu Wang
Support for queue stats mapping has been deprecated since 25.11.
Remove support for this ethdev op in txgbe driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/txgbe/txgbe_ethdev.c | 87 +++-----------------------------
drivers/net/txgbe/txgbe_ethdev.h | 13 -----
2 files changed, 7 insertions(+), 93 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 5d360f8305..3886a2cbf4 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -391,60 +391,6 @@ txgbe_disable_intr(struct txgbe_hw *hw)
txgbe_flush(hw);
}
-static int
-txgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx)
-{
- struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev);
- struct txgbe_stat_mappings *stat_mappings =
- TXGBE_DEV_STAT_MAPPINGS(eth_dev);
- uint32_t qsmr_mask = 0;
- uint32_t clearing_mask = QMAP_FIELD_RESERVED_BITS_MASK;
- uint32_t q_map;
- uint8_t n, offset;
-
- if (!txgbe_is_pf(hw))
- return -ENOSYS;
-
- if (stat_idx & ~QMAP_FIELD_RESERVED_BITS_MASK)
- return -EIO;
-
- PMD_INIT_LOG(DEBUG, "Setting port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
-
- n = (uint8_t)(queue_id / NB_QMAP_FIELDS_PER_QSM_REG);
- if (n >= TXGBE_NB_STAT_MAPPING) {
- PMD_INIT_LOG(ERR, "Nb of stat mapping registers exceeded");
- return -EIO;
- }
- offset = (uint8_t)(queue_id % NB_QMAP_FIELDS_PER_QSM_REG);
-
- /* Now clear any previous stat_idx set */
- clearing_mask <<= (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] &= ~clearing_mask;
- else
- stat_mappings->rqsm[n] &= ~clearing_mask;
-
- q_map = (uint32_t)stat_idx;
- q_map &= QMAP_FIELD_RESERVED_BITS_MASK;
- qsmr_mask = q_map << (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] |= qsmr_mask;
- else
- stat_mappings->rqsm[n] |= qsmr_mask;
-
- PMD_INIT_LOG(DEBUG, "Set port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
- PMD_INIT_LOG(DEBUG, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n,
- is_rx ? stat_mappings->rqsm[n] : stat_mappings->tqsm[n]);
- return 0;
-}
-
static void
txgbe_dcb_init(struct txgbe_hw *hw, struct txgbe_dcb_config *dcb_config)
{
@@ -2457,10 +2403,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
{
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
struct txgbe_hw_stats *hw_stats = TXGBE_DEV_STATS(dev);
- struct txgbe_stat_mappings *stat_mappings =
- TXGBE_DEV_STAT_MAPPINGS(dev);
struct txgbe_tx_queue *txq;
- uint32_t i, j;
+ unsigned int i;
txgbe_read_stats_registers(hw, hw_stats);
@@ -2474,29 +2418,13 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
stats->obytes = hw_stats->tx_bytes;
if (qstats != NULL) {
- memset(&qstats->q_ipackets, 0, sizeof(qstats->q_ipackets));
- memset(&qstats->q_opackets, 0, sizeof(qstats->q_opackets));
- memset(&qstats->q_ibytes, 0, sizeof(qstats->q_ibytes));
- memset(&qstats->q_obytes, 0, sizeof(qstats->q_obytes));
- memset(&qstats->q_errors, 0, sizeof(qstats->q_errors));
for (i = 0; i < TXGBE_MAX_QP; i++) {
- uint32_t n = i / NB_QMAP_FIELDS_PER_QSM_REG;
- uint32_t offset = (i % NB_QMAP_FIELDS_PER_QSM_REG) * 8;
- uint32_t q_map;
-
- q_map = (stat_mappings->rqsm[n] >> offset)
- & QMAP_FIELD_RESERVED_BITS_MASK;
- j = (q_map < RTE_ETHDEV_QUEUE_STAT_CNTRS
- ? q_map : q_map % RTE_ETHDEV_QUEUE_STAT_CNTRS);
- qstats->q_ipackets[j] += hw_stats->qp[i].rx_qp_packets;
- qstats->q_ibytes[j] += hw_stats->qp[i].rx_qp_bytes;
-
- q_map = (stat_mappings->tqsm[n] >> offset)
- & QMAP_FIELD_RESERVED_BITS_MASK;
- j = (q_map < RTE_ETHDEV_QUEUE_STAT_CNTRS
- ? q_map : q_map % RTE_ETHDEV_QUEUE_STAT_CNTRS);
- qstats->q_opackets[j] += hw_stats->qp[i].tx_qp_packets;
- qstats->q_obytes[j] += hw_stats->qp[i].tx_qp_bytes;
+ if (i >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ break;
+ qstats->q_ipackets[i] += hw_stats->qp[i].rx_qp_packets;
+ qstats->q_ibytes[i] += hw_stats->qp[i].rx_qp_bytes;
+ qstats->q_opackets[i] += hw_stats->qp[i].tx_qp_packets;
+ qstats->q_obytes[i] += hw_stats->qp[i].tx_qp_bytes;
}
}
@@ -5987,7 +5915,6 @@ static const struct eth_dev_ops txgbe_eth_dev_ops = {
.xstats_reset = txgbe_dev_xstats_reset,
.xstats_get_names = txgbe_dev_xstats_get_names,
.xstats_get_names_by_id = txgbe_dev_xstats_get_names_by_id,
- .queue_stats_mapping_set = txgbe_dev_queue_stats_mapping_set,
.fw_version_get = txgbe_fw_version_get,
.dev_supported_ptypes_get = txgbe_dev_supported_ptypes_get,
.mtu_set = txgbe_dev_mtu_set,
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index 189fbac541..ac977dfc02 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -153,15 +153,6 @@ struct txgbe_interrupt {
uint64_t mask_orig; /* save mask during delayed handler */
};
-#define TXGBE_NB_STAT_MAPPING 32
-#define QSM_REG_NB_BITS_PER_QMAP_FIELD 8
-#define NB_QMAP_FIELDS_PER_QSM_REG 4
-#define QMAP_FIELD_RESERVED_BITS_MASK 0x0f
-struct txgbe_stat_mappings {
- uint32_t tqsm[TXGBE_NB_STAT_MAPPING];
- uint32_t rqsm[TXGBE_NB_STAT_MAPPING];
-};
-
struct txgbe_vfta {
uint32_t vfta[TXGBE_VFTA_SIZE];
};
@@ -355,7 +346,6 @@ struct txgbe_adapter {
struct rte_eth_fdir_conf fdir_conf;
struct txgbe_hw_fdir_info fdir;
struct txgbe_interrupt intr;
- struct txgbe_stat_mappings stat_mappings;
struct txgbe_vfta shadow_vfta;
struct txgbe_hwstrip hwstrip;
struct txgbe_dcb_config dcb_config;
@@ -398,9 +388,6 @@ struct txgbe_adapter {
#define TXGBE_DEV_FDIR(dev) \
(&((struct txgbe_adapter *)(dev)->data->dev_private)->fdir)
-#define TXGBE_DEV_STAT_MAPPINGS(dev) \
- (&((struct txgbe_adapter *)(dev)->data->dev_private)->stat_mappings)
-
#define TXGBE_DEV_VFTA(dev) \
(&((struct txgbe_adapter *)(dev)->data->dev_private)->shadow_vfta)
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC 7/7] ethdev: remove support for queue stats mapping
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
` (5 preceding siblings ...)
2026-05-30 16:10 ` [RFC 6/7] net/txgbe: " Stephen Hemminger
@ 2026-05-30 16:10 ` 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
7 siblings, 2 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-05-30 16:10 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, Andrew Rybchenko
The support for queue stats mapping has 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>
---
doc/guides/nics/features.rst | 7 ----
doc/guides/rel_notes/deprecation.rst | 6 ---
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 --------------------
7 files changed, 157 deletions(-)
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index a075c057ec..0d3476e850 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -748,13 +748,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 17f90a6352..38702b838e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -78,12 +78,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/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 d0273e3f7b..e9bd5ba473 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;
@@ -3997,63 +3992,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 3f4d2438e4..e91eada38c 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -3478,51 +3478,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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [RFC 7/7] ethdev: remove support for queue stats mapping
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
1 sibling, 0 replies; 20+ messages in thread
From: fengchengwen @ 2026-06-01 1:56 UTC (permalink / raw)
To: Stephen Hemminger, dev; +Cc: Thomas Monjalon, Andrew Rybchenko
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 5/31/2026 12:10 AM, Stephen Hemminger wrote:
> The support for queue stats mapping has 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>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC 7/7] ethdev: remove support for queue stats mapping
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
1 sibling, 0 replies; 20+ messages in thread
From: Andrew Rybchenko @ 2026-06-01 8:45 UTC (permalink / raw)
To: Stephen Hemminger, dev; +Cc: Thomas Monjalon
On 5/30/26 7:10 PM, Stephen Hemminger wrote:
> The support for queue stats mapping has 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: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 0/9] Complete removal of queue stats mapping
2026-05-30 16:09 [RFC 0/7] Complete removal of queue stats mapping Stephen Hemminger
` (6 preceding siblings ...)
2026-05-30 16:10 ` [RFC 7/7] ethdev: remove support for " Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 1/9] net/virtio: remove unused " Stephen Hemminger
` (8 more replies)
7 siblings, 9 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
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.
This series finishes the job. The drivers that still implemented the op are
converted to report queue stats directly by queue id (bounded by
RTE_ETHDEV_QUEUE_STAT_CNTRS), and the op, the two public functions, their trace
points, and the documentation are removed from ethdev. The leftover per-driver
mapping tables, accessor macros, and init code go away with them.
Also, found some leftover bits from the earlier removal.
Stephen Hemminger (9):
net/virtio: remove unused queue stats mapping
app/testpmd: remove unused function prototype
net/enic: remove unneeded ops initialization
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: remove queue stats mapping
ethdev: remove support for queue stats mapping
app/test-pmd/cmdline.c | 6 --
app/test-pmd/testpmd.h | 2 -
doc/guides/nics/features.rst | 7 --
doc/guides/rel_notes/deprecation.rst | 6 --
doc/guides/rel_notes/release_26_11.rst | 5 ++
drivers/net/cnxk/cnxk_ethdev.c | 1 -
drivers/net/cnxk/cnxk_ethdev.h | 6 --
drivers/net/cnxk/cnxk_stats.c | 76 ++++++++------------
drivers/net/enic/enic_ethdev.c | 11 ---
drivers/net/intel/e1000/igc_ethdev.c | 54 ++------------
drivers/net/intel/e1000/igc_ethdev.h | 2 -
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 97 -------------------------
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 9 ---
drivers/net/sxe2/sxe2_cmd_chnl.c | 99 --------------------------
drivers/net/sxe2/sxe2_cmd_chnl.h | 10 ---
drivers/net/sxe2/sxe2_ethdev.c | 5 --
drivers/net/sxe2/sxe2_stats.c | 76 +-------------------
drivers/net/sxe2/sxe2_stats.h | 5 --
drivers/net/txgbe/txgbe_ethdev.c | 87 ++--------------------
drivers/net/txgbe/txgbe_ethdev.h | 13 ----
drivers/net/virtio/virtio_ethdev.c | 21 ------
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 ------------
26 files changed, 53 insertions(+), 689 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 1/9] net/virtio: remove unused queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 2/9] app/testpmd: remove unused function prototype Stephen Hemminger
` (7 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Maxime Coquelin, Chenbo Xia
The queue_stats_mapping op in virtio looks like a vestige
from when it was needed to get per queue stats. That hasn't
been true since 25.11 release.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/virtio/virtio_ethdev.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 9fd746b80f..0b2574bd02 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -90,12 +90,6 @@ static int virtio_intr_disable(struct rte_eth_dev *dev);
static int virtio_get_monitor_addr(void *rx_queue,
struct rte_power_monitor_cond *pmc);
-static int virtio_dev_queue_stats_mapping_set(
- struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx);
-
static void virtio_notify_peers(struct rte_eth_dev *dev);
static void virtio_ack_link_announce(struct rte_eth_dev *dev);
@@ -672,8 +666,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
.rss_hash_conf_get = virtio_dev_rss_hash_conf_get,
.reta_update = virtio_dev_rss_reta_update,
.reta_query = virtio_dev_rss_reta_query,
- /* collect stats per queue */
- .queue_stats_mapping_set = virtio_dev_queue_stats_mapping_set,
.vlan_filter_set = virtio_vlan_filter_set,
.mac_addr_add = virtio_mac_addr_add,
.mac_addr_remove = virtio_mac_addr_remove,
@@ -693,8 +685,6 @@ const struct eth_dev_ops virtio_user_secondary_eth_dev_ops = {
.xstats_get_names = virtio_dev_xstats_get_names,
.stats_reset = virtio_dev_stats_reset,
.xstats_reset = virtio_dev_stats_reset,
- /* collect stats per queue */
- .queue_stats_mapping_set = virtio_dev_queue_stats_mapping_set,
};
static void
@@ -2823,16 +2813,5 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
return 0;
}
-/*
- * It enables testpmd to collect per queue stats.
- */
-static int
-virtio_dev_queue_stats_mapping_set(__rte_unused struct rte_eth_dev *eth_dev,
-__rte_unused uint16_t queue_id, __rte_unused uint8_t stat_idx,
-__rte_unused uint8_t is_rx)
-{
- return 0;
-}
-
RTE_LOG_REGISTER_SUFFIX(virtio_logtype_init, init, NOTICE);
RTE_LOG_REGISTER_SUFFIX(virtio_logtype_driver, driver, NOTICE);
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 2/9] app/testpmd: remove unused function prototype
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 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 3/9] net/enic: remove unneeded ops initialization Stephen Hemminger
` (6 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, stable, Aman Singh, Bruce Richardson
The function set_qmap was removed in 25.11 release but
the prototype was still there.
Also, remove leftover help text.
Fixes: 2863cbd9ee6d ("ethdev: deprecate queue stats mapping functions")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/cmdline.c | 6 ------
app/test-pmd/testpmd.h | 2 --
2 files changed, 8 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 10ee7c5179..d299edb88e 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -581,12 +581,6 @@ static void cmd_help_long_parsed(void *parsed_result,
"set port (port_id) rxq (queue_id) avail_thresh (0..99)>\n "
" set available descriptors threshold for Rx queue\n\n"
- "set stat_qmap (tx|rx) (port_id) (queue_id) (qmapping)\n"
- " Set statistics mapping (qmapping 0..15) for RX/TX"
- " queue on port.\n"
- " e.g., 'set stat_qmap rx 0 2 5' sets rx queue 2"
- " on port 0 to mapping 5.\n\n"
-
"set xstats-hide-zero on|off\n"
" Set the option to hide the zero values"
" for xstats display.\n"
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 083171853c..b5643e74f5 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -1158,8 +1158,6 @@ void tx_qinq_set(portid_t port_id, uint16_t vlan_tci, uint16_t vlan_tci_outer);
void tx_vlan_reset(portid_t port_id);
void tx_vlan_pvid_set(portid_t port_id, uint16_t vlan_id, int on);
-void set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value);
-
void set_xstats_hide_zero(uint8_t on_off);
void set_xstats_show_state(uint8_t on_off);
void set_xstats_hide_disabled(uint8_t on_off);
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 3/9] net/enic: remove unneeded ops initialization
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 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 4/9] net/cnxk: remove queue stats mapping Stephen Hemminger
` (5 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, John Daley, Hyong Youb Kim
Better to just let compiler initialize fields to NULL since then
if fields change that driver doesn't use, the driver source
will not need to be changed.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/enic/enic_ethdev.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 2e5cd186f9..648aa67a85 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1119,8 +1119,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
.dev_configure = enicpmd_dev_configure,
.dev_start = enicpmd_dev_start,
.dev_stop = enicpmd_dev_stop,
- .dev_set_link_up = NULL,
- .dev_set_link_down = NULL,
.dev_close = enicpmd_dev_close,
.promiscuous_enable = enicpmd_dev_promiscuous_enable,
.promiscuous_disable = enicpmd_dev_promiscuous_disable,
@@ -1129,14 +1127,10 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
.link_update = enicpmd_dev_link_update,
.stats_get = enicpmd_dev_stats_get,
.stats_reset = enicpmd_dev_stats_reset,
- .queue_stats_mapping_set = NULL,
.dev_infos_get = enicpmd_dev_info_get,
.dev_supported_ptypes_get = enicpmd_dev_supported_ptypes_get,
.mtu_set = enicpmd_mtu_set,
- .vlan_filter_set = NULL,
- .vlan_tpid_set = NULL,
.vlan_offload_set = enicpmd_vlan_offload_set,
- .vlan_strip_queue_set = NULL,
.rx_queue_start = enicpmd_dev_rx_queue_start,
.rx_queue_stop = enicpmd_dev_rx_queue_stop,
.tx_queue_start = enicpmd_dev_tx_queue_start,
@@ -1151,11 +1145,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
.txq_info_get = enicpmd_dev_txq_info_get,
.rx_burst_mode_get = enicpmd_dev_rx_burst_mode_get,
.tx_burst_mode_get = enicpmd_dev_tx_burst_mode_get,
- .dev_led_on = NULL,
- .dev_led_off = NULL,
- .flow_ctrl_get = NULL,
- .flow_ctrl_set = NULL,
- .priority_flow_ctrl_set = NULL,
.mac_addr_add = enicpmd_add_mac_addr,
.mac_addr_remove = enicpmd_remove_mac_addr,
.mac_addr_set = enicpmd_set_mac_addr,
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 4/9] net/cnxk: remove queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
` (2 preceding siblings ...)
2026-07-23 20:28 ` [PATCH v2 3/9] net/enic: remove unneeded ops initialization Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 5/9] net/e1000: " Stephen Hemminger
` (4 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra
The queue stats mapping feature has been deprecated since 25.11.
Remove support in this driver for stats map.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cnxk/cnxk_ethdev.c | 1 -
drivers/net/cnxk/cnxk_ethdev.h | 6 ---
drivers/net/cnxk/cnxk_stats.c | 76 ++++++++++++++--------------------
3 files changed, 31 insertions(+), 52 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index c41959173b..9a4da870cd 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -2103,7 +2103,6 @@ struct eth_dev_ops cnxk_eth_dev_ops = {
.rx_queue_intr_enable = cnxk_nix_rx_queue_intr_enable,
.rx_queue_intr_disable = cnxk_nix_rx_queue_intr_disable,
.pool_ops_supported = cnxk_nix_pool_ops_supported,
- .queue_stats_mapping_set = cnxk_nix_queue_stats_mapping,
.stats_get = cnxk_nix_stats_get,
.stats_reset = cnxk_nix_stats_reset,
.xstats_get = cnxk_nix_xstats_get,
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index fc66135c66..5dd74de577 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -423,10 +423,6 @@ struct cnxk_eth_dev {
/* LSO Tunnel format indices */
uint64_t lso_tun_fmt;
- /* Per queue statistics counters */
- uint32_t txq_stat_map[RTE_ETHDEV_QUEUE_STAT_CNTRS];
- uint32_t rxq_stat_map[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-
/* Security data */
struct cnxk_eth_dev_sec_inb inb;
struct cnxk_eth_dev_sec_outb outb;
@@ -700,8 +696,6 @@ void cnxk_eth_dev_link_status_get_cb(struct roc_nix *nix,
void cnxk_eth_dev_q_err_cb(struct roc_nix *nix, void *data);
int cnxk_nix_link_info_configure(struct rte_eth_dev *eth_dev);
int cnxk_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete);
-int cnxk_nix_queue_stats_mapping(struct rte_eth_dev *dev, uint16_t queue_id,
- uint8_t stat_idx, uint8_t is_rx);
int cnxk_nix_stats_reset(struct rte_eth_dev *dev);
int cnxk_nix_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
struct eth_queue_stats *qstats);
diff --git a/drivers/net/cnxk/cnxk_stats.c b/drivers/net/cnxk/cnxk_stats.c
index d57659ef51..e5d29a78b3 100644
--- a/drivers/net/cnxk/cnxk_stats.c
+++ b/drivers/net/cnxk/cnxk_stats.c
@@ -14,7 +14,8 @@ cnxk_nix_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats,
struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
struct roc_nix *nix = &dev->nix;
struct roc_nix_stats nix_stats;
- int rc = 0, i;
+ unsigned int i;
+ int rc = 0;
rc = roc_nix_stats_get(nix, &nix_stats);
if (rc)
@@ -33,31 +34,35 @@ cnxk_nix_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats,
stats->ibytes = nix_stats.rx_octs;
stats->ierrors = nix_stats.rx_err;
- if (qstats != NULL) {
- for (i = 0; i < RTE_ETHDEV_QUEUE_STAT_CNTRS; i++) {
- struct roc_nix_stats_queue qstats_data;
- uint16_t qidx;
-
- if (dev->txq_stat_map[i] & (1U << 31)) {
- qidx = dev->txq_stat_map[i] & 0xFFFF;
- rc = roc_nix_stats_queue_get(nix, qidx, 0, &qstats_data);
- if (rc)
- goto exit;
- qstats->q_opackets[i] = qstats_data.tx_pkts;
- qstats->q_obytes[i] = qstats_data.tx_octs;
- qstats->q_errors[i] = qstats_data.tx_drop_pkts;
- }
-
- if (dev->rxq_stat_map[i] & (1U << 31)) {
- qidx = dev->rxq_stat_map[i] & 0xFFFF;
- rc = roc_nix_stats_queue_get(nix, qidx, 1, &qstats_data);
- if (rc)
- goto exit;
- qstats->q_ipackets[i] = qstats_data.rx_pkts;
- qstats->q_ibytes[i] = qstats_data.rx_octs;
- qstats->q_errors[i] += qstats_data.rx_drop_pkts;
- }
- }
+ if (qstats == NULL)
+ goto exit;
+
+ for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
+ struct roc_nix_stats_queue qstats_data;
+
+ if (i >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ break;
+
+ rc = roc_nix_stats_queue_get(nix, i, 0, &qstats_data);
+ if (rc)
+ goto exit;
+ qstats->q_opackets[i] = qstats_data.tx_pkts;
+ qstats->q_obytes[i] = qstats_data.tx_octs;
+ qstats->q_errors[i] = qstats_data.tx_drop_pkts;
+ }
+
+ for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
+ struct roc_nix_stats_queue qstats_data;
+
+ if (i >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ break;
+
+ rc = roc_nix_stats_queue_get(nix, i, 1, &qstats_data);
+ if (rc)
+ goto exit;
+ qstats->q_ipackets[i] = qstats_data.rx_pkts;
+ qstats->q_ibytes[i] = qstats_data.rx_octs;
+ qstats->q_errors[i] += qstats_data.rx_drop_pkts;
}
exit:
return rc;
@@ -71,25 +76,6 @@ cnxk_nix_stats_reset(struct rte_eth_dev *eth_dev)
return roc_nix_stats_reset(&dev->nix);
}
-int
-cnxk_nix_queue_stats_mapping(struct rte_eth_dev *eth_dev, uint16_t queue_id,
- uint8_t stat_idx, uint8_t is_rx)
-{
- struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
-
- if (is_rx) {
- if (queue_id >= dev->nb_rxq)
- return -EINVAL;
- dev->rxq_stat_map[stat_idx] = ((1U << 31) | queue_id);
- } else {
- if (queue_id >= dev->nb_txq)
- return -EINVAL;
- dev->txq_stat_map[stat_idx] = ((1U << 31) | queue_id);
- }
-
- return 0;
-}
-
int
cnxk_nix_xstats_get(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *xstats,
unsigned int n)
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 5/9] net/e1000: remove queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
` (3 preceding siblings ...)
2026-07-23 20:28 ` [PATCH v2 4/9] net/cnxk: remove queue stats mapping Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 6/9] net/ixgbe: " Stephen Hemminger
` (3 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Support for queue stats mapping has been deprecated since 25.11.
Remove support for this operation in the e1000 driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/e1000/igc_ethdev.c | 54 ++++------------------------
drivers/net/intel/e1000/igc_ethdev.h | 2 --
2 files changed, 7 insertions(+), 49 deletions(-)
diff --git a/drivers/net/intel/e1000/igc_ethdev.c b/drivers/net/intel/e1000/igc_ethdev.c
index de35da2c36..e5feea10d4 100644
--- a/drivers/net/intel/e1000/igc_ethdev.c
+++ b/drivers/net/intel/e1000/igc_ethdev.c
@@ -239,9 +239,7 @@ static int eth_igc_xstats_get_names_by_id(struct rte_eth_dev *dev,
const uint64_t *ids, struct rte_eth_xstat_name *xstats_names,
unsigned int limit);
static int eth_igc_xstats_reset(struct rte_eth_dev *dev);
-static int
-eth_igc_queue_stats_mapping_set(struct rte_eth_dev *dev,
- uint16_t queue_id, uint8_t stat_idx, uint8_t is_rx);
+
static int
eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id);
static int
@@ -317,7 +315,6 @@ static const struct eth_dev_ops eth_igc_ops = {
.xstats_get_names = eth_igc_xstats_get_names,
.stats_reset = eth_igc_xstats_reset,
.xstats_reset = eth_igc_xstats_reset,
- .queue_stats_mapping_set = eth_igc_queue_stats_mapping_set,
.rx_queue_intr_enable = eth_igc_rx_queue_intr_enable,
.rx_queue_intr_disable = eth_igc_rx_queue_intr_disable,
.flow_ctrl_get = eth_igc_flow_ctrl_get,
@@ -1362,7 +1359,7 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
struct rte_pci_device *pci_dev = RTE_CLASS_TO_BUS_DEVICE(dev, *pci_dev);
struct igc_adapter *igc = IGC_DEV_PRIVATE(dev);
struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
- int i, error = 0;
+ int error = 0;
PMD_INIT_FUNC_TRACE();
dev->dev_ops = ð_igc_ops;
@@ -1493,12 +1490,6 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
/* enable support intr */
igc_intr_other_enable(dev);
- /* initiate queue status */
- for (i = 0; i < IGC_QUEUE_PAIRS_NUM; i++) {
- igc->txq_stats_map[i] = -1;
- igc->rxq_stats_map[i] = -1;
- }
-
igc_flow_init(dev);
igc_clear_all_filter(dev);
return 0;
@@ -2031,7 +2022,6 @@ static int
eth_igc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats,
struct eth_queue_stats *qstats)
{
- struct igc_adapter *igc = IGC_DEV_PRIVATE(dev);
struct e1000_hw *hw = IGC_DEV_PRIVATE_HW(dev);
struct e1000_hw_stats *stats = IGC_DEV_PRIVATE_STATS(dev);
struct igc_hw_queue_stats *queue_stats =
@@ -2070,19 +2060,11 @@ eth_igc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats,
/* Get per-queue statuses */
if (qstats) {
for (i = 0; i < IGC_QUEUE_PAIRS_NUM; i++) {
- /* GET TX queue statuses */
- int map_id = igc->txq_stats_map[i];
- if (map_id >= 0) {
- qstats->q_opackets[map_id] += queue_stats->pqgptc[i];
- qstats->q_obytes[map_id] += queue_stats->pqgotc[i];
- }
- /* Get RX queue statuses */
- map_id = igc->rxq_stats_map[i];
- if (map_id >= 0) {
- qstats->q_ipackets[map_id] += queue_stats->pqgprc[i];
- qstats->q_ibytes[map_id] += queue_stats->pqgorc[i];
- qstats->q_errors[map_id] += queue_stats->rqdpc[i];
- }
+ qstats->q_opackets[i] += queue_stats->pqgptc[i];
+ qstats->q_obytes[i] += queue_stats->pqgotc[i];
+ qstats->q_ipackets[i] += queue_stats->pqgprc[i];
+ qstats->q_ibytes[i] += queue_stats->pqgorc[i];
+ qstats->q_errors[i] += queue_stats->rqdpc[i];
}
}
@@ -2231,28 +2213,6 @@ eth_igc_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
}
}
-static int
-eth_igc_queue_stats_mapping_set(struct rte_eth_dev *dev,
- uint16_t queue_id, uint8_t stat_idx, uint8_t is_rx)
-{
- struct igc_adapter *igc = IGC_DEV_PRIVATE(dev);
-
- /* check queue id is valid */
- if (queue_id >= IGC_QUEUE_PAIRS_NUM) {
- PMD_DRV_LOG(ERR, "queue id(%u) error, max is %u",
- queue_id, IGC_QUEUE_PAIRS_NUM - 1);
- return -EINVAL;
- }
-
- /* store the mapping status id */
- if (is_rx)
- igc->rxq_stats_map[queue_id] = stat_idx;
- else
- igc->txq_stats_map[queue_id] = stat_idx;
-
- return 0;
-}
-
static int
eth_igc_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
{
diff --git a/drivers/net/intel/e1000/igc_ethdev.h b/drivers/net/intel/e1000/igc_ethdev.h
index 7fa7877adf..96ff520da7 100644
--- a/drivers/net/intel/e1000/igc_ethdev.h
+++ b/drivers/net/intel/e1000/igc_ethdev.h
@@ -227,8 +227,6 @@ struct igc_adapter {
struct e1000_hw hw;
struct e1000_hw_stats stats;
struct igc_hw_queue_stats queue_stats;
- int16_t txq_stats_map[IGC_QUEUE_PAIRS_NUM];
- int16_t rxq_stats_map[IGC_QUEUE_PAIRS_NUM];
struct igc_interrupt intr;
struct igc_vfta shadow_vfta;
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 6/9] net/ixgbe: remove queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
` (4 preceding siblings ...)
2026-07-23 20:28 ` [PATCH v2 5/9] net/e1000: " Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 7/9] net/txgbe: " Stephen Hemminger
` (2 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin
The support for queue_stats_map has been deprecated since 25.11.
Remove support for queue mapping in ixgbe driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/ixgbe/ixgbe_ethdev.c | 97 --------------------------
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 9 ---
2 files changed, 106 deletions(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
index c5010f623c..3a4ca0c79b 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
@@ -182,10 +182,6 @@ static int ixgbe_dev_xstats_get_names_by_id(
const uint64_t *ids,
struct rte_eth_xstat_name *xstats_names,
unsigned int limit);
-static int ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx);
static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
size_t fw_size);
static int ixgbe_dev_info_get(struct rte_eth_dev *dev,
@@ -511,7 +507,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
.xstats_reset = ixgbe_dev_xstats_reset,
.xstats_get_names = ixgbe_dev_xstats_get_names,
.xstats_get_names_by_id = ixgbe_dev_xstats_get_names_by_id,
- .queue_stats_mapping_set = ixgbe_dev_queue_stats_mapping_set,
.fw_version_get = ixgbe_fw_version_get,
.dev_infos_get = ixgbe_dev_info_get,
.dev_supported_ptypes_get = ixgbe_dev_supported_ptypes_get,
@@ -886,96 +881,6 @@ ixgbe_reset_qstat_mappings(struct ixgbe_hw *hw)
}
}
-
-static int
-ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx)
-{
-#define QSM_REG_NB_BITS_PER_QMAP_FIELD 8
-#define NB_QMAP_FIELDS_PER_QSM_REG 4
-#define QMAP_FIELD_RESERVED_BITS_MASK 0x0f
-
- struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
- struct ixgbe_stat_mapping_registers *stat_mappings =
- IXGBE_DEV_PRIVATE_TO_STAT_MAPPINGS(eth_dev->data->dev_private);
- uint32_t qsmr_mask = 0;
- uint32_t clearing_mask = QMAP_FIELD_RESERVED_BITS_MASK;
- uint32_t q_map;
- uint8_t n, offset;
-
- if ((hw->mac.type != ixgbe_mac_82599EB) &&
- (hw->mac.type != ixgbe_mac_X540) &&
- (hw->mac.type != ixgbe_mac_X550) &&
- (hw->mac.type != ixgbe_mac_X550EM_x) &&
- (hw->mac.type != ixgbe_mac_X550EM_a) &&
- (hw->mac.type != ixgbe_mac_E610))
- return -ENOSYS;
-
- PMD_INIT_LOG(DEBUG, "Setting port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
-
- n = (uint8_t)(queue_id / NB_QMAP_FIELDS_PER_QSM_REG);
- if (n >= IXGBE_NB_STAT_MAPPING_REGS) {
- PMD_INIT_LOG(ERR, "Nb of stat mapping registers exceeded");
- return -EIO;
- }
- offset = (uint8_t)(queue_id % NB_QMAP_FIELDS_PER_QSM_REG);
-
- /* Now clear any previous stat_idx set */
- clearing_mask <<= (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] &= ~clearing_mask;
- else
- stat_mappings->rqsmr[n] &= ~clearing_mask;
-
- q_map = (uint32_t)stat_idx;
- q_map &= QMAP_FIELD_RESERVED_BITS_MASK;
- qsmr_mask = q_map << (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] |= qsmr_mask;
- else
- stat_mappings->rqsmr[n] |= qsmr_mask;
-
- PMD_INIT_LOG(DEBUG, "Set port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
- PMD_INIT_LOG(DEBUG, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n,
- is_rx ? stat_mappings->rqsmr[n] : stat_mappings->tqsm[n]);
-
- /* Now write the mapping in the appropriate register */
- if (is_rx) {
- PMD_INIT_LOG(DEBUG, "Write 0x%x to RX IXGBE stat mapping reg:%d",
- stat_mappings->rqsmr[n], n);
- IXGBE_WRITE_REG(hw, IXGBE_RQSMR(n), stat_mappings->rqsmr[n]);
- } else {
- PMD_INIT_LOG(DEBUG, "Write 0x%x to TX IXGBE stat mapping reg:%d",
- stat_mappings->tqsm[n], n);
- IXGBE_WRITE_REG(hw, IXGBE_TQSM(n), stat_mappings->tqsm[n]);
- }
- return 0;
-}
-
-static void
-ixgbe_restore_statistics_mapping(struct rte_eth_dev *dev)
-{
- struct ixgbe_stat_mapping_registers *stat_mappings =
- IXGBE_DEV_PRIVATE_TO_STAT_MAPPINGS(dev->data->dev_private);
- struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- int i;
-
- /* write whatever was in stat mapping table to the NIC */
- for (i = 0; i < IXGBE_NB_STAT_MAPPING_REGS; i++) {
- /* rx */
- IXGBE_WRITE_REG(hw, IXGBE_RQSMR(i), stat_mappings->rqsmr[i]);
-
- /* tx */
- IXGBE_WRITE_REG(hw, IXGBE_TQSM(i), stat_mappings->tqsm[i]);
- }
-}
-
static void
ixgbe_dcb_init(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config)
{
@@ -2742,8 +2647,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
RTE_BIT64(idx));
}
- ixgbe_restore_statistics_mapping(dev);
-
err = ixgbe_flow_ctrl_enable(dev, hw);
if (err < 0) {
PMD_INIT_LOG(ERR, "enable flow ctrl err");
diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
index 5d3243cb4d..ba826b6d8d 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
@@ -216,11 +216,6 @@ struct ixgbe_interrupt {
uint32_t mask_original;
};
-struct ixgbe_stat_mapping_registers {
- uint32_t tqsm[IXGBE_NB_STAT_MAPPING_REGS];
- uint32_t rqsmr[IXGBE_NB_STAT_MAPPING_REGS];
-};
-
struct ixgbe_vfta {
uint32_t vfta[IXGBE_VFTA_SIZE];
};
@@ -471,7 +466,6 @@ struct ixgbe_adapter {
struct rte_eth_fdir_conf fdir_conf;
struct ixgbe_hw_fdir_info fdir;
struct ixgbe_interrupt intr;
- struct ixgbe_stat_mapping_registers stat_mappings;
struct ixgbe_vfta shadow_vfta;
struct ixgbe_hwstrip hwstrip;
struct ixgbe_dcb_config dcb_config;
@@ -546,9 +540,6 @@ uint16_t ixgbe_vf_representor_tx_burst(void *tx_queue, struct rte_mbuf **tx_pkts
#define IXGBE_DEV_PRIVATE_TO_FDIR_INFO(adapter) \
(&((struct ixgbe_adapter *)adapter)->fdir)
-#define IXGBE_DEV_PRIVATE_TO_STAT_MAPPINGS(adapter) \
- (&((struct ixgbe_adapter *)adapter)->stat_mappings)
-
#define IXGBE_DEV_PRIVATE_TO_VFTA(adapter) \
(&((struct ixgbe_adapter *)adapter)->shadow_vfta)
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 7/9] net/txgbe: remove queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
` (5 preceding siblings ...)
2026-07-23 20:28 ` [PATCH v2 6/9] net/ixgbe: " Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 8/9] net/sxe2: " Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 9/9] ethdev: remove support for " Stephen Hemminger
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jiawen Wu, Zaiyu Wang
Support for queue stats mapping has been deprecated since 25.11.
Remove support for this ethdev op in txgbe driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/txgbe/txgbe_ethdev.c | 87 +++-----------------------------
drivers/net/txgbe/txgbe_ethdev.h | 13 -----
2 files changed, 7 insertions(+), 93 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 4d2746371b..6349aca90f 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -386,60 +386,6 @@ txgbe_disable_intr(struct txgbe_hw *hw)
txgbe_flush(hw);
}
-static int
-txgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id,
- uint8_t stat_idx,
- uint8_t is_rx)
-{
- struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev);
- struct txgbe_stat_mappings *stat_mappings =
- TXGBE_DEV_STAT_MAPPINGS(eth_dev);
- uint32_t qsmr_mask = 0;
- uint32_t clearing_mask = QMAP_FIELD_RESERVED_BITS_MASK;
- uint32_t q_map;
- uint8_t n, offset;
-
- if (!txgbe_is_pf(hw))
- return -ENOSYS;
-
- if (stat_idx & ~QMAP_FIELD_RESERVED_BITS_MASK)
- return -EIO;
-
- PMD_INIT_LOG(DEBUG, "Setting port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
-
- n = (uint8_t)(queue_id / NB_QMAP_FIELDS_PER_QSM_REG);
- if (n >= TXGBE_NB_STAT_MAPPING) {
- PMD_INIT_LOG(ERR, "Nb of stat mapping registers exceeded");
- return -EIO;
- }
- offset = (uint8_t)(queue_id % NB_QMAP_FIELDS_PER_QSM_REG);
-
- /* Now clear any previous stat_idx set */
- clearing_mask <<= (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] &= ~clearing_mask;
- else
- stat_mappings->rqsm[n] &= ~clearing_mask;
-
- q_map = (uint32_t)stat_idx;
- q_map &= QMAP_FIELD_RESERVED_BITS_MASK;
- qsmr_mask = q_map << (QSM_REG_NB_BITS_PER_QMAP_FIELD * offset);
- if (!is_rx)
- stat_mappings->tqsm[n] |= qsmr_mask;
- else
- stat_mappings->rqsm[n] |= qsmr_mask;
-
- PMD_INIT_LOG(DEBUG, "Set port %d, %s queue_id %d to stat index %d",
- (int)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, stat_idx);
- PMD_INIT_LOG(DEBUG, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n,
- is_rx ? stat_mappings->rqsm[n] : stat_mappings->tqsm[n]);
- return 0;
-}
-
static void
txgbe_dcb_init(struct txgbe_hw *hw, struct txgbe_dcb_config *dcb_config)
{
@@ -2491,10 +2437,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
{
struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
struct txgbe_hw_stats *hw_stats = TXGBE_DEV_STATS(dev);
- struct txgbe_stat_mappings *stat_mappings =
- TXGBE_DEV_STAT_MAPPINGS(dev);
struct txgbe_tx_queue *txq;
- uint32_t i, j;
+ unsigned int i;
txgbe_read_stats_registers(hw, hw_stats);
@@ -2508,29 +2452,13 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats,
stats->obytes = hw_stats->tx_bytes;
if (qstats != NULL) {
- memset(&qstats->q_ipackets, 0, sizeof(qstats->q_ipackets));
- memset(&qstats->q_opackets, 0, sizeof(qstats->q_opackets));
- memset(&qstats->q_ibytes, 0, sizeof(qstats->q_ibytes));
- memset(&qstats->q_obytes, 0, sizeof(qstats->q_obytes));
- memset(&qstats->q_errors, 0, sizeof(qstats->q_errors));
for (i = 0; i < TXGBE_MAX_QP; i++) {
- uint32_t n = i / NB_QMAP_FIELDS_PER_QSM_REG;
- uint32_t offset = (i % NB_QMAP_FIELDS_PER_QSM_REG) * 8;
- uint32_t q_map;
-
- q_map = (stat_mappings->rqsm[n] >> offset)
- & QMAP_FIELD_RESERVED_BITS_MASK;
- j = (q_map < RTE_ETHDEV_QUEUE_STAT_CNTRS
- ? q_map : q_map % RTE_ETHDEV_QUEUE_STAT_CNTRS);
- qstats->q_ipackets[j] += hw_stats->qp[i].rx_qp_packets;
- qstats->q_ibytes[j] += hw_stats->qp[i].rx_qp_bytes;
-
- q_map = (stat_mappings->tqsm[n] >> offset)
- & QMAP_FIELD_RESERVED_BITS_MASK;
- j = (q_map < RTE_ETHDEV_QUEUE_STAT_CNTRS
- ? q_map : q_map % RTE_ETHDEV_QUEUE_STAT_CNTRS);
- qstats->q_opackets[j] += hw_stats->qp[i].tx_qp_packets;
- qstats->q_obytes[j] += hw_stats->qp[i].tx_qp_bytes;
+ if (i >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+ break;
+ qstats->q_ipackets[i] += hw_stats->qp[i].rx_qp_packets;
+ qstats->q_ibytes[i] += hw_stats->qp[i].rx_qp_bytes;
+ qstats->q_opackets[i] += hw_stats->qp[i].tx_qp_packets;
+ qstats->q_obytes[i] += hw_stats->qp[i].tx_qp_bytes;
}
}
@@ -6365,7 +6293,6 @@ static const struct eth_dev_ops txgbe_eth_dev_ops = {
.xstats_reset = txgbe_dev_xstats_reset,
.xstats_get_names = txgbe_dev_xstats_get_names,
.xstats_get_names_by_id = txgbe_dev_xstats_get_names_by_id,
- .queue_stats_mapping_set = txgbe_dev_queue_stats_mapping_set,
.fw_version_get = txgbe_fw_version_get,
.dev_supported_ptypes_get = txgbe_dev_supported_ptypes_get,
.mtu_set = txgbe_dev_mtu_set,
diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index c32c61d8bf..a617b70e3c 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -153,15 +153,6 @@ struct txgbe_interrupt {
uint64_t mask_orig; /* save mask during delayed handler */
};
-#define TXGBE_NB_STAT_MAPPING 32
-#define QSM_REG_NB_BITS_PER_QMAP_FIELD 8
-#define NB_QMAP_FIELDS_PER_QSM_REG 4
-#define QMAP_FIELD_RESERVED_BITS_MASK 0x0f
-struct txgbe_stat_mappings {
- uint32_t tqsm[TXGBE_NB_STAT_MAPPING];
- uint32_t rqsm[TXGBE_NB_STAT_MAPPING];
-};
-
struct txgbe_vfta {
uint32_t vfta[TXGBE_VFTA_SIZE];
};
@@ -355,7 +346,6 @@ struct txgbe_adapter {
struct rte_eth_fdir_conf fdir_conf;
struct txgbe_hw_fdir_info fdir;
struct txgbe_interrupt intr;
- struct txgbe_stat_mappings stat_mappings;
struct txgbe_vfta shadow_vfta;
struct txgbe_hwstrip hwstrip;
struct txgbe_dcb_config dcb_config;
@@ -398,9 +388,6 @@ struct txgbe_adapter {
#define TXGBE_DEV_FDIR(dev) \
(&((struct txgbe_adapter *)(dev)->data->dev_private)->fdir)
-#define TXGBE_DEV_STAT_MAPPINGS(dev) \
- (&((struct txgbe_adapter *)(dev)->data->dev_private)->stat_mappings)
-
#define TXGBE_DEV_VFTA(dev) \
(&((struct txgbe_adapter *)(dev)->data->dev_private)->shadow_vfta)
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 8/9] net/sxe2: remove queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
` (6 preceding siblings ...)
2026-07-23 20:28 ` [PATCH v2 7/9] net/txgbe: " Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
2026-07-23 20:28 ` [PATCH v2 9/9] ethdev: remove support for " Stephen Hemminger
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jie Liu
The queue stats mapping API is removed in 26.11. Drop the
.queue_stats_mapping_set op and the SXE2_DEV_CAPS_OFFLOAD_Q_MAP
handling, along with the now-unused mapping init/reset helpers.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/sxe2/sxe2_cmd_chnl.c | 99 --------------------------------
drivers/net/sxe2/sxe2_cmd_chnl.h | 10 ----
drivers/net/sxe2/sxe2_ethdev.c | 5 --
drivers/net/sxe2/sxe2_stats.c | 76 +-----------------------
drivers/net/sxe2/sxe2_stats.h | 5 --
5 files changed, 3 insertions(+), 192 deletions(-)
diff --git a/drivers/net/sxe2/sxe2_cmd_chnl.c b/drivers/net/sxe2/sxe2_cmd_chnl.c
index b09989fe50..050488301c 100644
--- a/drivers/net/sxe2/sxe2_cmd_chnl.c
+++ b/drivers/net/sxe2/sxe2_cmd_chnl.c
@@ -1609,105 +1609,6 @@ int32_t sxe2_drv_queue_info_get_update(struct sxe2_adapter *adapter, struct eth_
return ret;
}
-int32_t sxe2_drv_rxq_mapping_set(struct rte_eth_dev *eth_dev, uint16_t queue_id, uint8_t pool_idx)
-{
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(eth_dev);
- int32_t ret = 0;
- struct sxe2_common_device *cdev = adapter->cdev;
- struct sxe2_drv_cmd_params param = {0};
- struct sxe2_drv_rx_map_req req = {0};
- struct sxe2_rx_queue *rxq = NULL;
-
- rxq = eth_dev->data->rx_queues[queue_id];
- if (rxq == NULL) {
- PMD_LOG_ERR(DRV, "Rx queue %u is not available or setup",
- queue_id);
- ret = -EINVAL;
- goto l_end;
- }
-
- req.queue_id = rxq->queue_id;
- req.pool_idx = pool_idx;
-
- sxe2_drv_cmd_params_fill(adapter, ¶m, SXE2_DRV_CMD_RX_MAP_SET,
- &req, sizeof(req),
- NULL, 0);
-
- ret = sxe2_drv_cmd_exec(cdev, ¶m);
- if (ret)
- PMD_LOG_ERR(DRV, "get dev caps failed, ret=%d", ret);
-
-l_end:
- return ret;
-}
-
-int32_t sxe2_drv_txq_mapping_set(struct rte_eth_dev *eth_dev, uint16_t queue_id, uint8_t pool_idx)
-{
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(eth_dev);
- int32_t ret = 0;
- struct sxe2_common_device *cdev = adapter->cdev;
- struct sxe2_drv_cmd_params param = {0};
- struct sxe2_drv_tx_map_req req = {0};
- struct sxe2_tx_queue *txq = NULL;
-
- txq = eth_dev->data->tx_queues[queue_id];
- if (txq == NULL) {
- PMD_LOG_ERR(DRV, "Rx queue %u is not available or setup", queue_id);
- ret = -EINVAL;
- goto l_end;
- }
-
- req.queue_id = txq->queue_id;
- req.pool_idx = pool_idx;
-
- sxe2_drv_cmd_params_fill(adapter, ¶m, SXE2_DRV_CMD_TX_MAP_SET,
- &req, sizeof(req),
- NULL, 0);
-
- ret = sxe2_drv_cmd_exec(cdev, ¶m);
- if (ret)
- PMD_LOG_ERR(DRV, "get dev caps failed, ret=%d", ret);
-
-l_end:
- return ret;
-}
-
-int32_t sxe2_drv_mapping_reset(struct rte_eth_dev *eth_dev)
-{
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(eth_dev);
- struct sxe2_drv_cmd_params param = {0};
- struct sxe2_common_device *cdev = adapter->cdev;
- int32_t ret;
-
- sxe2_drv_cmd_params_fill(adapter, ¶m, SXE2_DRV_CMD_TX_RX_MAP_RESET,
- NULL, 0,
- NULL, 0);
-
- ret = sxe2_drv_cmd_exec(cdev, ¶m);
- if (ret)
- PMD_LOG_ERR(DRV, "Reset queue mapping failed, ret=%d", ret);
-
- return ret;
-}
-
-int32_t sxe2_drv_mapping_stats_info_clear(struct rte_eth_dev *eth_dev)
-{
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(eth_dev);
- struct sxe2_drv_cmd_params param = {0};
- struct sxe2_common_device *cdev = adapter->cdev;
- int32_t ret;
-
- sxe2_drv_cmd_params_fill(adapter, ¶m, SXE2_DRV_CMD_TX_RX_MAP_INFO_CLEAR,
- NULL, 0,
- NULL, 0);
-
- ret = sxe2_drv_cmd_exec(cdev, ¶m);
- if (ret)
- PMD_LOG_ERR(DRV, "Clear map stats info failed, ret=%d", ret);
-
- return ret;
-}
-
int32_t sxe2_drv_flow_filter_add(struct sxe2_adapter *adapter, struct sxe2_flow *flow)
{
struct sxe2_drv_flow_filter_req req = { 0 };
diff --git a/drivers/net/sxe2/sxe2_cmd_chnl.h b/drivers/net/sxe2/sxe2_cmd_chnl.h
index d63caad526..f43dcc8e7a 100644
--- a/drivers/net/sxe2/sxe2_cmd_chnl.h
+++ b/drivers/net/sxe2/sxe2_cmd_chnl.h
@@ -102,16 +102,6 @@ int32_t sxe2_drv_queue_info_get_update(struct sxe2_adapter *adapter,
int32_t sxe2_drv_fc_state_get(struct sxe2_adapter *adapter,
struct sxe2_drv_vsi_fc_get_resp *dev_fc_state_resp);
-int32_t sxe2_drv_rxq_mapping_set(struct rte_eth_dev *eth_dev, uint16_t queue_id, uint8_t pool_idx);
-
-int32_t sxe2_drv_txq_mapping_set(struct rte_eth_dev *eth_dev, uint16_t queue_id, uint8_t pool_idx);
-
-int32_t sxe2_drv_mapping_reset(struct rte_eth_dev *eth_dev);
-
-int32_t sxe2_drv_mapping_stats_info_clear(struct rte_eth_dev *eth_dev);
-
-int32_t sxe2_drv_rxq_mapping_set(struct rte_eth_dev *eth_dev, uint16_t queue_id, uint8_t pool_idx);
-
int32_t sxe2_drv_allmulti_config(struct sxe2_adapter *adapter, bool set);
int32_t sxe2_drv_uc_config(struct sxe2_adapter *adapter, struct rte_ether_addr *addr, bool add);
diff --git a/drivers/net/sxe2/sxe2_ethdev.c b/drivers/net/sxe2/sxe2_ethdev.c
index 8bbfdc3a15..440411a65a 100644
--- a/drivers/net/sxe2/sxe2_ethdev.c
+++ b/drivers/net/sxe2/sxe2_ethdev.c
@@ -194,8 +194,6 @@ static const struct eth_dev_ops sxe2_eth_dev_ops = {
.xstats_get_names = sxe2_xstats_names_get,
.xstats_reset = sxe2_stats_info_reset,
- .queue_stats_mapping_set = sxe2_queue_stats_mapping_set,
-
.fw_version_get = sxe2_fw_version_string_get,
.get_monitor_addr = sxe2_get_monitor_addr,
@@ -1309,9 +1307,6 @@ static void sxe2_drv_dev_caps_set(struct sxe2_adapter *adapter,
if (dev_caps->cap_flags & SXE2_DEV_CAPS_OFFLOAD_PTP)
adapter->cap_flags |= SXE2_DEV_CAPS_OFFLOAD_PTP;
- if (dev_caps->cap_flags & SXE2_DEV_CAPS_OFFLOAD_Q_MAP)
- adapter->cap_flags |= SXE2_DEV_CAPS_OFFLOAD_Q_MAP;
-
if (dev_caps->cap_flags & SXE2_DEV_CAPS_OFFLOAD_FC_STATE)
adapter->cap_flags |= SXE2_DEV_CAPS_OFFLOAD_FC_STATE;
}
diff --git a/drivers/net/sxe2/sxe2_stats.c b/drivers/net/sxe2/sxe2_stats.c
index 3ad8fe2fe9..27cd019c1a 100644
--- a/drivers/net/sxe2/sxe2_stats.c
+++ b/drivers/net/sxe2/sxe2_stats.c
@@ -497,90 +497,20 @@ int32_t sxe2_stats_hw_reset(struct rte_eth_dev *dev)
int32_t sxe2_stats_info_reset(struct rte_eth_dev *dev)
{
- int32_t ret;
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(dev);
-
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
return sxe2_mp_req_reset_stats(dev);
- if (adapter->cap_flags & SXE2_DEV_CAPS_OFFLOAD_Q_MAP) {
- ret = sxe2_drv_mapping_stats_info_clear(dev);
- if (ret)
- goto l_end;
- }
-
- ret = sxe2_stats_hw_reset(dev);
- if (ret)
- goto l_end;
-
-l_end:
- return ret;
+ return sxe2_stats_hw_reset(dev);
}
int32_t sxe2_stats_init(struct rte_eth_dev *dev)
{
PMD_INIT_FUNC_TRACE();
- int32_t ret;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- ret = sxe2_queue_stats_map_init(dev);
- if (ret)
- goto l_end;
-
- ret = sxe2_stats_hw_reset(dev);
- if (ret)
- goto l_end;
-
-l_end:
- return ret;
-}
-
-int32_t sxe2_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id, uint8_t pool_idx, uint8_t is_rx)
-{
- int32_t ret = -1;
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(eth_dev);
+ dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
- if (!(adapter->cap_flags & SXE2_DEV_CAPS_OFFLOAD_Q_MAP)) {
- PMD_LOG_ERR(DRV, "VF does not support queue mapping! ");
- goto l_end;
- }
-
- if (is_rx)
- ret = sxe2_drv_rxq_mapping_set(eth_dev, queue_id, pool_idx);
- else
- ret = sxe2_drv_txq_mapping_set(eth_dev, queue_id, pool_idx);
-
- if (ret) {
- PMD_LOG_ERR(DRV, "Queue stats mapping failed ! "
- "queue_id:%u pool_idx:%u", queue_id, pool_idx);
- goto l_end;
- }
-
- PMD_LOG_DEBUG(DRV, "port %u %s queue_id %d stat map to pool[%u] ",
- (uint16_t)(eth_dev->data->port_id), is_rx ? "RX" : "TX",
- queue_id, pool_idx);
-l_end:
- return ret;
-}
-
-int32_t sxe2_queue_stats_map_init(struct rte_eth_dev *dev)
-{
- int32_t ret = 0;
- struct sxe2_adapter *adapter = SXE2_DEV_PRIVATE_TO_ADAPTER(dev);
-
- if (adapter->cap_flags & SXE2_DEV_CAPS_OFFLOAD_Q_MAP) {
- dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
- ret = sxe2_drv_mapping_reset(dev);
- if (ret) {
- PMD_LOG_ERR(DRV, "Queue stats mapping init failed !");
- goto l_end;
- }
- }
-
-l_end:
- return ret;
+ return sxe2_stats_hw_reset(dev);
}
diff --git a/drivers/net/sxe2/sxe2_stats.h b/drivers/net/sxe2/sxe2_stats.h
index 64ac2bb11d..f9cb5a8225 100644
--- a/drivers/net/sxe2/sxe2_stats.h
+++ b/drivers/net/sxe2/sxe2_stats.h
@@ -31,9 +31,4 @@ int32_t sxe2_stats_info_reset(struct rte_eth_dev *dev);
int32_t sxe2_stats_init(struct rte_eth_dev *dev);
-int32_t sxe2_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
- uint16_t queue_id, uint8_t pool_idx, uint8_t is_rx);
-
-int32_t sxe2_queue_stats_map_init(struct rte_eth_dev *dev);
-
#endif
--
2.53.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 9/9] ethdev: remove support for queue stats mapping
2026-07-23 20:28 ` [PATCH v2 0/9] Complete removal of " Stephen Hemminger
` (7 preceding siblings ...)
2026-07-23 20:28 ` [PATCH v2 8/9] net/sxe2: " Stephen Hemminger
@ 2026-07-23 20:28 ` Stephen Hemminger
8 siblings, 0 replies; 20+ messages in thread
From: Stephen Hemminger @ 2026-07-23 20:28 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Chengwen Feng, Andrew Rybchenko,
Thomas Monjalon
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
^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2026-07-23 20:30 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 9/9] ethdev: remove support for " Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox