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 3EA99A0548 for ; Sun, 28 Nov 2021 16:01:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20EAB4068A; Sun, 28 Nov 2021 16:01:19 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2066.outbound.protection.outlook.com [40.107.212.66]) by mails.dpdk.org (Postfix) with ESMTP id 28FB94068A for ; Sun, 28 Nov 2021 16:01:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iT1gL6KBZ/P8RymvHhsP4Rutfp0BXj0bstXWoQnmp9EWrljquVLLXHieTMhvPNXb4Qp+UZ2TmvSsbRCUggfT53XzdFBs8/4/pG8PQbcVGsyPlNgNzAfYQmWxwUCaehamuvLw6gXp0pk1sbseCnratiu4G4R/Qdw1UbFEcKGeRbJudUenpxgbTLrB24Oqo6iB54aekCgSDD4s5OZaLrbCn2bTOOc0azOu3yOVNTGnzzBlwDXwiAwJj8H3EhpSIbx1nILgafnYCmUxEtjbVhFgw+tX9YIy9S9PUJ9E8vw0700yNWNuuLS7q3zkpQBC9Rib6BCHAPoPVjA339ZnYkYSXA== 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=8YvRX01SG69lwlNnz/I0b5KLUzvxfEl70kF9EAh0xwE=; b=a8/HiGFv0gRSsKG70mOgiypfAT9ChbZ2ITUYCCXPZILhxgBioClKujwaguC4ZoSOH6lyo+UwRQR4ZrR5sFIxnLALztvgWaUmaoBUBN7ek8dp8BnS+BC0h1D/1woBL8Iumjx4XahVuHrZhdLe7jH+NsDWKhAACaXMcx7OVk+ULW+CDrraKGnfk4fGAt+XdLwEn2HZLlUbsfsgptsFW+/H98beSHTvqvCfwVOxKNZQ8IlTGzNcRuLqr/ZL0rc7X6qKvY5hDvZvyM9AwMuRejiz87d9vEqqy8FLHDSWCVCUgjfNo+JY4JK8Acqc4P2mI5BUpGnDGgvPM66sEjc5RFc1nw== 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=8YvRX01SG69lwlNnz/I0b5KLUzvxfEl70kF9EAh0xwE=; b=pH5bSs/sa8pL9qsJXUpHtlFzpZYJ+0heMRZ6sfotm3D2qxLfcddXx78FKMk09I5MLe+Cfh98rT3bRFdWj/h3iwD92x3YN3/P6XyKbRwCu0bHWfEUmU3zpbOyjxSLOYuf6zN+eWTFvPi108aONTf6UdT20PXAYPGT5usSvAtYlMZkEhHvC0T5KYq7OKj23tGi5zA6qoFje2WvnWJqA3dSyh+kKWvIz2jIXdnPFGzvksMiL7KYXc93hWtZGPEiw6MozW8T6tSuFroMdplTju/62rUeAT0sMAEBK43CWLsOPBok6S1x6Z3sUg1nxEIQUuQtNOI0cJ/690dHHDtrKAOWuQ== Received: from BN9PR03CA0653.namprd03.prod.outlook.com (2603:10b6:408:13b::28) by DM5PR12MB1626.namprd12.prod.outlook.com (2603:10b6:4:d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Sun, 28 Nov 2021 15:01:16 +0000 Received: from BN8NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:408:13b:cafe::57) by BN9PR03CA0653.outlook.office365.com (2603:10b6:408:13b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23 via Frontend Transport; Sun, 28 Nov 2021 15:01:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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 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 BN8NAM11FT012.mail.protection.outlook.com (10.13.177.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:01:16 +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; Sun, 28 Nov 2021 15:00:30 +0000 From: Xueming Li To: Somnath Kotur CC: Luca Boccassi , Ajit Khaparde , Kalesh AP , dpdk stable Subject: patch 'net/bnxt: fix Rx next consumer index in mbuf alloc fail' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:53:55 +0800 Message-ID: <20211128145423.3974892-52-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-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: 546d4054-0715-4fc3-db5b-08d9b27fed87 X-MS-TrafficTypeDiagnostic: DM5PR12MB1626: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cy37xU1xylxBXvVhPdZ1KOk98d39iVEmhxnjRC7KDIY9i0p9NSgwwVY6XkdVTzE7NKPz/3FVzyExSN8GCY3jXWKZbfMNEtjgg4nqE8mIhyiyZXnIA7o9sFNgIFRNWT/gzi4QHt/k+UCnm7Dw4YGOQz2fJoQUMFwaBASF+cYPltEk5N5cR9JfxdNLMW7vmsdcmG/oHK86nECEIVaWPr47MbUgYAX8eBBgpvFcvVj/bW/bKgPD64KvNqyIaOl2PEc9CvJq78F7VPgwrl4mHLDSylclhz4HKN/0Sx5LICeGJhEWYlJsyzUd/V10xz3ykDke2dUGjk8VvhxHVXJgz98vWT3PmNAVsm8DvrupbUVcRYNGEnHcRP3Xh5N4F9VRy0OiDFaEP7krenwxEgmMNNa6b/dJ9hQzeJdvxuWVEwHbG/LuOXuLhY7XFPjF1Rd1eGF6WhbJ1ozpnVzTjWfdCWtsyy4QgwPzND9pGreaTG0Khp/5B15LrBBAcb5hxpIIN2n9Egd/zPXx9Duw3WuCeHA0DVd82UQRXe4XLe2Qv3MQHQcgCLlomBbJwx9dWPMTMsHXH+I9F9WNbFPAv9sJVJnOpd/KI+xCgCPScd3yG1z3c7HRjBFJH68Ph5cdxJ7O4RvXyncRI1u9SAZoycyI3fXndF6iGWfh+32KqTCUWjxiYQsQgmuIRAWISSZOPRnrlPu2iIenCzruB0Xih/sgsKcTUMItI+jOYvY3waIlEMkW3riIhQSC0Sl7WN1DSqnjXADSGOC1CDvbMIui5EjW1gAUdlolFkZFlIX379PYBdmu4X4Mu3A8pCwoFzFORJOmJNpvFAprdjnRdAh7GY6gqTwkvQ== 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)(966005)(36756003)(70586007)(6286002)(508600001)(7696005)(316002)(7636003)(2906002)(70206006)(55016003)(83380400001)(5660300002)(8936002)(6666004)(8676002)(4326008)(82310400004)(4001150100001)(336012)(1076003)(2616005)(53546011)(426003)(186003)(86362001)(6916009)(47076005)(356005)(26005)(16526019)(54906003)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:01:16.2861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 546d4054-0715-4fc3-db5b-08d9b27fed87 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: BN8NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1626 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.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/30/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/7801afdd35968c08488fd7d21ae1dedae106c971 Thanks. Xueming Li --- >From 7801afdd35968c08488fd7d21ae1dedae106c971 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Wed, 17 Nov 2021 08:42:06 +0530 Subject: [PATCH] net/bnxt: fix Rx next consumer index in mbuf alloc fail Cc: Xueming Li [ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ] The driver internal variable to track the next consumer index on the Rx ring was not being set if there was an mbuf allocation failure. In that scenario, eventually it would fall out of sync with the actual consumer index and raise a false alarm on Thor needlessly causing a segmentation fault with testpmd Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion") Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde Reviewed-by: Kalesh AP --- drivers/net/bnxt/bnxt_rxr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index e847af9fff..43cb8057da 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -916,6 +916,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, goto rx; } rxr->rx_prod = prod; +rx: rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons); if (BNXT_TRUFLOW_EN(bp) && (BNXT_VF_IS_TRUSTED(bp) || BNXT_PF(bp)) && @@ -934,7 +935,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, * All MBUFs are allocated with the same size under DPDK, * no optimization for rx_copy_thresh */ -rx: *rx_pkt = mbuf; next_rx: -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:05.952337654 +0800 +++ 0051-net-bnxt-fix-Rx-next-consumer-index-in-mbuf-alloc-fa.patch 2021-11-28 22:41:03.373540015 +0800 @@ -1 +1 @@ -From a7e21843f0f6067ebe36eafff9b8319092db3fc4 Mon Sep 17 00:00:00 2001 +From 7801afdd35968c08488fd7d21ae1dedae106c971 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a7e21843f0f6067ebe36eafff9b8319092db3fc4 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index 157297bc64..e2f09ad3a0 100644 +index e847af9fff..43cb8057da 100644 @@ -26 +28 @@ -@@ -986,6 +986,7 @@ reuse_rx_mbuf: +@@ -916,6 +916,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt, @@ -29 +31 @@ - rxr->rx_raw_prod = raw_prod; + rxr->rx_prod = prod; @@ -31 +33 @@ - rxr->rx_next_cons = RING_IDX(rxr->rx_ring_struct, RING_NEXT(cons)); + rxr->rx_next_cons = RING_NEXT(rxr->rx_ring_struct, cons); @@ -34 +36 @@ -@@ -1004,7 +1005,6 @@ reuse_rx_mbuf: +@@ -934,7 +935,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,