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 9D814A0524 for ; Thu, 4 Feb 2021 12:31:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7DCB4240738; Thu, 4 Feb 2021 12:31:20 +0100 (CET) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id B48DB24072F for ; Thu, 4 Feb 2021 12:31:18 +0100 (CET) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l7cqz-00058m-St; Thu, 04 Feb 2021 11:31:17 +0000 From: Christian Ehrhardt To: Souvik Dey Cc: Jeff Guo , dpdk stable Date: Thu, 4 Feb 2021 12:28:02 +0100 Message-Id: <20210204112954.2488123-27-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> References: <20210204112954.2488123-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix VLAN stripping in VF' has been queued to stable release 19.11.7 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/06/21. 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/2e89d3c7d976045827b377205f809f09b93101ca Thanks. Christian Ehrhardt --- >From 2e89d3c7d976045827b377205f809f09b93101ca Mon Sep 17 00:00:00 2001 From: Souvik Dey Date: Tue, 15 Dec 2020 08:28:15 -0500 Subject: [PATCH] net/i40e: fix VLAN stripping in VF [ upstream commit 95ba3f72110c10dd51517d6544be64854c5a1208 ] When VF adds VLAN, Linux PF driver enables VLAN stripping by default, this might have issues if the app configured DEV_RX_OFFLOAD_VLAN_STRIP. This behavior of the Linux driver causes confusion with the DPDK app using i40e_pmd. So it is better to reconfigure the vlan_offload, which checks for DEV_RX_OFFLOAD_VLAN_STRIP flag in the dev_conf and enables or disables the vlan strip in the PF. Application cannot use rte_eth_dev_set_vlan_offload() to set the VLAN_STRIP, as this will only work for the first time when original and current config mismatch, but for all subsequent call it will be ignored. Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Souvik Dey Acked-by: Jeff Guo --- drivers/net/i40e/i40e_ethdev_vf.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index f6a47d9a92..9ee1471e8e 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1056,8 +1056,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid) args.out_buffer = vf->aq_resp; args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); - if (err) + if (err) { PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN"); + return err; + } + /** + * In linux kernel driver on receiving ADD_VLAN it enables + * VLAN_STRIP by default. So reconfigure the vlan_offload + * as it was done by the app earlier. + */ + err = i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); + if (err) + PMD_DRV_LOG(ERR, "fail to set vlan_strip"); return err; } -- 2.30.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-04 12:04:29.277298682 +0100 +++ 0027-net-i40e-fix-VLAN-stripping-in-VF.patch 2021-02-04 12:04:27.902789605 +0100 @@ -1 +1 @@ -From 95ba3f72110c10dd51517d6544be64854c5a1208 Mon Sep 17 00:00:00 2001 +From 2e89d3c7d976045827b377205f809f09b93101ca Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 95ba3f72110c10dd51517d6544be64854c5a1208 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index c26b036b85..2faee1d7e1 100644 +index f6a47d9a92..9ee1471e8e 100644 @@ -32 +33 @@ -@@ -1078,8 +1078,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid) +@@ -1056,8 +1056,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid)