patch 'ethdev: keep fast-path operations valid after stop' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Tue Jul 28 17:56:59 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/f8583af949d10cd4638a1a94c4d9de3e8568307e
Thanks.
Kevin
---
>From f8583af949d10cd4638a1a94c4d9de3e8568307e Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime at leroys.fr>
Date: Tue, 16 Jun 2026 11:42:57 +0200
Subject: [PATCH] ethdev: keep fast-path operations valid after stop
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 9abca3e4703285ca3b5bbc80e8d3d6b5d76480c3 ]
eth_dev_fp_ops_reset() restores a port's fast-path ops on stop/release
via a compound literal, so every field it omits is zeroed to NULL. It
sets only rx_pkt_burst/tx_pkt_burst (and the rxq/txq data), leaving
rx_queue_count, tx_queue_count, rx/tx_descriptor_status, tx_pkt_prepare
and the recycle callbacks NULL.
In non-debug builds these ops are reached through an unguarded indirect
call (the NULL check exists only under RTE_ETHDEV_DEBUG_RX/TX). So a
thread calling e.g. rte_eth_rx_queue_count() on a port being stopped
dereferences NULL and crashes, while the same race on rte_eth_rx_burst()
is harmless because the burst ops are reset to dummies. A poll-mode
worker re-checking rx_queue_count before arming the Rx interrupt and
sleeping hits exactly this.
Reset these non-burst ops to the same dummies eth_dev_set_dummy_fops()
installs, so a stopped port behaves like a freshly allocated one: every
fast-path op is a safe no-op, none is NULL.
Fixes: 066f3d9cc21c ("ethdev: remove callback checks from fast path")
Signed-off-by: Maxime Leroy <maxime at leroys.fr>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
lib/ethdev/ethdev_private.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/ethdev/ethdev_private.c b/lib/ethdev/ethdev_private.c
index 72a0723846..75ea3eedff 100644
--- a/lib/ethdev/ethdev_private.c
+++ b/lib/ethdev/ethdev_private.c
@@ -264,4 +264,11 @@ eth_dev_fp_ops_reset(struct rte_eth_fp_ops *fpo)
.rx_pkt_burst = dummy_eth_rx_burst,
.tx_pkt_burst = dummy_eth_tx_burst,
+ .tx_pkt_prepare = rte_eth_tx_pkt_prepare_dummy,
+ .rx_queue_count = rte_eth_queue_count_dummy,
+ .tx_queue_count = rte_eth_queue_count_dummy,
+ .rx_descriptor_status = rte_eth_descriptor_status_dummy,
+ .tx_descriptor_status = rte_eth_descriptor_status_dummy,
+ .recycle_tx_mbufs_reuse = rte_eth_recycle_tx_mbufs_reuse_dummy,
+ .recycle_rx_descriptors_refill = rte_eth_recycle_rx_descriptors_refill_dummy,
.rxq = {
.data = (void **)&dummy_queues_array[port_id],
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-28 16:54:53.388462110 +0100
+++ 0089-ethdev-keep-fast-path-operations-valid-after-stop.patch 2026-07-28 16:54:50.847506425 +0100
@@ -1 +1 @@
-From 9abca3e4703285ca3b5bbc80e8d3d6b5d76480c3 Mon Sep 17 00:00:00 2001
+From f8583af949d10cd4638a1a94c4d9de3e8568307e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 9abca3e4703285ca3b5bbc80e8d3d6b5d76480c3 ]
+
@@ -28 +29,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list