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 86DDAA034F for ; Wed, 10 Nov 2021 07:57:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77C6940142; Wed, 10 Nov 2021 07:57:03 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2042.outbound.protection.outlook.com [40.107.96.42]) by mails.dpdk.org (Postfix) with ESMTP id C66E040142 for ; Wed, 10 Nov 2021 07:57:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cqqS67BH2lMKiOUvMMLAVcYjGHUIi4jR/qg1DtfzlyVgkijlA2chCED4PpLuUS0SVJGlEtWUFn3NAEifAW209L4VygjwK4XPCAHwN0VdcnTO1/D/hCA5izS6MkyNemDdpULjNAiS0/NLtt3ck/D56iCKSUYe6XmADNe7qTuYeYQcLxrWXpJiBLsoBT7XEshER6pE3K8RF+911PA26Mw0bFLJhXAWV/2UfFXJcM1Hof2OREywzVereh6OAx10S+fYbyk8GCrAFP5AwDY8y1e2EBifrjPxbUId8sz6a2iPKD+sT4yuGSGyfX5zNRbqcB/GlTvHpEMh6f2vXKgHJPangw== 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=LwcqC006Mc7hd+7Gcq5mxcHgMqazBx0ndt6o6zET4fM=; b=ELp3eVnEsR9BUfzHdz60IA3vbVAIMcJr/p3LBbsElNyZCK4Q9DwUFjO6CkTiOuiN9SzXq/xs6aBYkgwk0rPxBAlsC9GAZn2PjRID1IsWUx2pMfodnpZxoDrtNcpETfcnTydsryzFnnk1snZrAjz+TQBmecrX2QxTH3V0nGOUxu79miIMREitduEuH/k1yBQPZLvYxNFtuEBWWVp06tlm1v63KBeIsBm4W1dCfN3e7rc7sGANUudZUhN/zwxvSesWjwS+E2UbuUfwdbm29d6cKRlP/Irk85HNFVcs3NnS5A94c2FTpGaMkpCeW/u+4osaCx0v1VL3Obf0QNEP38RLsQ== 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=LwcqC006Mc7hd+7Gcq5mxcHgMqazBx0ndt6o6zET4fM=; b=QqEg4k3EZWaKexlud86ix43bO+dCkHuZMMz1FR8Iw/Au7FfWO76yRmRoKVpxi7akkHPWJk6kGr8GR8P9GzgyGOrKWgxgK4ZkaJB9/lfUgvb+1IDT+W2240iK4noTRdhsP7m7d4YBEqhVmy2uvKZVh4isuF3P8e+KBEeX5Ke2HBrIxAPZmwOONKq1B8hMvDYt8xZQzITUCBskefGFUW7XjmNt623gJ5LYQQPh5BG8xqr1eiIqfTU7xWg7C7Vc5g4LcLkNikWmN12PwmLe7xScfd2I+Z9d0rF+0sF5UKETz5C1IMcS99sIhW+LDZX9ibA9G7O7b8cChvfslalt2JpVIw== Received: from DM6PR02CA0102.namprd02.prod.outlook.com (2603:10b6:5:1f4::43) by DM5PR12MB1593.namprd12.prod.outlook.com (2603:10b6:4:10::11) 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:57:00 +0000 Received: from DM6NAM11FT057.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::ed) by DM6PR02CA0102.outlook.office365.com (2603:10b6:5:1f4::43) 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:57:00 +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 DM6NAM11FT057.mail.protection.outlook.com (10.13.172.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:56:59 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:56:54 +0000 From: Xueming Li To: Stephen Hemminger CC: Luca Boccassi , Somnath Kotur , Ajit Khaparde , dpdk stable Date: Wed, 10 Nov 2021 14:31:44 +0800 Message-ID: <20211110063216.2744012-221-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.5] 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: dce4a132-91c6-45c4-1ca8-08d9a4174ad1 X-MS-TrafficTypeDiagnostic: DM5PR12MB1593: 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: QIdKN76hq78eiEN/FrRnPiGmLRj3mssGNpxFPwKyMijA8naI37DfMDwovRsAT2HGFBa0G9xaOErOxzv6AR5WQvItH2WHogTzrO1TBuvGDFf2BHNwlvKt/Aq/kLC/YrWgETzqAlqqoDr7+Fu8ibHCxYWidMDvOksXo4mtFWoHB3z62EufPu14H50s+kLIlPK+W5tE6pCvyQjTeWiv2PXS41haStajUG4omV+3egf8o39Cm9mlJruTxNab2w2X9M1P4M/z8kC1fjK/u5TjyR7UnpLCwb+Vx6foXxf3ME5O6acLh7m06JH6kUPxHV5D1a/Z6h24fry+hRaULpa7uMNfoSl/ctddCRybLITQOkkBEZ/DxSZyGA7fpgiUcn4u16rIVB6U7Aj1xS/i4Tmf+FMWB5+HN9jrKV2eexoQA+2uEFGEegPylD+y3DdXRBjsuWacweWk75ea7nlvzMX0Vtq/CFhHJHSSyE09tRQ6INbWkkiZ2JeKQJKMP/vMyViPKIu+tSmMQYHmrJyuxhkHPI4Q2NbMnKxHz/BCj0EUmtFuxtm7QiMCiamdJ8W8rHx5BxE/tLvYHY8qekB15KXI84Y4T5ETt/6zqesZMGtK+0wwf6sFOfs57CAcjHY/UpUnc5McGf/8fi5qsOQH/HCz3INqnNB9D5IODqCXc85fQltAe8ZDEejza4QBjb10YJchEIitLAv9TTRNxWceiX2mFTM4wan7H1EZleAzlgpf7bQZCXqlDOHe/KZ2cQ0rlrrxNgjleLxASgorQFXmVuQsvxRl1EtQRaY3cyvFiMtLuK+819M88axExdR9FmqxZ/hv1CR6GF4Ktu9z0AdpJ6hRKsId8A== 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)(36906005)(508600001)(70586007)(5660300002)(36756003)(55016002)(54906003)(7636003)(316002)(6286002)(966005)(356005)(53546011)(2906002)(36860700001)(70206006)(83380400001)(47076005)(82310400003)(1076003)(8676002)(426003)(6666004)(8936002)(6916009)(26005)(4326008)(7696005)(336012)(2616005)(4001150100001)(86362001)(186003)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:56:59.4797 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dce4a132-91c6-45c4-1ca8-08d9a4174ad1 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: DM6NAM11FT057.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1593 Subject: [dpdk-stable] patch 'net/bnxt: fix firmware version query' 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/7ab05235227ed50335a0a4972bcb5c7e2a2cb47c Thanks. Xueming Li --- >From 7ab05235227ed50335a0a4972bcb5c7e2a2cb47c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 2 Nov 2021 14:27:44 -0700 Subject: [PATCH] net/bnxt: fix firmware version query Cc: Xueming Li [ upstream commit 211262d925268a3f5ac1c6a5a6610762b5ca5f5a ] UBSan testing revealed undefined shift here. The firmware returns the version in bytes; and shifting a 8 bit quantity here can lead to undefined behaviour or truncation. The fix is to promote the bytes to 32 bit before shifting. Bugzilla ID: 838 Fixes: 9a891c1764ea ("net/bnxt: update HWRM to version 1.9.2") Signed-off-by: Stephen Hemminger Acked-by: Somnath Kotur Acked-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index a3800cf6b1..b78e099a5e 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1138,9 +1138,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b, resp->hwrm_fw_min_8b, resp->hwrm_fw_bld_8b, resp->hwrm_fw_rsvd_8b); - bp->fw_ver = (resp->hwrm_fw_maj_8b << 24) | - (resp->hwrm_fw_min_8b << 16) | - (resp->hwrm_fw_bld_8b << 8) | + bp->fw_ver = ((uint32_t)resp->hwrm_fw_maj_8b << 24) | + ((uint32_t)resp->hwrm_fw_min_8b << 16) | + ((uint32_t)resp->hwrm_fw_bld_8b << 8) | resp->hwrm_fw_rsvd_8b; PMD_DRV_LOG(INFO, "Driver HWRM version: %d.%d.%d\n", HWRM_VERSION_MAJOR, HWRM_VERSION_MINOR, HWRM_VERSION_UPDATE); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:11.610562375 +0800 +++ 0220-net-bnxt-fix-firmware-version-query.patch 2021-11-10 14:17:02.037411394 +0800 @@ -1 +1 @@ -From 211262d925268a3f5ac1c6a5a6610762b5ca5f5a Mon Sep 17 00:00:00 2001 +From 7ab05235227ed50335a0a4972bcb5c7e2a2cb47c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 211262d925268a3f5ac1c6a5a6610762b5ca5f5a ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 55dcb1dd6a..3fefd558d8 100644 +index a3800cf6b1..b78e099a5e 100644 @@ -27 +29 @@ -@@ -1260,9 +1260,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout) +@@ -1138,9 +1138,9 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)