* [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
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ 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] 10+ 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
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ 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] 10+ 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
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ 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] 10+ 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
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ 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] 10+ 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
2026-05-30 16:10 ` [RFC 7/7] ethdev: remove support for " Stephen Hemminger
6 siblings, 0 replies; 10+ 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] 10+ 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
6 siblings, 0 replies; 10+ 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] 10+ 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
6 siblings, 2 replies; 10+ 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] 10+ 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; 10+ 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] 10+ 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; 10+ 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] 10+ messages in thread