From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3AD7D46BAE for ; Fri, 18 Jul 2025 21:34:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3535F40611; Fri, 18 Jul 2025 21:34:14 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4A05840611 for ; Fri, 18 Jul 2025 21:34:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=flqJ6q4iKuBnucXW7X76df3N5r9Xh/9Ni4GqpQ61F04=; b=YxrCRIxQLH7bTfiHtPR3Tv7ANgyIzGgOh73lw8ReN+l6MgJVtosPdG/y/XwHu2YqcHEFRQ RicnoGIyySl9HXmP/1FZu3Dqlx9cPBcNdPtVrrbamphAJoSCSLmtsxUM2NUtqzOd3t7PRA 00+j+PA7R6FNYM/wnqQwW0Yd8e4S4qA= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-VggL6bziPq2yrTW2SD8QCw-1; Fri, 18 Jul 2025 15:34:11 -0400 X-MC-Unique: VggL6bziPq2yrTW2SD8QCw-1 X-Mimecast-MFC-AGG-ID: VggL6bziPq2yrTW2SD8QCw_1752867250 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9975D18001F7; Fri, 18 Jul 2025 19:34:10 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1358C180045B; Fri, 18 Jul 2025 19:34:08 +0000 (UTC) From: Kevin Traynor To: Gavin Li Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: align PF and VF/SF MAC address handling' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:29:29 +0100 Message-ID: <20250718193247.1008129-35-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 8_498tOBFD4tCD1C80J8nVeTWjOpzR88yUSkmgxoLPg_1752867250 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 24.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/adce6d130b82cc53366af54a4d3aa5acab3df1df Thanks. Kevin --- >From adce6d130b82cc53366af54a4d3aa5acab3df1df Mon Sep 17 00:00:00 2001 From: Gavin Li Date: Fri, 16 May 2025 10:10:32 +0300 Subject: [PATCH] net/mlx5: align PF and VF/SF MAC address handling [ 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 Acked-by: Viacheslav Ovsiienko --- 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 b740e47404..37819932d1 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1605,5 +1605,6 @@ err_secondary: /* 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), diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index 4ee44e9165..2f679a30cf 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -1715,5 +1715,5 @@ mlx5_traffic_enable(struct rte_eth_dev *dev) 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, -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:12.341986825 +0100 +++ 0035-net-mlx5-align-PF-and-VF-SF-MAC-address-handling.patch 2025-07-18 20:29:10.907907260 +0100 @@ -1 +1 @@ -From 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a Mon Sep 17 00:00:00 2001 +From adce6d130b82cc53366af54a4d3aa5acab3df1df Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ -index 573e846ed2..696a3e12c7 100644 +index b740e47404..37819932d1 100644 @@ -33 +34 @@ -@@ -1604,5 +1604,6 @@ err_secondary: +@@ -1605,5 +1605,6 @@ err_secondary: @@ -42 +43 @@ -index 8145ad4233..485984f9b0 100644 +index 4ee44e9165..2f679a30cf 100644