patch 'net/mlx5/windows: fix MAC address ownership tracking' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:23 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/22/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/c96f37e3c822e016d1855876816284288673aeb5
Thanks.
Luca Boccassi
---
>From c96f37e3c822e016d1855876816284288673aeb5 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 5c7e76383f..aba876a075 100644
--- a/drivers/net/mlx5/windows/mlx5_os.c
+++ b/drivers/net/mlx5/windows/mlx5_os.c
@@ -690,23 +690,27 @@ 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.
* @param index
@@ -715,14 +719,16 @@ mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
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
* Pointer to Ethernet device structure.
@@ -738,7 +744,7 @@ int
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;
if (mlx5_get_mac(dev, &lmac.addr_bytes)) {
@@ -753,6 +759,8 @@ mlx5_os_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
"adding new mac address to device is unsupported");
return -ENOTSUP;
}
+ /* Mark this MAC address as owned by the PMD */
+ BITFIELD_SET(priv->mac_own, index);
return 0;
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:46.336068416 +0000
+++ 0081-net-mlx5-windows-fix-MAC-address-ownership-tracking.patch 2026-02-20 14:55:43.296192634 +0000
@@ -1 +1 @@
-From b93dbd8556600bf1ad921dc398575de9f0202339 Mon Sep 17 00:00:00 2001
+From c96f37e3c822e016d1855876816284288673aeb5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b93dbd8556600bf1ad921dc398575de9f0202339 ]
+
@@ -33 +34,0 @@
-Cc: stable at dpdk.org
@@ -42 +43 @@
-index 4eadc872a5..4a00c28009 100644
+index 5c7e76383f..aba876a075 100644
@@ -45 +46 @@
-@@ -689,23 +689,27 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
+@@ -690,23 +690,27 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
@@ -80 +81 @@
-@@ -714,14 +718,16 @@ mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
+@@ -715,14 +719,16 @@ mlx5_os_mac_addr_flush(struct rte_eth_dev *dev)
@@ -101 +102 @@
-@@ -737,7 +743,7 @@ int
+@@ -738,7 +744,7 @@ int
@@ -110 +111 @@
-@@ -752,6 +758,8 @@ mlx5_os_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
+@@ -753,6 +759,8 @@ mlx5_os_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
More information about the stable
mailing list