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 1E555A034F for ; Wed, 10 Nov 2021 07:43:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 121CD4014D; Wed, 10 Nov 2021 07:43:39 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2084.outbound.protection.outlook.com [40.107.237.84]) by mails.dpdk.org (Postfix) with ESMTP id B939B4014D for ; Wed, 10 Nov 2021 07:43:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RoMuh2i+NnMBWxP0gD+k5421foJOHjBaqFAILHBRx6tPz9VK+TA1W4B75MFrz3Ao4uTFcwSYaGapHxHXBV4BL93yuM+ndv05+OSWwSe+mvQGlDTGCrdvO4uMch2V46OUe8voNW5yeBPIpivT3iZ5weCQ+F91vYPfW6agmb8Q7+kvArbYlgjLwgXPXMOLJKQOalvZXbVQ251BAJXAdoybygZV80CdZcLNzmG0Pa3t2j0x5dOVBvizalddTrJQEcRzK1iUiof66/jZXeqSev35v30RtGkW5yfjhTn+Mx6qzzouAAFA7y3NjZ8Mw7i/S+ZhK/Oa1arL9G6Bj0iJfNln7A== 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=KCRDIPFoKaRlT6taBKJfm+qotbXr0ufPns6o794X/vk=; b=JLHJxrO3hmVGTHrzDjCrtHvL3Yb+06b8m493NBRLoJVga65isrvi8jdsbBOP1FDK1oe4tHf4+rP92DXwOh2Hne6vDG5Akdfw4hu4Ql+alPEQgpFxqvIL0JIpzL0xej4sWOf3kBlKZzf/ArXHLhqLh8bz8hTMtQyZ+SjhuuwIyOGa5KLBak9QW8ab2KHJAcIdEjViDOv3QB35+yLAAuOf7JbvxE930Kh/b1LEI+dpm67q3sFWh1NjP3AkURxKzqVTtbda1YadH1srwQSWQ6aRR1YYCuvycZWmp6ory7lJ/Lhm8Rw5deoSnAA+v8UROxc8FYxFccWfZK4sjNBRbi0DqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=KCRDIPFoKaRlT6taBKJfm+qotbXr0ufPns6o794X/vk=; b=I2m3uqY9k0GnLasbkp2Yfke84wnMAGzddzA9sELfX4vJ4zCzgoBcQzbHoszAgXyZBBtasxlxc3AHqDDoOg3Q6q3mo7I9StemAT8sJwlnpTNgvXrU1TSNxBeq/NbwJanXtaEoZcpl//ATM3fUQIlC1STnpOpHum4NZ4g4AFCam6AjuZ0EK2vS+YJ/z1BCX3vQNSKdSlE7gOg8Pnx55naUr3+iDkjjH+tqzBB5wVNV6PqdIbXHuIle6gOV8oQX+BP5s353AEDi6BcyIJc5cJrJit5nmjt6DrBzDHbXRtI/NXlJvNrJta24SYWYXWPL/IrT3s9optKni5ehzDCjEusvWw== Received: from DM6PR02CA0131.namprd02.prod.outlook.com (2603:10b6:5:1b4::33) by SJ0PR12MB5485.namprd12.prod.outlook.com (2603:10b6:a03:305::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 10 Nov 2021 06:43:35 +0000 Received: from DM6NAM11FT029.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1b4:cafe::65) by DM6PR02CA0131.outlook.office365.com (2603:10b6:5:1b4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16 via Frontend Transport; Wed, 10 Nov 2021 06:43:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT029.mail.protection.outlook.com (10.13.173.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:43:35 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:43:33 +0000 From: Xueming Li To: Ajit Khaparde CC: Luca Boccassi , Lance Richardson , dpdk stable Date: Wed, 10 Nov 2021 14:29:44 +0800 Message-ID: <20211110063216.2744012-101-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc22f6c7-dc0c-4824-1add-08d9a4156b9a X-MS-TrafficTypeDiagnostic: SJ0PR12MB5485: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2l9KExu3BnADYJ/W5E7qhLxXAZjHDkFsRMpUh0oj2xV/iEJR6XB0+3+GyfZ8dRfzd/y2EnLUFwJuQzKMR1GWVPzIsb9BfqEbWH9vB6mll9sK1zjEKin9ECahxD4s2NAMVK51hZmI9QQMtNlzwS2GOlxOFnVQvyl3tWRHPFP7SvrxkSvt7MJc5TEmiPTRWv0cC2D+shjy3qZrNNccZdv8EWBbv/NX1RL4HUJXTh+JPncwEoxrVicXZeHETFXcndy6WUsg3IsSURXbZg2uMB4bkb3I2J3zV7T4RzknJtuzI/g+Rwvrupvsq63KNejBeS6UBwJXpvKEQW/IbpgeeD2os8v8oB3jh2bi3Qu9wJitFskjvPMAmoP6hqLymTzo5lwmimgS5jhS2ps0f7+xoxd92IiXYNJiyVkT6+YFWb1C38r4GRmDCdHhnQixvPVPgvlnvFQUVMKvG7RFJXVhIfW9ar8kgszGGMO0QAS7gnYStODeYukWU1cN7sAkWPTrNPLc4KLNNBsYkiiCs8kQeG3kXqkbWlI/H/yTw7ymXMojegBn+yrAcmQTnrpjmYxtZt083nqkpv8vpMYw5RP4NIdXYMIQDbmZkAbyGJ3RAJImRDdJFA1FRwT9n9fgnDoGnm8+Bxvhkv5EAZY2NynZBaotCNdxHcjjwUOjHDkBq1WoXjiLHYH6i5gk3Lsa6NlbsIUx5j2RLmHSChfi1Zkw3GJx6ZLG8b2JKxiT5TF8oBwuuPtJpX865+fVAFuDBpLjTOLF9j7ennPMkWMGdHDEo7JlWsMNAX5QceqLsg3FFbAX5hrwv9GIa+IBZrIIsn8naGOBaH9xMQsT8p5P3dL9foNlZQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(2906002)(8936002)(53546011)(36860700001)(4326008)(7636003)(966005)(1076003)(82310400003)(4001150100001)(6286002)(83380400001)(7696005)(5660300002)(336012)(47076005)(508600001)(16526019)(2616005)(6916009)(6666004)(55016002)(356005)(54906003)(36906005)(70586007)(15650500001)(316002)(86362001)(36756003)(26005)(70206006)(426003)(186003)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:43:35.5036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc22f6c7-dc0c-4824-1add-08d9a4156b9a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT029.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5485 Subject: [dpdk-stable] patch 'net/bnxt: fix tunnel port accounting' has been queued to stable release 20.11.4 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 20.11.4 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/12/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/95cf6a360f53518035593218892362d7d3c402cd Thanks. Xueming Li --- >From 95cf6a360f53518035593218892362d7d3c402cd Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Fri, 24 Sep 2021 12:52:47 -0700 Subject: [PATCH] net/bnxt: fix tunnel port accounting Cc: Xueming Li [ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ] Fix the tunnel port counting logic. Currently we are incrementing the port count without checking the if bnxt_hwrm_tunnel_dst_port_alloc would return success or failure. Modify the logic to increment it only if the firmware returns success. Fixes: 10d074b2022d ("net/bnxt: support tunneling") Signed-off-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 55034bccb5..e67e83ea7a 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2286,7 +2286,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, } tunnel_type = HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN; - bp->vxlan_port_cnt++; break; case RTE_TUNNEL_TYPE_GENEVE: if (bp->geneve_port_cnt) { @@ -2301,7 +2300,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, } tunnel_type = HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE; - bp->geneve_port_cnt++; break; default: PMD_DRV_LOG(ERR, "Tunnel type is not supported\n"); @@ -2309,6 +2307,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, } rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port, tunnel_type); + + if (rc != 0) + return rc; + + if (tunnel_type == + HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN) + bp->vxlan_port_cnt++; + + if (tunnel_type == + HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE) + bp->geneve_port_cnt++; + return rc; } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:06.455855459 +0800 +++ 0100-net-bnxt-fix-tunnel-port-accounting.patch 2021-11-10 14:17:01.860746172 +0800 @@ -1 +1 @@ -From 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 Mon Sep 17 00:00:00 2001 +From 95cf6a360f53518035593218892362d7d3c402cd Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index 857da91c9d..aa7e7fdc85 100644 +index 55034bccb5..e67e83ea7a 100644 @@ -24 +26 @@ -@@ -2369,7 +2369,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -2286,7 +2286,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, @@ -32 +34 @@ -@@ -2384,7 +2383,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -2301,7 +2300,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, @@ -40 +42 @@ -@@ -2392,6 +2390,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -2309,6 +2307,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,