* [PATCH V3 2/2] net/mlx5: add support for flows targeting multicast MAC addresses [not found] <20250825141322.974335-1-gavinl@nvidia.com> @ 2025-08-25 14:13 ` Gavin Li 2025-08-25 14:52 ` Thomas Monjalon 0 siblings, 1 reply; 3+ messages in thread From: Gavin Li @ 2025-08-25 14:13 UTC (permalink / raw) To: matan, viacheslavo, orika, thomas, Dariusz Sosnowski, Bing Zhao, Suanming Mou, Minggang Li (Gavin) Cc: dev, rasland, stable 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. Previously, flows for multicast MAC addresses were incorrectly disabled, causing the multicast MAC add API to stop working. As a result, multicast traffic directed to those multicast MAC addresses was not received. To resolve this and update the multicast MAC address rules, create them within mlx5_traffic_enable. Fixes: 2d0665a7f771 ("net/mlx5: align PF and VF/SF MAC address handling") Cc: stable@dpdk.org Signed-off-by: Gavin Li <gavinl@nvidia.com> --- drivers/net/mlx5/mlx5_trigger.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 6c6f228afd..46479fbf09 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1813,7 +1813,10 @@ 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 flows for unicast and multicast mac addresses added by API. */ + if (!memcmp(mac, &cmp, sizeof(*mac)) || + !BITFIELD_ISSET(priv->mac_own, i) || + (dev->data->all_multicast && rte_is_multicast_ether_addr(mac))) continue; memcpy(&unicast.hdr.dst_addr.addr_bytes, mac->addr_bytes, -- 2.34.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V3 2/2] net/mlx5: add support for flows targeting multicast MAC addresses 2025-08-25 14:13 ` [PATCH V3 2/2] net/mlx5: add support for flows targeting multicast MAC addresses Gavin Li @ 2025-08-25 14:52 ` Thomas Monjalon 2025-08-27 14:05 ` Minggang(Gavin) Li 0 siblings, 1 reply; 3+ messages in thread From: Thomas Monjalon @ 2025-08-25 14:52 UTC (permalink / raw) To: Minggang Li (Gavin), Gavin Li Cc: matan, viacheslavo, orika, Dariusz Sosnowski, Bing Zhao, Suanming Mou, stable, dev, rasland, stable 25/08/2025 16:13, Gavin Li: > Rules for multicast MAC addresses are intended to filter multicast traffic > and are managed through multicast MAC add/remove APIs. You should name the functions to be explicit. Also it is not only managed via DPDK API, as you say below we also retrieve kernel addresses. > 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. > > Previously, flows for multicast MAC addresses were incorrectly disabled, > causing the multicast MAC add API to stop working. To be clear, it was blocking addresses added in DPDK, not ones created in kernel, right? > As a result, multicast > traffic directed to those multicast MAC addresses was not received. > > To resolve this and update the multicast MAC address rules, create them > within mlx5_traffic_enable. Actually you allow default rules for multicast addresses to be created. > - if (!memcmp(mac, &cmp, sizeof(*mac)) || rte_is_multicast_ether_addr(mac)) > + /* Add flows for unicast and multicast mac addresses added by API. */ > + if (!memcmp(mac, &cmp, sizeof(*mac)) || > + !BITFIELD_ISSET(priv->mac_own, i) || > + (dev->data->all_multicast && rte_is_multicast_ether_addr(mac))) > continue; PS: you forgot to use --in-reply-to to keep all versions in the same mail thread. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V3 2/2] net/mlx5: add support for flows targeting multicast MAC addresses 2025-08-25 14:52 ` Thomas Monjalon @ 2025-08-27 14:05 ` Minggang(Gavin) Li 0 siblings, 0 replies; 3+ messages in thread From: Minggang(Gavin) Li @ 2025-08-27 14:05 UTC (permalink / raw) To: Thomas Monjalon Cc: matan, viacheslavo, orika, Dariusz Sosnowski, Bing Zhao, Suanming Mou, stable, dev, rasland On 8/25/2025 10:52 PM, Thomas Monjalon wrote: > 25/08/2025 16:13, Gavin Li: >> Rules for multicast MAC addresses are intended to filter multicast traffic >> and are managed through multicast MAC add/remove APIs. > You should name the functions to be explicit. > Also it is not only managed via DPDK API, > as you say below we also retrieve kernel addresses. ACK > >> 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. >> >> Previously, flows for multicast MAC addresses were incorrectly disabled, >> causing the multicast MAC add API to stop working. > To be clear, it was blocking addresses added in DPDK, > not ones created in kernel, right? It was blocking all multicast mac address including those added in DPDK and ones created in kernel. > >> As a result, multicast >> traffic directed to those multicast MAC addresses was not received. >> >> To resolve this and update the multicast MAC address rules, create them >> within mlx5_traffic_enable. > Actually you allow default rules for multicast addresses to be created. > >> - if (!memcmp(mac, &cmp, sizeof(*mac)) || rte_is_multicast_ether_addr(mac)) >> + /* Add flows for unicast and multicast mac addresses added by API. */ >> + if (!memcmp(mac, &cmp, sizeof(*mac)) || >> + !BITFIELD_ISSET(priv->mac_own, i) || >> + (dev->data->all_multicast && rte_is_multicast_ether_addr(mac))) >> continue; > PS: you forgot to use --in-reply-to to keep all versions in the same mail thread. Sorry for the misleading. Will add it in next version. > > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-27 14:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20250825141322.974335-1-gavinl@nvidia.com> 2025-08-25 14:13 ` [PATCH V3 2/2] net/mlx5: add support for flows targeting multicast MAC addresses Gavin Li 2025-08-25 14:52 ` Thomas Monjalon 2025-08-27 14:05 ` Minggang(Gavin) Li
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).