[PATCH 25.11] net/iavf: report selected burst mode when no-poll active
Ciara Loftus
ciara.loftus at intel.com
Wed Aug 5 10:59:36 CEST 2026
[ upstream commit f860b4377b48af826e8629e3968235a73098e880 ]
When the no-poll feature is enabled, the device burst functions point at
the no-poll wrapper for the lifetime of the port. As the wrapper occupies
the "Disabled" slot in the burst mode path-info tables, the Rx/Tx burst
mode was always reported as "Disabled" regardless of link state, even
though the wrapper only drops traffic while the link is down and otherwise
dispatches to the selected path.
Report the burst mode of the selected path directly by indexing the
path-info tables with the selected path type. This fixes the misreport
while the no-poll wrapper is active and also simplifies the burst mode
lookup: the previous pointer comparison and table search loop are no
longer needed.
Fixes: 0d5a856f5be9 ("net/iavf: support Rx/Tx burst mode info")
Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.c | 40 +++++++++++++++---------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 44f39074e1..c02101865b 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -3970,18 +3970,18 @@ iavf_rx_burst_mode_get(struct rte_eth_dev *dev,
__rte_unused uint16_t queue_id,
struct rte_eth_burst_mode *mode)
{
- eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
- size_t i;
+ struct iavf_adapter *adapter =
+ IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+ enum iavf_rx_func_type rx_func_type = adapter->rx_func_type;
- for (i = 0; i < RTE_DIM(iavf_rx_path_infos); i++) {
- if (pkt_burst == iavf_rx_path_infos[i].pkt_burst) {
- snprintf(mode->info, sizeof(mode->info), "%s",
- iavf_rx_path_infos[i].info);
- return 0;
- }
- }
+ if ((size_t)rx_func_type >= RTE_DIM(iavf_rx_path_infos) ||
+ iavf_rx_path_infos[rx_func_type].info == NULL)
+ return -EINVAL;
- return -EINVAL;
+ snprintf(mode->info, sizeof(mode->info), "%s",
+ iavf_rx_path_infos[rx_func_type].info);
+
+ return 0;
}
static const struct {
@@ -4013,18 +4013,18 @@ iavf_tx_burst_mode_get(struct rte_eth_dev *dev,
__rte_unused uint16_t queue_id,
struct rte_eth_burst_mode *mode)
{
- eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
- size_t i;
+ struct iavf_adapter *adapter =
+ IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+ enum iavf_tx_func_type tx_func_type = adapter->tx_func_type;
- for (i = 0; i < RTE_DIM(iavf_tx_pkt_burst_ops); i++) {
- if (pkt_burst == iavf_tx_pkt_burst_ops[i].pkt_burst) {
- snprintf(mode->info, sizeof(mode->info), "%s",
- iavf_tx_pkt_burst_ops[i].info);
- return 0;
- }
- }
+ if ((size_t)tx_func_type >= RTE_DIM(iavf_tx_pkt_burst_ops) ||
+ iavf_tx_pkt_burst_ops[tx_func_type].info == NULL)
+ return -EINVAL;
- return -EINVAL;
+ snprintf(mode->info, sizeof(mode->info), "%s",
+ iavf_tx_pkt_burst_ops[tx_func_type].info);
+
+ return 0;
}
static uint16_t
--
2.43.0
More information about the stable
mailing list