patch 'net/mlx4: fix fast-path ops setup in secondary process' has been queued to stable release 23.11.7
Shani Peretz
shperetz at nvidia.com
Wed Apr 15 11:59:36 CEST 2026
Hi,
FYI, your patch has been queued to stable release 23.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/19/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/shanipr/dpdk-stable
This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/0fbe0cd50484ebc48a9f4535d81b896ca4ca1bf0
Thanks.
Shani
---
>From 0fbe0cd50484ebc48a9f4535d81b896ca4ca1bf0 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Thu, 26 Feb 2026 17:59:27 -0800
Subject: [PATCH] net/mlx4: fix fast-path ops setup in secondary process
[ upstream commit b801feb51cd712ae4517a99d40ee4701b6612993 ]
The secondary process MLX4_MP_REQ_START_RXTX handler sets
dev->rx_pkt_burst and dev->tx_pkt_burst, but does not update
rte_eth_fp_ops[].rxq.data and txq.data. Since rte_eth_rx_burst()
uses rte_eth_fp_ops (which is process-local), the secondary
retains stale queue data pointers after VF hot-add, causing a
segfault.
Similarly, the MLX4_MP_REQ_STOP_RXTX handler sets dev burst
functions to dummy but does not update rte_eth_fp_ops burst
pointers, leaving the secondary calling into freed resources.
Fix by updating rte_eth_fp_ops rxq.data and txq.data in the
START_RXTX handler, and rte_eth_fp_ops burst function pointers
in the STOP_RXTX handler.
Fixes: 0203d33a1059 ("net/mlx4: support secondary process")
Signed-off-by: Long Li <longli at microsoft.com>
---
drivers/net/mlx4/mlx4_mp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c
index 534cb31151..0784b2d59a 100644
--- a/drivers/net/mlx4/mlx4_mp.c
+++ b/drivers/net/mlx4/mlx4_mp.c
@@ -149,6 +149,10 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
}
#endif
close(mp_msg->fds[0]);
+ rte_eth_fp_ops[param->port_id].rx_pkt_burst = dev->rx_pkt_burst;
+ rte_eth_fp_ops[param->port_id].tx_pkt_burst = dev->tx_pkt_burst;
+ rte_eth_fp_ops[param->port_id].rxq.data = dev->data->rx_queues;
+ rte_eth_fp_ops[param->port_id].txq.data = dev->data->tx_queues;
rte_mb();
mp_init_msg(dev, &mp_res, param->type);
res->result = 0;
@@ -158,6 +162,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
INFO("port %u stopping datapath", dev->data->port_id);
dev->tx_pkt_burst = rte_eth_pkt_burst_dummy;
dev->rx_pkt_burst = rte_eth_pkt_burst_dummy;
+ rte_eth_fp_ops[param->port_id].rx_pkt_burst = rte_eth_pkt_burst_dummy;
+ rte_eth_fp_ops[param->port_id].tx_pkt_burst = rte_eth_pkt_burst_dummy;
rte_mb();
mp_init_msg(dev, &mp_res, param->type);
res->result = 0;
--
2.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-04-14 14:44:32.284761595 +0300
+++ 0035-net-mlx4-fix-fast-path-ops-setup-in-secondary-proces.patch 2026-04-14 14:44:28.575427000 +0300
@@ -1 +1 @@
-From b801feb51cd712ae4517a99d40ee4701b6612993 Mon Sep 17 00:00:00 2001
+From 0fbe0cd50484ebc48a9f4535d81b896ca4ca1bf0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b801feb51cd712ae4517a99d40ee4701b6612993 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list