patch 'common/mlx5: fix MAC deletion on Linux' has been queued to stable release 23.11.7

Shani Peretz shperetz at nvidia.com
Wed Apr 15 12:00:10 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/9cd626c11008656485d20827028d73bfaf320a1b

Thanks.

Shani

---
>From 9cd626c11008656485d20827028d73bfaf320a1b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Fri, 20 Mar 2026 15:14:17 +0100
Subject: [PATCH] common/mlx5: fix MAC deletion on Linux

[ upstream commit c62ff2e6d48b83fb423bea21da98aceb4a00ef41 ]

Re-enable debug logs unconditionally, this helps understanding why mac
deletions were silently failing (while a bridge fdb del command was
working fine).

testpmd> mac_addr add 0 FA:35:44:3F:58:31
testpmd> mac_addr remove 0 FA:35:44:3F:58:31
mlx5_common: Interface 35 cannot remove MAC address FA:35:44:3F:58:31
	Operation not supported

Then, fix mac deletion as the NLM_F_CREATE == 0x200 flag is relevant
with a RTM_NEWNEIGH op.

Since kernel v5.19 though, for a RTM_DELNEIGH op, 0x200 == NLM_F_BULK
and passing this flag makes the deletion fail miserably for a single mac.

Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_nl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index 476ddd7016..8bf7f105a4 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -576,8 +576,8 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
 	} req = {
 		.hdr = {
 			.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)),
-			.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE |
-				NLM_F_EXCL | NLM_F_ACK,
+			.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK |
+				(add ? NLM_F_CREATE | NLM_F_EXCL : 0),
 			.nlmsg_type = add ? RTM_NEWNEIGH : RTM_DELNEIGH,
 		},
 		.ndm = {
@@ -607,7 +607,6 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
 		goto error;
 	return 0;
 error:
-#ifdef RTE_LIBRTE_MLX5_DEBUG
 	{
 		char m[RTE_ETHER_ADDR_FMT_SIZE];
 
@@ -617,7 +616,6 @@ error:
 			iface_idx,
 			add ? "add" : "remove", m, strerror(rte_errno));
 	}
-#endif
 	return -rte_errno;
 }
 
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:35.332487159 +0300
+++ 0069-common-mlx5-fix-MAC-deletion-on-Linux.patch	2026-04-14 14:44:28.768483000 +0300
@@ -1 +1 @@
-From c62ff2e6d48b83fb423bea21da98aceb4a00ef41 Mon Sep 17 00:00:00 2001
+From 9cd626c11008656485d20827028d73bfaf320a1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c62ff2e6d48b83fb423bea21da98aceb4a00ef41 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index eceb3d796f..8b19838a7e 100644
+index 476ddd7016..8bf7f105a4 100644
@@ -34 +35 @@
-@@ -581,8 +581,8 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
+@@ -576,8 +576,8 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
@@ -45 +46 @@
-@@ -612,7 +612,6 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
+@@ -607,7 +607,6 @@ mlx5_nl_mac_addr_modify(int nlsk_fd, unsigned int iface_idx,
@@ -49 +50 @@
--#ifdef RTE_PMD_MLX5_DEBUG
+-#ifdef RTE_LIBRTE_MLX5_DEBUG
@@ -53 +54 @@
-@@ -622,7 +621,6 @@ error:
+@@ -617,7 +616,6 @@ error:


More information about the stable mailing list