patch 'net/mlx5/windows: fix MAC address ownership tracking' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:09:49 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

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

Thanks.

Kevin

---
>From 97c21ea2e4d26ad44f470d3d46b5f686b92a0b28 Mon Sep 17 00:00:00 2001
From: Itai Sharoni <isharoni at nvidia.com>
Date: Tue, 9 Dec 2025 14:24:05 +0200
Subject: [PATCH] net/mlx5/windows: fix MAC address ownership tracking

[ upstream commit b93dbd8556600bf1ad921dc398575de9f0202339 ]

The Windows implementation was not properly tracking MAC address
ownership via the mac_own bitfield, unlike the Linux implementation.
This caused issues with control flow creation for MAC addresses.

Commit 8c06434cd9e4 ("net/mlx5: fix multicast") added a check to skip
creating control flows for MAC addresses where the mac_own bit is not
set. Since Windows never set these bits, the primary MAC address flow
was skipped, resulting in packet drops when promiscuous mode is
disabled.

Update all three MAC address ownership functions to properly manage
the mac_own bitfield:

- mlx5_os_mac_addr_add: Set mac_own bit when adding the device's
  primary MAC address (the only MAC that Windows supports)

- mlx5_os_mac_addr_remove: Clear mac_own bit for the specified index
  to maintain internal tracking consistency

- mlx5_os_mac_addr_flush: Iterate and clear all mac_own bits during
  device cleanup

While Windows cannot add or remove MAC addresses from hardware (no
Netlink equivalent), proper bitfield tracking is essential for internal
state consistency and correct control flow management.

Fixes: 8c06434cd9e4 ("net/mlx5: fix multicast")

Signed-off-by: Itai Sharoni <isharoni at nvidia.com>
Acked-by: Bing Zhao <bingz at nvidia.com>
---
 drivers/net/mlx5/windows/mlx5_os.c | 32 +++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c
index 4eadc872a5..4a00c28009 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -690,21 +690,25 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
 /**
  * Flush device MAC addresses
- * Currently it has no support under Windows.
- *
+ * Currently Windows does not support adding and removing MAC addresses,
+ * This function resets the mac_own bit for all MAC addresses for internal tracking.
  * @param dev
  *   Pointer to Ethernet device structure.
- *
  */
 void
 mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
 {
-	(void)dev;
-	DRV_LOG(WARNING, "%s: is not supported", __func__);
+	struct mlx5_priv *priv = dev->data->dev_private;
+	int i;
+
+	for (i = MLX5_MAX_MAC_ADDRESSES - 1; i >= 0; --i) {
+		if (BITFIELD_ISSET(priv->mac_own, i))
+			BITFIELD_RESET(priv->mac_own, i);
+	}
 }
 
 /**
  * Remove a MAC address from device
- * Currently it has no support under Windows.
- *
+ * Currently Windows does not support adding and removing MAC addresses,
+ * This function resets the mac_own bit for the specified index for internal tracking.
  * @param dev
  *   Pointer to Ethernet device structure.
@@ -715,12 +719,14 @@ void
 mlx5_os_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
 {
-	(void)dev;
-	(void)(index);
-	DRV_LOG(WARNING, "%s: is not supported", __func__);
+	struct mlx5_priv *priv = dev->data->dev_private;
+
+	if (index < MLX5_MAX_MAC_ADDRESSES)
+		BITFIELD_RESET(priv->mac_own, index);
 }
 
 /**
  * Adds a MAC address to the device
- * Currently it has no support under Windows.
+ * Currently Windows does not support adding and removing MAC addresses,
+ * This function sets the mac_own bit only if the MAC address already exists.
  *
  * @param dev
@@ -738,5 +744,5 @@ mlx5_os_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
 		     uint32_t index)
 {
-	(void)index;
+	struct mlx5_priv *priv = dev->data->dev_private;
 	struct rte_ether_addr lmac;
 
@@ -753,4 +759,6 @@ mlx5_os_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
 		return -ENOTSUP;
 	}
+	/* Mark this MAC address as owned by the PMD */
+	BITFIELD_SET(priv->mac_own, index);
 	return 0;
 }
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-26 10:16:51.239521051 +0000
+++ 0107-net-mlx5-windows-fix-MAC-address-ownership-tracking.patch	2026-02-26 10:16:47.100459889 +0000
@@ -1 +1 @@
-From b93dbd8556600bf1ad921dc398575de9f0202339 Mon Sep 17 00:00:00 2001
+From 97c21ea2e4d26ad44f470d3d46b5f686b92a0b28 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b93dbd8556600bf1ad921dc398575de9f0202339 ]
+
@@ -33 +34,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list