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 3020FA0A0E for ; Mon, 10 May 2021 18:08:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 297934003E; Mon, 10 May 2021 18:08:57 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2052.outbound.protection.outlook.com [40.107.237.52]) by mails.dpdk.org (Postfix) with ESMTP id DADCF40147 for ; Mon, 10 May 2021 18:08:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a6udbNXu0vR2X76KyIro7tWHbo5Ktsz0y5rhq0HK2xqeVVkV9Ic8Jm29LwEZdqMdz3JtIzVBycjWT0RxVjTy85Ot8Y+uMuKY41qShm5GVz/qaW64D5UmbhpdMC4pbGl9mtkKADYQ6VgE5EPpcdGKbWUTDsw94TQw+XlY2iHblAYUipRzl09d1FBhOo2JIbCwCseqTthVlNDAm8OMvO1/nyl1oY2YDxjol8yk43uLn7fHfthubWs8hKc956+7+HtdosTTLHj3tLJOp11HMQ+GODENjmJnYL0WBCjgybLnp+AwxbHvJG2xWHkxsenc8XUVXqMl97cAlmD1ZY8kXnSN/A== 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-SenderADCheck; bh=Dpv55QyzretfV6cd2vpE2m9pT20PfIG4nkwEQytok+o=; b=NJl77+1FldW0oD+nu2xNxUJy7zenlnTfpvdhOAAQU2tqKEbQdvjiyzfBq93Eb8rSo06S225yTFIUaZWQTzvZsx+4Db7lnA6P0ciPdJv5JQsWS1X9h9vzuiDDZ9uEJItYYQKZf8v/Fcbg+7LHAswR8undTeUegi7EdrcPMSEf5BvaaGF33Iokd+SZgoK/4Gx0muqnZ7pqNYmlRCxz1R6MtvFSP9tfdMgyiG95L2/hpuu1c8ySRv0X4gUHNYu8/6Gswj6GelMUeEl+eDJWhuhOlc8A7e7HkZVxsEa8jOH2lIuBbqYHb5glgR4u3lYmJOloxTrnxyWvXazRuh1Ej3lqxw== 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=none sp=none 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=Dpv55QyzretfV6cd2vpE2m9pT20PfIG4nkwEQytok+o=; b=QIJ9ps1HC5Qf0CYAvigEiHr0/6/5ZcBfJ59wRk6ZOQbWOeygpCkgAAzLvmb8hn2vKBT8NVw2mzFRCWMIaPyT+/cOEmE49Y+pzL50boseNkyA1QN60XR30dj5BidmjTE2eY6E6PwUVhPNnweMV2g+UD7taTopdu86QBrKN+CFnRdPRx97/Gcn6IIiAz4V7cVCK9XcZKgr5WQsTxsXw0h+kZAKvqAqVGCoYPhe/5BahsdmZ4tGx7ghlOiZD11DVyWCwRAu5/hq4gH8pZXkxogjXaA7PXHJPIa6/kru1N8raicqcL/mNfpZSk50ZqPKnETMXP15nx5mouFE8TLNSlG4EQ== Received: from BN9PR03CA0447.namprd03.prod.outlook.com (2603:10b6:408:113::32) by CY4PR12MB1894.namprd12.prod.outlook.com (2603:10b6:903:128::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.29; Mon, 10 May 2021 16:08:54 +0000 Received: from BN8NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:408:113:cafe::cf) by BN9PR03CA0447.outlook.office365.com (2603:10b6:408:113::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:08:54 +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 BN8NAM11FT006.mail.protection.outlook.com (10.13.177.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:08:54 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:08:51 +0000 From: Xueming Li To: Kalesh AP CC: Luca Boccassi , Ajit Khaparde , Somnath Kotur , dpdk stable Date: Tue, 11 May 2021 00:00:06 +0800 Message-ID: <20210510160258.30982-57-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f53d2fc-7a91-4693-6086-08d913cde8dd X-MS-TrafficTypeDiagnostic: CY4PR12MB1894: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GwmvLYb/gdl1HkVHbvJjNMcA5D7Bf9oxRVa0Q2Hk2SU9lD6h7k/0KSi1fOruK2tWaKktM4IUfrhb69puUKYujv/yhOZL5anIV8Z7OEHqQh+vQKtcgVAOhhb+MVLgfSrE1sIOx3S8MGtNiL/BhEOLtQRyutfwHZDBSG78JK/PjA7wnBnBZG7YZrMA8/TyblfE8YGiBRmXPhlwnbrUmsS8KYr9HXQeDv3QTIy2jrPhjIsqp7sbnJoHKEWV/boz/o59nTzc3eSBCsvbz23R6DicECiXGQbj6ct8TLc0Iv2ivqmMHYpKqdKbMT5FzIIPmLbgvBY23NCM63knZVzZzEIDlCmFNMYFD+my4Vdh3LuvrQRmnV+6qfhTMqUDzHV26gFHuPHNJSTajrPLVOLySFVVBMdHc7MmYa1ce9Fv/FAeAnSGzsqBWSMSrYK7GA2TPoIoQ79zp/ITOkUHpQL8/h1M79qjCjfXEsdeIG5tKVHsNxLF67aLKi57alHBsGJ10/8AubnPx5XGxZ5P+MH/ji5/qcqUIrVJTe3L6db0Yq3oAc/O5UreheLEJ2kFAdmb1OdOnmYOUztfzNpv1e/D4KZAcUdwny7m1S4IUhpSYuUNiP2XN0vepMU3eNckcD90IU1jz2xCDZlo3vaOpslP85rjtrTIpj+EENrah8/Cn/gGJDCRezQwJKpIpX3qaN3a7L7DuE8dJKF96kCtTxsYFIPR12qmCXqIe/1i/rEEtLFKv4kixF6xDIJuylaaPpzvruo6IpSRwm07PStLHEu2ZZ9i1Q== 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)(376002)(346002)(396003)(39860400002)(136003)(36840700001)(46966006)(6916009)(7636003)(6286002)(8676002)(478600001)(356005)(70206006)(82740400003)(86362001)(83380400001)(82310400003)(70586007)(7696005)(1076003)(2616005)(36756003)(966005)(36860700001)(8936002)(54906003)(5660300002)(426003)(53546011)(2906002)(186003)(26005)(6666004)(4326008)(316002)(55016002)(36906005)(47076005)(336012)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:08:54.3662 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f53d2fc-7a91-4693-6086-08d913cde8dd 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: BN8NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1894 Subject: [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' has been queued to stable release 20.11.2 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.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/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/15d81d5f9e333b737ef499608aa0ef6fe794db36 Thanks. Xueming Li --- >From 15d81d5f9e333b737ef499608aa0ef6fe794db36 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 10 Mar 2021 13:20:53 +0530 Subject: [PATCH] net/bnxt: fix HWRM and FW incompatibility handling Cc: Luca Boccassi [ upstream commit b0764e7c207b0932ecd73655d8f7aa015e6733f4 ] Fix to return an error when the HWRM version that the driver is compiled against is incompatible with the FW that is actually running on the card. This is determined based on the req length indicated by FW against the value supported in the HWRM. Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index b520846e07..abfb4b289d 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1150,6 +1150,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) if (bp->max_req_len > resp->max_req_win_len) { PMD_DRV_LOG(ERR, "Unsupported request length\n"); rc = -EINVAL; + goto error; } bp->max_req_len = rte_le_to_cpu_16(resp->max_req_win_len); bp->hwrm_max_ext_req_len = rte_le_to_cpu_16(resp->max_ext_req_len); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:28.142548700 +0800 +++ 0058-net-bnxt-fix-HWRM-and-FW-incompatibility-handling.patch 2021-05-10 23:59:26.410000000 +0800 @@ -1 +1 @@ -From b0764e7c207b0932ecd73655d8f7aa015e6733f4 Mon Sep 17 00:00:00 2001 +From 15d81d5f9e333b737ef499608aa0ef6fe794db36 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit b0764e7c207b0932ecd73655d8f7aa015e6733f4 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index c16edc8956..3de5c7e3a1 100644 +index b520846e07..abfb4b289d 100644 @@ -25 +27 @@ -@@ -1271,6 +1271,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) +@@ -1150,6 +1150,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) @@ -31,2 +33,2 @@ - - bp->chip_num = rte_le_to_cpu_16(resp->chip_num); + bp->max_req_len = rte_le_to_cpu_16(resp->max_req_win_len); + bp->hwrm_max_ext_req_len = rte_le_to_cpu_16(resp->max_ext_req_len);