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 9DA7DA034F for ; Wed, 10 Nov 2021 07:33:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 985ED40142; Wed, 10 Nov 2021 07:33:54 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2040.outbound.protection.outlook.com [40.107.95.40]) by mails.dpdk.org (Postfix) with ESMTP id EA64C410E0 for ; Wed, 10 Nov 2021 07:33:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=II5uWe9CgtnQbYrdGNLAG5bflqYSGmmDTwZVTDUfNDcKGDo9AAuHKpo8tVHpPCoDFkpPqr2WqEsNsK3eS4htHHm2r0NBwS2JVzX6yrMLi4lY/bjFyp5K952u9IhbnGF1ZkI6ZJ8n2+Nu7Sfi6khgfKy07z/LMT1bsCaSGSvgnu6Pu6EmcaGbPKQGZr8SXGnim72q87II1Pe84+tVs85wefYjJAI3UWHyV1wtNwzTkhCpaDtc+Hton5vvzHIjxLmxY+eTrnQn/dgbzQFWlpl1CcBFdolC9Xgd4ChvzCd4V1N+71aOvD8B1jFPi8EDsv8Xkup42YJP2gRjeM1ML5aOFQ== 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=/s7oJjGw/62gl+jPk6qHt2kjkIauoaLFro48wHsbUbE=; b=LpyZ4hcg5+glbjFIyVvospvhujHSyH/z2YFvQH6z7DVyUgVWjZPlpz909PwEL7wTnXyhRuChBSPsnr3ZYrQk9uD8K3Z1XnABitc/doCzDqhlfl4GXV/q/oQP5DhDNHQqxu9f8ZBnwBTru4vEkMmZSNwVst/H811k6AzSQhhqTNMVbo0/swtEI/tZYWIVqX9bc27xAH64lJQE7ckkIuQaxEU/O+i6a5+L3rYahWjFEr+sfmWxHWcfvfl9Z8Vaoq6uiwXYYTqq8ZsdBEEWqCoZaz1xgl6Wn/t9iMteP/wCMaKLffsmrYgA1W8G46kJauR9mne46GgKPCetUGQzbNY/hQ== 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=/s7oJjGw/62gl+jPk6qHt2kjkIauoaLFro48wHsbUbE=; b=BTZaYDVCHXm2pIQQfsCQNPduiO+v16GnsQuILm614fLblvg+yeE3Fs5en57TqTWvkRdvQaYnywkH5FvAf84GAVxYYU0yevqXQivnJQV8gd51p4LPqLvhdf1EMp7oFYloILZG55XQysA9kSjLyLMAd9cfOqQ4nK+/QFT95znmwMRuyuJgzC/7d8YsuwwV4GGWzbq7kdRP1QjQjktk0gi7uYxH6uQExsaPzURtn0W4C11WYOHRcTtfFupQ1IkdEAVeQKQFZHja8V0K7Lo9rS0PgAIXQ5+OJB9ncwfdZZqKywKcLU9JFi6eTAY5j/c2hLszisqtBW6wph0w1Wg8UF+w6w== Received: from DM6PR07CA0050.namprd07.prod.outlook.com (2603:10b6:5:74::27) by MWHPR12MB1504.namprd12.prod.outlook.com (2603:10b6:301:c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:33:50 +0000 Received: from DM6NAM11FT066.eop-nam11.prod.protection.outlook.com (2603:10b6:5:74:cafe::95) by DM6PR07CA0050.outlook.office365.com (2603:10b6:5:74::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:33:50 +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 DM6NAM11FT066.mail.protection.outlook.com (10.13.173.179) 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:33:49 +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:33:47 +0000 From: Xueming Li To: Somnath Kotur CC: Luca Boccassi , Kalesh AP , Ajit Khaparde , dpdk stable Date: Wed, 10 Nov 2021 14:28:16 +0800 Message-ID: <20211110063216.2744012-13-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: 79373029-c012-4877-0f5b-08d9a4140e9d X-MS-TrafficTypeDiagnostic: MWHPR12MB1504: 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: MvVFxrlLuhk77xe5HTiF1mk9bmVAEBsDuaCFR4ozQmY5NasW4eWJwy1AogeFquWotNBdxduYJQ/BegX6Vw/17nsQR4yZJ1wkSHaIubpRgRkoN8DXF6v7m42yIUqhsiQyrkpn1L9V5LUByIO13g6Hhe96hRk2n6avb0lCAyx9QW6xy59XptPmnmH7ToyNDaD9zI7vKJTNDm0D2VfFZ3ufoJrNT3JHJJtbDTlQVk1BFscDDQ1MM0AClDLPelj6RXPKaYabrcTGJ9YH85Z5iKR1+uZR1sSubUxU8Z/EFYuiA8JamAI1s1F3JNOcKKXVbX5PDeJu1t0BMeSDbFdrCnns9YDBLEwxUJpjRVLdI+pnLW++lRhKRsXcHFrSkQZVxTtpn2aO9mDlxt2V5PwSlPVJXNLIqHLQjF+WeL4S4wNsJJN4VBEsIAP+s3GTp7cJfDQdy+2/P+R0ICMd3omamkIKJUN+kfscLf5MqC0ZkyI0sRtKYwNpATJqlVbiP0O2cgA1KuzWNl/7E2GgltedVvcnFvHE4a8K8dFptN6XlzgrJ77V03g/ALE3bkBoDMzj66C/S6x1dOIRlvUjZggO4Wky1YFnjDd54hN6zTQTIVgRakFdvagLlIUW1iqBk9ur5JMJWvPY86j7iPgUY60qoB0HvY8AktpgwlQLKtQrfSH7caXBF8agXqF2jEToJ/ISJqfVUphJXvjNaQCGuob10ZOp+bDTp1MvAsQWUZMH1RecCg4EwzfoxkRIEwK31hTSbhFbRpmTlEVxyhoNSf+M4tTwPyv2oMjrm9cx4340CMTRzRzdg0V+OvYcTDk7XeU+5im9yAAlP+5uwwRj7JuM10Q63A== 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)(36840700001)(46966006)(356005)(6286002)(6916009)(7696005)(8676002)(316002)(336012)(26005)(6666004)(36860700001)(2616005)(70206006)(53546011)(36756003)(86362001)(70586007)(426003)(36906005)(8936002)(47076005)(83380400001)(2906002)(1076003)(82310400003)(16526019)(186003)(4326008)(5660300002)(7636003)(55016002)(54906003)(508600001)(4001150100001)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:33:49.9422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 79373029-c012-4877-0f5b-08d9a4140e9d 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: DM6NAM11FT066.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1504 Subject: [dpdk-stable] patch 'net/bnxt: fix crash after port stop/start' 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/8f75f8b588670e687c5602f369a21244316fd344 Thanks. Xueming Li --- >From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Mon, 23 Aug 2021 21:14:53 +0530 Subject: [PATCH] net/bnxt: fix crash after port stop/start Cc: Xueming Li [ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ] On chips like Thor, port stop/start sequence could result in a crash in the application. This is because of false detection of a bad opaque in the Rx completion and the subsequent kicking-in of the ring reset code to recover from the condition. The root cause being that the port stop/start would result in the HW starting with fresh values, while the driver internal tracker variable `rx_next_cons` is still pointing to a stale value. Fix this by resetting rx_next_cons to 0 in bnxt_init_one_rx_ring() Fixes: 03c8f2fe111c ("net/bnxt: detect bad opaque in Rx completion") Signed-off-by: Somnath Kotur Reviewed-by: Kalesh AP Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 41be74284b..655f09a9bf 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) } PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n"); + /* Explicitly reset this driver internal tracker on a ring init */ + rxr->rx_next_cons = 0; + return 0; } -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:02.672364996 +0800 +++ 0012-net-bnxt-fix-crash-after-port-stop-start.patch 2021-11-10 14:17:01.754080379 +0800 @@ -1 +1 @@ -From 61cd4384fabf67d487a3ae85cff5babcdb41558f Mon Sep 17 00:00:00 2001 +From 8f75f8b588670e687c5602f369a21244316fd344 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 61cd4384fabf67d487a3ae85cff5babcdb41558f ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index aea71703d1..73fbdd17d1 100644 +index 41be74284b..655f09a9bf 100644 @@ -29 +31 @@ -@@ -1379,6 +1379,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) +@@ -1308,5 +1308,8 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq) @@ -38 +39,0 @@ -