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 703F0A0543 for ; Tue, 21 Jun 2022 10:11:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDDF34280C; Tue, 21 Jun 2022 10:10:55 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2076.outbound.protection.outlook.com [40.107.220.76]) by mails.dpdk.org (Postfix) with ESMTP id DB49B42B75 for ; Tue, 21 Jun 2022 10:10:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SZIEz5Gw1h0MBhe5TbLp3nubzmJsmisBd6L1sceeVymY8XGFg6DFHFmtrbARVlJblBCRa9Bq1WHRY+B3KjD6kUsSfaSMsl/utRYA1yZjC4zWg6XA5BMs/mEzlipRkCICeb4MlTp8Vqt+6N19ryl/QeONwgKpvo8U755+yl0L1YfAuJ1r37/9sqMchtQDHX3gNax8yen2ZDtVo5hkulbKmgChfLspzaWXFtCxv9NshQ1pmJ8XV/uGGIiRAzhCyxmSQdV9kjHn7uNuXI7CnVKAzfVYy8sASFrhZytLQ6qisFMSIpDIvQeY0JE1zixlttP5vii3btcjwcGMnC+W49fq+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6B+WxQpcSmB0SuU80Er0ojWjFkGxJ16JlUfzZwAN+nM=; b=O+PzqdtzblAGzEkv1NeJW510xz76VBbpiNM5m9cDYMzlGZHf0Nq9FOerK5hWhIOXaTwAgy8Z29DBLTdBybovyYRiO7JiacC/Ua3Ua0SbqSBqi6DNXNhbOrR+BdqjGd5lQOz/4quHGkAmuOu+9ko8AlY+26H47oqSWNtlEREoCgV4IaVjOfm6e4An7Rlum1bAyT+APWnZ3jnWZHePyISPNhhzOWRAY7HtkzImtrqaeV+1c86wBXVPunKIWAF4McTLm30Q4DUGaBVzBISn0xkzGVdMNEfPqQdF7bt1PmKLzmd4PeEm24Oh0fmS4m+3+OvHsuGkBLbq1k1O9ml90Xr4+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=corigine.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6B+WxQpcSmB0SuU80Er0ojWjFkGxJ16JlUfzZwAN+nM=; b=TbPwKhjO4tUuqIVZVK5TfbYb10FuXFH2pYRi6Fkxz51AiXLCRQtmrUtt5iZAYLo1bQh+860ccXU+oc6mGNclWWdK+seFsdMnSQq0kd6zn3XdzEQlc+F/1OsHMyj6ra6snL87WZLD8QSkLUOTje3bxHzVzkXkl3aj0KjkCmBRJGX+0HyPgQDK3AQ3yU+DDH4yHpzfpU2Ge1MHoxrvE73FZ1aPCnWgkUQO+MhC2BJUPuF4+mSx21pKjX2NL2Wr8MuZ/6bIfhMNSY2dpiOXFkJ9otCYUHSIg9+AWmj3V/fphcTNQilIRbavcy1HG5mXAdmpQ/Di5vAidzYKH54oIBCZPQ== Received: from BN8PR07CA0011.namprd07.prod.outlook.com (2603:10b6:408:ac::24) by DM4PR12MB5326.namprd12.prod.outlook.com (2603:10b6:5:39a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:10:52 +0000 Received: from BN8NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::47) by BN8PR07CA0011.outlook.office365.com (2603:10b6:408:ac::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.20 via Frontend Transport; Tue, 21 Jun 2022 08:10:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT044.mail.protection.outlook.com (10.13.177.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:10:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:10:44 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:10:42 -0700 From: Xueming Li To: Peng Zhang CC: Yong Xu , Chaoyong He , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , "dpdk stable" Subject: patch 'net/nfp: fix disabling VLAN stripping' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:31 +0300 Message-ID: <20220621080301.2315720-86-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4ec15e38-359f-4cb5-5a3b-08da535d8ede X-MS-TrafficTypeDiagnostic: DM4PR12MB5326:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yFnszCkdkRfq94rIwAABET/WfBIoP0ysHR9hynMxPZMxxd8XNg85MWpTrddqpOnlOqfCwSCRAQ90QUDKjEcqYyT54JrufngedpxV80A4Qr8P1hKlIhwoa/P4+OcOmk3bacHRqPPdFJs3WiX8gMxsYFEejckyvPNoP4u0doA1VxvChcxIjb3xNLxsakZbAHbnTO7OkRSXzjtNQ3JuHXxwQjZwY4/YvrCpYpAq4IDstlz1ycSitC0f3MZK8ulrPHz+uitX1cU2P5iqckdcsBrkZdDGUBzDPCoZGr3uvKCAWuWskMWAQ526choU9nqGccEAaVuXiBfZoQIrvFwjH8ndvkMgL+dsbBtax74oHvWUe5AfBxRAp+Sygl9Bc/6yOwbtJv2u/eXBwfeuRe5f8r+TO3Mx/pQA8f1/8Z7J18ff1bjgJWL81nw5t+fYbeYdBf+vbo+beiZySFRlVdROkodHm4qUYjAAPoytTngyhJkxm8EzueGibe/EyIpcJxHfqhMVQvpCxNK+DMYq3BddDE6BRDEnjY9TTb3L8yzSU9BoFGkrhjNUYgZ+0VxVg+HLiD1UN0qcp6ViFAPR/CeIwOLIB+rTJhVGuvCNEzgHU6CWkTNJpOLmqRZPqHr78afTc8U/Kt/bFHY31ON72eyQgkpgVns5fnDijeJTgvTKe1SS66nzogOGUf8K3FZOpdFfBcNYWr2ZpY0jdikrNm6++/5QLBTMndGde0HUdYq4e/kQE0Zzt4UIOZvXRQIhW6QZztDZNM0NUB9hdqnX/EuPxG4I76/TITtdtCsN6IkptekxShSIvKDeG5eDkXFIipeFz5lkfJmCiMbWZrxLdf5967EkBEgDPSt63u8G0eHyQPFGbBGq1vfijS0jd4bLgcPurqz/7ZosebwTLSjDsUtqIDBMUQ== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(39860400002)(396003)(346002)(40470700004)(46966006)(36840700001)(336012)(70206006)(6666004)(2616005)(1076003)(82740400003)(426003)(81166007)(41300700001)(7696005)(53546011)(47076005)(70586007)(66574015)(26005)(36860700001)(6286002)(186003)(16526019)(356005)(83380400001)(82310400005)(86362001)(8936002)(55016003)(8676002)(36756003)(5660300002)(40480700001)(4326008)(2906002)(316002)(40460700003)(54906003)(478600001)(6916009)(966005)(168613001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:10:51.5659 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ec15e38-359f-4cb5-5a3b-08da535d8ede X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5326 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 20.11.6 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/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/ac86ba961eb3e117a50b91308e423509de580995 Thanks. Xueming Li --- >From ac86ba961eb3e117a50b91308e423509de580995 Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Thu, 26 May 2022 16:34:44 +0200 Subject: [PATCH] net/nfp: fix disabling VLAN stripping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit 7988cdca98940faa80d3e030c1b9811bcdd4c67d ] "vlan set strip off 0" can't work, due to the incorrect usage of the mask, it just represent that the status is changed or not, not represent offloaded or not, so that the driver send the error control message to the nic. Now, by first inspect the mask of things that changed, and then change the requested state if VLAN stripping according the requested offload status. So this change can fix this bug. Fixes: d4a27a3b092a ("nfp: add basic features") Signed-off-by: Peng Zhang Signed-off-by: Yong Xu Signed-off-by: Chaoyong He Signed-off-by: Niklas Söderlund --- drivers/net/nfp/nfp_net.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index fa42548e7a..4fa0bcc9e7 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2393,22 +2393,25 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask) { uint32_t new_ctrl, update; struct nfp_net_hw *hw; + struct rte_eth_conf *dev_conf; int ret; hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private); - new_ctrl = 0; - - /* Enable vlan strip if it is not configured yet */ - if ((mask & ETH_VLAN_STRIP_OFFLOAD) && - !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN)) - new_ctrl = hw->ctrl | NFP_NET_CFG_CTRL_RXVLAN; + dev_conf = &dev->data->dev_conf; + new_ctrl = hw->ctrl; - /* Disable vlan strip just if it is configured */ - if (!(mask & ETH_VLAN_STRIP_OFFLOAD) && - (hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN)) - new_ctrl = hw->ctrl & ~NFP_NET_CFG_CTRL_RXVLAN; + /* + * Vlan stripping setting + * Enable or disable VLAN stripping + */ + if (mask & ETH_VLAN_STRIP_MASK) { + if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP) + new_ctrl |= NFP_NET_CFG_CTRL_RXVLAN; + else + new_ctrl &= ~NFP_NET_CFG_CTRL_RXVLAN; + } - if (new_ctrl == 0) + if (new_ctrl == hw->ctrl) return 0; update = NFP_NET_CFG_UPDATE_GEN; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:53.087178366 +0800 +++ 0085-net-nfp-fix-disabling-VLAN-stripping.patch 2022-06-21 15:37:49.174451737 +0800 @@ -1 +1 @@ -From 7988cdca98940faa80d3e030c1b9811bcdd4c67d Mon Sep 17 00:00:00 2001 +From ac86ba961eb3e117a50b91308e423509de580995 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 7988cdca98940faa80d3e030c1b9811bcdd4c67d ] @@ -19 +21,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ - drivers/net/nfp/nfp_common.c | 25 ++++++++++++++----------- + drivers/net/nfp/nfp_net.c | 25 ++++++++++++++----------- @@ -29,5 +31,5 @@ -diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c -index be68c25fb8..34e3a03edd 100644 ---- a/drivers/net/nfp/nfp_common.c -+++ b/drivers/net/nfp/nfp_common.c -@@ -989,22 +989,25 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask) +diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c +index fa42548e7a..4fa0bcc9e7 100644 +--- a/drivers/net/nfp/nfp_net.c ++++ b/drivers/net/nfp/nfp_net.c +@@ -2393,22 +2393,25 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask) @@ -44 +46 @@ -- if ((mask & RTE_ETH_VLAN_STRIP_OFFLOAD) && +- if ((mask & ETH_VLAN_STRIP_OFFLOAD) && @@ -51 +53 @@ -- if (!(mask & RTE_ETH_VLAN_STRIP_OFFLOAD) && +- if (!(mask & ETH_VLAN_STRIP_OFFLOAD) && @@ -58,2 +60,2 @@ -+ if (mask & RTE_ETH_VLAN_STRIP_MASK) { -+ if (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP) ++ if (mask & ETH_VLAN_STRIP_MASK) { ++ if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)