[PATCH 2/2] ethdev: return 0 from dummy queue count
Maxime Leroy
maxime at leroys.fr
Tue Jun 16 11:42:58 CEST 2026
The dummy rx_queue_count/tx_queue_count callback returned -ENOTSUP. On a
port that is not started (freshly allocated, or stopped once the fast-path
ops are reset to dummies) there are no packets queued, so the truthful
answer is 0, not an error: querying the count is not an unsupported
operation. This also matches the dummy Rx/Tx burst, which reports 0
packets.
A poll-mode worker checking rte_eth_rx_queue_count() across a concurrent
port stop then sees an empty queue instead of a negative error.
Fixes: 066f3d9cc21c ("ethdev: remove callback checks from fast path")
Cc: stable at dpdk.org
Suggested-by: Stephen Hemminger <stephen at networkplumber.org>
Signed-off-by: Maxime Leroy <maxime at leroys.fr>
---
lib/ethdev/ethdev_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 70ddce5bfc..eab5c15d12 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -875,7 +875,7 @@ RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_queue_count_dummy)
int
rte_eth_queue_count_dummy(void *queue __rte_unused)
{
- return -ENOTSUP;
+ return 0;
}
RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_descriptor_status_dummy)
--
2.43.0
More information about the dev
mailing list