patch 'net/mlx5: align PF and VF/SF MAC address handling' has been queued to stable release 23.11.5
Xueming Li
xuemingl at nvidia.com
Thu Jun 26 14:00:48 CEST 2025
Hi,
FYI, your patch has been queued to stable release 23.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 06/28/25. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=c070455e8bd61847c8ac80f1e46162b36653a4ab
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From c070455e8bd61847c8ac80f1e46162b36653a4ab Mon Sep 17 00:00:00 2001
From: Gavin Li <gavinl at nvidia.com>
Date: Fri, 16 May 2025 10:10:32 +0300
Subject: [PATCH] net/mlx5: align PF and VF/SF MAC address handling
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ]
In the mlx5_dev_spawn function, the Virtual Function (VF) synchronizes MAC
addresses from the kernel using netlink. It queries the netdev-configured
MACs and populates the list in the PMD device data, including multicast
MAC addresses. These addresses are later used for control flow creation,
allowing traffic for the listed MACs to be received. However, the Physical
Function (PF) does not synchronize with the kernel and thus does not add
any multicast MAC address rules when enabling traffic. This discrepancy
causes the IFF_ALLMULTI ioctl code to malfunction, as it fails to disable
all multicast traffic, leaving the VF still able to see it.
To align PF and VF behavior, only unicast MAC address flows should be
added.
Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
Signed-off-by: Gavin Li <gavinl at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
drivers/net/mlx5/linux/mlx5_os.c | 3 ++-
drivers/net/mlx5/mlx5_trigger.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index fdc4dc1cf8..c6e5e7b425 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1562,7 +1562,8 @@ err_secondary:
eth_dev->rx_queue_count = mlx5_rx_queue_count;
/* Register MAC address. */
claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
- if (sh->dev_cap.vf && sh->config.vf_nl_en)
+ /* Sync mac addresses for PF or VF/SF if vf_nl_en is true */
+ if ((!sh->dev_cap.vf && !sh->dev_cap.sf) || sh->config.vf_nl_en)
mlx5_nl_mac_addr_sync(priv->nl_socket_route,
mlx5_ifindex(eth_dev),
eth_dev->data->mac_addrs,
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index a61128ec21..6643fe7eea 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
for (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) {
struct rte_ether_addr *mac = &dev->data->mac_addrs[i];
- if (!memcmp(mac, &cmp, sizeof(*mac)))
+ if (!memcmp(mac, &cmp, sizeof(*mac)) || rte_is_multicast_ether_addr(mac))
continue;
memcpy(&unicast.hdr.dst_addr.addr_bytes,
mac->addr_bytes,
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-26 19:59:19.058595974 +0800
+++ 0028-net-mlx5-align-PF-and-VF-SF-MAC-address-handling.patch 2025-06-26 19:59:17.318418047 +0800
@@ -1 +1 @@
-From 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a Mon Sep 17 00:00:00 2001
+From c070455e8bd61847c8ac80f1e46162b36653a4ab Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ]
@@ -20 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index 573e846ed2..696a3e12c7 100644
+index fdc4dc1cf8..c6e5e7b425 100644
@@ -33 +35 @@
-@@ -1603,7 +1603,8 @@ err_secondary:
+@@ -1562,7 +1562,8 @@ err_secondary:
@@ -44 +46 @@
-index 8145ad4233..485984f9b0 100644
+index a61128ec21..6643fe7eea 100644
@@ -47 +49 @@
-@@ -1714,7 +1714,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
+@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
More information about the stable
mailing list