patch 'net/memif: refuse connection on stopped device' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:42:48 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/07/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e0c91a494c7f95e1bc74eec330b070062b6c706f

Thanks.

Luca Boccassi

---
>From e0c91a494c7f95e1bc74eec330b070062b6c706f Mon Sep 17 00:00:00 2001
From: Sriram Yagnaraman <sriram.yagnaraman at ericsson.com>
Date: Fri, 16 Oct 2026 21:58:54 +0200
Subject: [PATCH] net/memif: refuse connection on stopped device

[ upstream commit 98c9ace4c2dd37ff460eb6ea60445e675590193f ]

A memif server cleared ETH_MEMIF_FLAG_DISABLED at dev_start (in
memif_connect_server()) but dev_stop never set it again. memif_create()
sets it, so a never-started server rejects peers, but once started and
then stopped the flag stayed clear and memif_msg_receive_init() kept
accepting connections. A peer connecting to a stopped server bound
pmd->cc and, on the CONNECT message, memif_connect() set
ETH_MEMIF_FLAG_CONNECTED and reported link up on a stopped port.

Set ETH_MEMIF_FLAG_DISABLED in memif_dev_stop() before disconnecting so
a stopped server refuses peers.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Suggested-by: Stephen Hemminger <stephen at networkplumber.org>
Signed-off-by: Sriram Yagnaraman <sriram.yagnaraman at ericsson.com>
---
 drivers/net/memif/rte_eth_memif.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 0df8c140ee7..825c6e9b277 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -1697,6 +1697,12 @@ memif_dev_stop(struct rte_eth_dev *dev)
 	rte_eal_alarm_cancel(memif_bad_desc_disconnect, dev);
 	rte_atomic_store_explicit(&pmd->bad_desc, false, rte_memory_order_relaxed);
 
+	/* Refuse peers while stopped: a server must not accept a connection
+	 * after dev_stop, which would leave a live control channel on a
+	 * stopped port.
+	 */
+	pmd->flags |= ETH_MEMIF_FLAG_DISABLED;
+
 	memif_disconnect(dev);
 
 	for (i = 0; i < dev->data->nb_rx_queues; i++)
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:48.048193850 +0000
+++ 0081-net-memif-refuse-connection-on-stopped-device.patch	2026-11-05 16:42:45.013063535 +0000
@@ -1 +1 @@
-From 98c9ace4c2dd37ff460eb6ea60445e675590193f Mon Sep 17 00:00:00 2001
+From e0c91a494c7f95e1bc74eec330b070062b6c706f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 98c9ace4c2dd37ff460eb6ea60445e675590193f ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index e70443976d..852a7e2e8e 100644
+index 0df8c140ee7..825c6e9b277 100644
@@ -30 +31 @@
-@@ -1699,6 +1699,12 @@ memif_dev_stop(struct rte_eth_dev *dev)
+@@ -1697,6 +1697,12 @@ memif_dev_stop(struct rte_eth_dev *dev)


More information about the stable mailing list