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 1583AA0544 for ; Fri, 11 Nov 2022 12:41:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 106214014F; Fri, 11 Nov 2022 12:41:34 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id BD2754014F for ; Fri, 11 Nov 2022 12:41:31 +0100 (CET) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 7EAA63F0C8 for ; Fri, 11 Nov 2022 11:41:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166891; bh=J8gKQEsJImEbz5RnvliJLuYR4NtNk2u2wz0bXLwqbK8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=o9ff9FjODYLijXLBYyxWlLIDiON8RcN/qwsEhVfUk8/nKV5qDKwSilwo6NrW4waXo ubtIbuvEFMUToTocTJ0TX24oUNL0G9vKPIjCpx+vGesyju22k7jBnno7aL6RcHMmRG RqY973B+BI5NlA1RR25Py7gWSAU5p5hURrzf8e6awt9xkm44wMvAPH4PBnsE6OHdzO 38fUDRp0NHVDXZl0QgpLJAOwK4ewJ20dPs7UBhjIj72tQNaaeKGRIzIeL2ZI+ZjMNG ygubvs9hglpATD/0yPbODnmw2ppzrkjYwMc9xMAeCqY6HFtysX7WdzFmry41clHy0c 6YpjI1B3kneKg== Received: by mail-ej1-f72.google.com with SMTP id qf25-20020a1709077f1900b0078c02a23da3so2896603ejc.0 for ; Fri, 11 Nov 2022 03:41:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=J8gKQEsJImEbz5RnvliJLuYR4NtNk2u2wz0bXLwqbK8=; b=yIxpxbJUQxOJjo380vl+RUPVnjhzMlRPkPK4mZp197pipjUde69QVmTxtGRUmooT30 0YISIvkobi4vFTclGpPCcuAyIg3ocByXTpmqhkRJL0e84Bn+byY5EzsSGvSb7QSVpxwA XqCp0Nb2hRxgI2bBz73EW9pENA9z8vLXJYlCYDdexKV3sdIy0S4EAeRszm6xy6uxq9h9 iMfN5B3puTs4F6LhGHodF7cnDtlHNnsK6NAJhaENpWepZwTbmJXDl+b230vOjSrA7/9M S0+n6IgGVBqE8Gm2tcZqqXzpeVhtlIJ3bFQK9+khXFW0Fz5DnP2WGCe3emOO1ObJIAod 4McA== X-Gm-Message-State: ANoB5pkvrxZEEUcD3YWG3ev5CJp15mE4CrKWrQ3JRCpeYcHq7CkSbJcw ccNQnmf4nvZW/zRuQPhz6kMdMBSn0BHovhsyBHYfS1BLzIrdrSCcypTWm2NzYHDAtWdLI9RJN/m 3I79yvU9xIhCc4/1q1rG/aamN X-Received: by 2002:aa7:cd67:0:b0:464:b8b:f594 with SMTP id ca7-20020aa7cd67000000b004640b8bf594mr1053900edb.407.1668166890827; Fri, 11 Nov 2022 03:41:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf6p42JPnYad3/GZnc1/7clipjFEq6P12olCwh2xzqg0TOvsNjOhtJKWi59sTdPPXbOQ3aT08g== X-Received: by 2002:aa7:cd67:0:b0:464:b8b:f594 with SMTP id ca7-20020aa7cd67000000b004640b8bf594mr1053886edb.407.1668166890596; Fri, 11 Nov 2022 03:41:30 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id vu6-20020a170907a64600b007ae10525550sm790919ejc.47.2022.11.11.03.41.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:41:29 -0800 (PST) From: christian.ehrhardt@canonical.com To: Olivier Matz Cc: Wenjun Wu , dpdk stable Subject: patch 'net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF' has been queued to stable release 19.11.14 Date: Fri, 11 Nov 2022 12:39:00 +0100 Message-Id: <20221111113904.1549618-43-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 19.11.14 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/18/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/d9e8c1953e8bf40853125012ad7c12eb8171bdd2 Thanks. Christian Ehrhardt --- >From d9e8c1953e8bf40853125012ad7c12eb8171bdd2 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Thu, 29 Sep 2022 14:09:01 +0200 Subject: [PATCH] net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 15ce76460a681b133709475f0eb5dbe12bb61b32 ] When the promiscuous mode is enabled on a VF, the IXGBE_VMOLR_VPE bit (VLAN Promiscuous Enable) is set. This means that the VF will receive packets whose VLAN is not the same as the VLAN of the VF. For instance, in this situation: ┌────────┐ ┌────────┐ ┌────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ VF0├────┤VF1 VF2├────┤VF3 │ │ │ │ │ │ │ └────────┘ └────────┘ └────────┘ VM1 VM2 VM3 vf 0: vlan 1000 vf 1: vlan 1000 vf 2: vlan 1001 vf 3: vlan 1001 If we tcpdump on VF3, we see all the packets, even those transmitted on vlan 1000. This behavior prevents to bridge VF1 and VF2 in VM2, because it will create a loop: packets transmitted on VF1 will be received by VF2 and vice-versa, and bridged again through the software bridge. This patch remove the activation of VLAN Promiscuous when a VF enables the promiscuous mode. However, the IXGBE_VMOLR_UPE bit (Unicast Promiscuous) is kept, so that a VF receives all packets that has the same VLAN, whatever the destination MAC address. A similar patch was accepted in Linux kernel (see link). Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7bb0fb7c63df Fixes: 0355c379b71f ("net/ixgbe: support VF promiscuous by PF driver") Signed-off-by: Olivier Matz Acked-by: Wenjun Wu --- drivers/net/ixgbe/ixgbe_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 5a71eb061d..fab9d99fb8 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -778,9 +778,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) return -1; } - disable = 0; + disable = IXGBE_VMOLR_VPE; enable = IXGBE_VMOLR_BAM | IXGBE_VMOLR_ROMPE | - IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE | IXGBE_VMOLR_VPE; + IXGBE_VMOLR_MPE | IXGBE_VMOLR_UPE; break; default: return -1; -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:06.283833958 +0100 +++ 0043-net-ixgbe-fix-unexpected-VLAN-Rx-in-promisc-mode-on-.patch 2022-11-11 12:35:04.805192238 +0100 @@ -1 +1 @@ -From 15ce76460a681b133709475f0eb5dbe12bb61b32 Mon Sep 17 00:00:00 2001 +From d9e8c1953e8bf40853125012ad7c12eb8171bdd2 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 15ce76460a681b133709475f0eb5dbe12bb61b32 ] + @@ -44 +45,0 @@ -Cc: stable@dpdk.org @@ -53 +54 @@ -index c5ef940533..0a0f639e39 100644 +index 5a71eb061d..fab9d99fb8 100644 @@ -56 +57 @@ -@@ -771,9 +771,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf) +@@ -778,9 +778,9 @@ ixgbe_set_vf_mc_promisc(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)