[PATCH] net/mlx5: add support for flows targeting multicast MAC addresses
Gavin Li
gavinl at nvidia.com
Thu Aug 7 13:59:42 CEST 2025
Rules for multicast MAC addresses are intended to filter multicast traffic
and are managed through multicast MAC add/remove APIs. In mlx5_dev_spawn
function, devices (PF, VFs, and SFs) retrieve the netdev-configured MAC
addresses via netlink and store them in the PMD device data, which
includes multicast MAC addresses.
To update multicast MAC address rules, create them within
mlx5_traffic_enable.
Fixes: 2d0665a7f771 ("net/mlx5: align PF and VF/SF MAC address handling")
Cc: stable at dpdk.org
Signed-off-by: Gavin Li <gavinl at nvidia.com>
---
drivers/net/mlx5/mlx5_trigger.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 6c6f228afd..6e82a8b021 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1813,7 +1813,8 @@ 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)) || rte_is_multicast_ether_addr(mac))
+ /* Add rules for unicast and multicast mac addresses synchronized from kernel. */
+ if (!memcmp(mac, &cmp, sizeof(*mac)))
continue;
memcpy(&unicast.hdr.dst_addr.addr_bytes,
mac->addr_bytes,
--
2.34.1
More information about the stable
mailing list