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 646E2A034F for ; Wed, 10 Nov 2021 07:33:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57E6A40142; Wed, 10 Nov 2021 07:33:51 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2076.outbound.protection.outlook.com [40.107.223.76]) by mails.dpdk.org (Postfix) with ESMTP id 9738040142 for ; Wed, 10 Nov 2021 07:33:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kU/y7vm3zzNbDa3gp0yfMb8R2H4MPQ2/HkIe49Y5kWNObIGfpFeha4GIZNgkIoDkirTghxP5ZewzJ3wFj5NSOzMIhqVQhrsBu3u+BsOabcVdGhN4S/XXELpF5EwPliFQ8xgpPeFLa+zinIjbTflK7yyCIYKIywpWdTdsXLJ7EsevSleOHPjaeUvLJHjQ6iNj73+P5SlW/p8fl5AKsiCjy7/kwUTtCQ18iomHrgjI/UYSyrcVER65AlFfF2B7iogtu6hvhaB3ARmuAuJquGYKAzbCnw5U+YLEVdH1gTuWhWuz47kAyaKW1PZgOrPPpQ4uC+EMkU4WU2dN1M7skXl3Yg== 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=AmMbRYGv/ERPR4I/RbyxF+4GQSKTKGiVWfvkikQuZS8=; b=HEuBi2b3veAAPn/vKFAaLU0BCmGNaxaGVWwFenDWYLzeXnu2yTv3xC9qo5vgm2MEq/4vMePvM0hC1tRrTkP1Efci6dSk6jkioLEkO8FrVced6N6JXcP8g1aLVeoeRXwIVcewI5YEGmK8lRQsH2siq6gU22SafFhvuW+EZ8aTy6L9KzYBra9h7W4KQoiOVEC9U8vq8PvweMwpXeMv9NS67qL/YMrrYXJ3FMz6vIpFSMSDzbS0wt1Q+gkyhxq7azJvHq/bVYylUnYigibnwE6NXJmcHLfgL1VmPlhoxUUtjRsIbzarqZeSRhKm5NrtbvVEFUcomrzy2BUQot2IPynZoA== 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=AmMbRYGv/ERPR4I/RbyxF+4GQSKTKGiVWfvkikQuZS8=; b=DxdBQZa8lP/ZnsBstKFyrzT/BAWuwuZrEfnJsbA2k6XHwBkqNACKxgMFkfVbMOpUFNz6vIYvWHHOlqD2Rz1LwzIVNNdB2a/HDOcEPPYZvQFJ8UDloJTjygfCaq0vrJh3B2C88WcwLGZ/pC0e4rvekgt5KaXwgY/ZRLvsWWX3C9CTcg5CRVZ6odQXoq/E9NrhVYOpsb6LyzfrJ+hNQ3FVEVewWlq2rfiZpNYkUoJs2qfarO7i57lFe/8b6iz5Imcq2RtV5hGxllNPtLNYeWs+0W5Y4fJ2DqfayNWTZBWsWRpuaXpTqqLUiOwz2vH2+Y0YJmLlMB0/L6iemm9vkOKM1w== Received: from DS7PR03CA0258.namprd03.prod.outlook.com (2603:10b6:5:3b3::23) by MN2PR12MB3758.namprd12.prod.outlook.com (2603:10b6:208:169::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:33:47 +0000 Received: from DM6NAM11FT013.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b3:cafe::aa) by DS7PR03CA0258.outlook.office365.com (2603:10b6:5:3b3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.16 via Frontend Transport; Wed, 10 Nov 2021 06:33:47 +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 DM6NAM11FT013.mail.protection.outlook.com (10.13.173.142) 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:47 +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:43 +0000 From: Xueming Li To: Ajit Khaparde CC: Luca Boccassi , Somnath Kotur , dpdk stable Date: Wed, 10 Nov 2021 14:28:14 +0800 Message-ID: <20211110063216.2744012-11-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: 6b09a1ea-ad9f-42b1-db2f-08d9a4140ced X-MS-TrafficTypeDiagnostic: MN2PR12MB3758: 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: 0QfyV1iwCS2beoxJiRukrLPIblO5YVpklis6nffhBlI2mV2uapprr9i+ajLmxJUTBTHx/daGkTitBC+FdpqbkOTIWCGjtLM0v+C5lJeq6TQ6bLzNQ/dCQKVJUu3vqZ8iv+nd1G4oktBqhUKKX4jQkIl3C1iAlFkDjtM7NA6yxmR1AeaDdVFdg737owY7xyulS7PZf2zc2f8/3mO8jVfP9dmOcPG3mc7Px2NWgVZHnLE1xiAS6WQKtzLg5VskD002m6D5eHilNNjtdbqkT9T3DCQKfK1z0kFZ48Pvx7w6cHUAeG0RqrWdFVTtR65grojd11QxReO/4s701cLCvQ8nz6IZLaPQo0jyD/qnMlUrdbWIbsgitGClkRiqGGp7lgFDUCuy4fKa7e8AF95KV9554S8IhPqk7LBC3P+BM1IEyuI/bAxhPIGwSZCKE8o17Y2h2fXWctd1A7LJJbiP4ByUK3bt6afs1qDv44HcWYUqIs2CVpAi6V8W37MGymgJqNugXc7T8c6XymyKNaO7iGrXJbBJebN6hpnGmQ3I1Wd9fhD211aLobEdc+hatQm7R/UmSaTcueRySCF7TenHqWhtyXcdsp5SvB5InOzSWQ9NYXfAfhJmqVrHRNe+i+frEET9GJqGMR8NB/NzpUUx6lTQ4VdATcnT+fvdGCyXrXWF3cr0N5J5G5VRb4mN3JdUwMyXFeaUA78STvBemJXbcLwMG2dQZe7//YhxH9Diyzdp/5+u8XIy5km1UOSoejnyxk4PgAtxfcR/p0Gm1lmcMFaaAUcOWvL4A/xLgk81xisWoCJAAI0sXTJt6J8TJYwlHHduLdLGnHqVCrGKlAjmiH4QRg== 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)(316002)(8936002)(55016002)(83380400001)(4001150100001)(2906002)(1076003)(7696005)(53546011)(2616005)(6916009)(70586007)(70206006)(86362001)(8676002)(6666004)(6286002)(426003)(5660300002)(47076005)(508600001)(966005)(82310400003)(356005)(7636003)(336012)(36860700001)(26005)(15650500001)(16526019)(54906003)(186003)(4326008)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:33:47.0573 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b09a1ea-ad9f-42b1-db2f-08d9a4140ced 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: DM6NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3758 Subject: [dpdk-stable] patch 'net/bnxt: update ring group after ring 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/83ec79465d8d8a72d22234732e616f16f98a7b64 Thanks. Xueming Li --- >From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Sun, 1 Aug 2021 21:44:30 -0700 Subject: [PATCH] net/bnxt: update ring group after ring stop start Cc: Xueming Li [ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ] A Rx ring stop start sequence may result in the FW returning a different set of Rx ring and AGG ring IDs. If the ring group is not updated with the new IDs, the HW sees the host driver using incorrect BD types for the Rx ring and AGG ring. This can cause the chip to go into a bad state or encounter RE_flush issue or leak mbufs in the HW. Fix this by issuing a bnxt_hwrm_ring_grp_free() and an bnxt_hwrm_ring_grp_alloc() to refresh the ring group information. Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop") Signed-off-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 3 +++ drivers/net/bnxt/bnxt_ring.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 39778e38ef..d8b46f932a 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index) struct bnxt_ring *ring = rxr->rx_ring_struct; struct bnxt_cp_ring_info *cpr = rxq->cp_ring; + if (BNXT_HAS_RING_GRPS(bp)) + bnxt_hwrm_ring_grp_free(bp, queue_index); + bnxt_hwrm_ring_free(bp, ring, HWRM_RING_FREE_INPUT_RING_TYPE_RX); if (BNXT_HAS_RING_GRPS(bp)) diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 6834244e4c..4cfa818616 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index) if (rc) goto err_out; + if (BNXT_HAS_RING_GRPS(bp)) { + rc = bnxt_hwrm_ring_grp_alloc(bp, queue_index); + if (rc) + goto err_out; + } + if (rxq->rx_started) { if (bnxt_init_one_rx_ring(rxq)) { PMD_DRV_LOG(ERR, -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:02.583326783 +0800 +++ 0010-net-bnxt-update-ring-group-after-ring-stop-start.patch 2021-11-10 14:17:01.750747073 +0800 @@ -1 +1 @@ -From ed0ae3502fc91adbf6eebe7047da887353844230 Mon Sep 17 00:00:00 2001 +From 83ec79465d8d8a72d22234732e616f16f98a7b64 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ed0ae3502fc91adbf6eebe7047da887353844230 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -27 +29 @@ -index 73deb41f81..eb9de45cb9 100644 +index 39778e38ef..d8b46f932a 100644 @@ -30 +32 @@ -@@ -2717,6 +2717,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index) +@@ -2576,6 +2576,9 @@ void bnxt_free_hwrm_rx_ring(struct bnxt *bp, int queue_index) @@ -38,2 +40,2 @@ - HWRM_RING_FREE_INPUT_RING_TYPE_RX, - cpr->cp_ring_struct->fw_ring_id); + HWRM_RING_FREE_INPUT_RING_TYPE_RX); + if (BNXT_HAS_RING_GRPS(bp)) @@ -41 +43 @@ -index b05c470766..957b175f1b 100644 +index 6834244e4c..4cfa818616 100644 @@ -44 +46 @@ -@@ -631,6 +631,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index) +@@ -608,6 +608,12 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index) @@ -56 +58 @@ - PMD_DRV_LOG(ERR, "bnxt_init_one_rx_ring failed!\n"); + PMD_DRV_LOG(ERR,