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 44A55468E4 for ; Thu, 12 Jun 2025 23:08:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4019542E02; Thu, 12 Jun 2025 23:08:56 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id E67F042DD9 for ; Thu, 12 Jun 2025 23:08:54 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-3a35c894313so1268127f8f.2 for ; Thu, 12 Jun 2025 14:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749762534; x=1750367334; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YRlmZHINCMBzBaTKwXjYRdo8LC9FR6kQ9y3ZLoyLnd0=; b=d/0s1/7Ll5Q56tbCK1slTn3Zrr75o0Zrkczdea2Wa6Mlms33MT9cFQhr4LPQ6Q/BDk 9VjtnAQWIzLV94nu58Pm298VxRDz8uGK7wrVDCfqja6FHWdkL47PgId80SKAIQhzxb54 jUZ5Mef//jY0wKQgU5NfxpZyopEaxTAOXaqvTw4zPNvqgV7bYiev8ElQNU7llm4832cU 2U/RERvXiGYXmWeo/PIhNpSo9VZu49xV26J0olsnU182KFvVtwOrnHvJyT2ip4R0+BBb XEwiri32avvX2uPP1VnFkgH99LT/OXZlUBvH753R2atUaFONUKAiJ5EEmjbyI5qA8YTH 7ArA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749762534; x=1750367334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YRlmZHINCMBzBaTKwXjYRdo8LC9FR6kQ9y3ZLoyLnd0=; b=qkv8zx8IDQFlS68rdSMxzsFF/KczS2Ba5LXvdKOxeDfBvT0m3t7xiXSciY1Q0Us0cK Kp7b/4XqE6ifWUGsqdbzbUeFrQ8O+CtORqNAss3cqLaiMA2MFy1NZqp5/LiP1PK+pGxX k0bs5wdo4i1IPDBe4ej86Ndx4cF4oXCrHW2k916XZFVNBnMnVhCK2aOxnGxAW19f/jDW Ozw+InWai/VyAKEX81Zf/xw5fGsaEQmRxnXRT3gzkJn/OpPK7IriJi8oKHMOlrexOhMi SgzjqJhn8uOnaAWr3P0XpemwJ1xzRei9cJzO/kJPM5ZiQK1C+xMoSd9UOAYuJx7J5+sW IOpw== X-Forwarded-Encrypted: i=1; AJvYcCURpjp435ZkM/V1YZJ58w6IRi7gpjDDdJiv9Nc8MP2j1goBilQ9fSaz1Suj8GaZ+GHFbqzIHUw=@dpdk.org X-Gm-Message-State: AOJu0YxE3BP9EwylXfOChfJ0cbiH9f/tlOE8Rw7gaGfWvIYv558YsnRS FNUawLa7B9WD1VjYx/N5xq1Pc8WueBIJoQ0mgWXXLXm6wXbww05suQgFFw/8bCe2 X-Gm-Gg: ASbGncsRYz+y16VN/RSicWn4zoYrNGSCrHe33l+z0hNCdvdyec7ScIBqd8X4bYfBrlQ cKt1iRn024yAMJiNK5M4KySvGh0wxlmJgcc+gFmI6ErLwi+k2P6mO55lqsLv6VCUuGxZcq40eTk vG4r/DkuLG+ESjXUEedGuZroHU2CgnERPLH9sFx19VaFf2MpraZo8YEfHg6L4XIEzwt1q+cH3HC kveqpgSP0PfCEU+nsvymAqV2vQ3dytv8Z3UZ66C4vacZlf0ja6VEaBCoi36hm+m/EozYe6x94Mi OW7u31TiD6OYd9mEwqhhshyGvqxmIUc89Hd9hbV8JIjqyyAws5VJut0vkBaYsNxtRBMBvpvbljE umCE= X-Google-Smtp-Source: AGHT+IHBIW+7MB154FZUQDQJepBBN5QyI4Ih+CsvrmRsbtx/bW8nz5H/IWSI74aWGicDYtDcrAoyYQ== X-Received: by 2002:a5d:5f46:0:b0:3a4:f379:65bc with SMTP id ffacd0b85a97d-3a56874a11fmr602681f8f.40.1749762534333; Thu, 12 Jun 2025 14:08:54 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:f2df:571a:ae4c:bef2]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a568b4e4f1sm353807f8f.87.2025.06.12.14.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 14:08:53 -0700 (PDT) From: luca.boccassi@gmail.com 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 22.11.9 Date: Thu, 12 Jun 2025 22:06:41 +0100 Message-ID: <20250612210733.2506558-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250612210733.2506558-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.9 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/14/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/ed3411217b48130b7aa52cf26022a6f00678e72f Thanks. Luca Boccassi --- >From ed3411217b48130b7aa52cf26022a6f00678e72f 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 b59d559c4f..073d81291a 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1525,7 +1525,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 b2e860d149..198eeb019c 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.dst.addr_bytes, mac->addr_bytes, -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-12 22:06:24.795576766 +0100 +++ 0024-net-mlx5-align-PF-and-VF-SF-MAC-address-handling.patch 2025-06-12 22:06:23.838043962 +0100 @@ -1 +1 @@ -From 2d0665a7f7719e8cd615b64ac9f2c8c22d47450a Mon Sep 17 00:00:00 2001 +From ed3411217b48130b7aa52cf26022a6f00678e72f 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 b59d559c4f..073d81291a 100644 @@ -33 +34 @@ -@@ -1603,7 +1603,8 @@ err_secondary: +@@ -1525,7 +1525,8 @@ err_secondary: @@ -44 +45 @@ -index 8145ad4233..485984f9b0 100644 +index b2e860d149..198eeb019c 100644 @@ -47 +48 @@ -@@ -1714,7 +1714,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev) +@@ -1705,7 +1705,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev) @@ -54 +55 @@ - memcpy(&unicast.hdr.dst_addr.addr_bytes, + memcpy(&unicast.dst.addr_bytes,