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 D151D41D8D for ; Mon, 27 Feb 2023 08:15:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBCF940ED6; Mon, 27 Feb 2023 08:15:47 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2049.outbound.protection.outlook.com [40.107.237.49]) by mails.dpdk.org (Postfix) with ESMTP id 3C53840A84 for ; Mon, 27 Feb 2023 08:15:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eiNGxygpA7e0bYzVxN84Dxg0xPdX4SOtNonM+b32J9Hvdr4hxdFmsVSvs+UreunYYF2xdZdphQnZ4mnIHF25KF+P/tOE5TFY28PhoTjRB7tRjL8iv/rlZJHzaanMwJPBMRET4buBkZdA4T40TaUUY53D4d/5Zl5xE28mska7lwP/ko7X1YFvSHDj5lwa4DMUAhPlV8h50ONTTx3jopFc/ffb52ybzqo2YULABPbWCORBMYbrQ5pmkIWgOfnnA0DUi9OPZuDRBb2jsXuJ+r1fAXGJAo/yXdxGoPX+radEbDTvGOROW0twWI9VH1EtZ/AXY2ZxNKTiq4Jc6YR3KJQdGQ== 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=3cjDEfVIAq6fn19KAzIQvSVQvjcV/LVFCbFzI/YoRpI=; b=Q7lrxdVREjYy2fVoMdlgBjn5cj734f9+772YG6b129z5/eAX/R0ep5LYCJ24zd6xH6RsuzN/+3F09xJQMqRd00vA5hzozHFNDuajpbPCenQQfXl2BKgny8AxLGMHrhjrJs/HmiMo4BqxvZLLlEAa0LjxL/KxB/BVKGWZbO81gxO00C7z41uNO3BH38PZik98UnAN2ZVLhXcJdz1eKVTtvsHpHbk6aZKlszlmbUt9/PtqVRledMkk6cmPKF8u/kJc/UcPF6K56pUP+6YntBdp/Gl5mNY65+KK0b/gK7zaNEecEmlSGJnZEFKbnPk47K3GIfN+FMlmHMyJxMlhxQv/Yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=3cjDEfVIAq6fn19KAzIQvSVQvjcV/LVFCbFzI/YoRpI=; b=ueaY4t3ux0DHJOaO1NeWd1WMkjlEGmkmAYW6GdNb+CREB0YHA2we8bQtWZIBoX7o5oq/hueBBBIqqYC2s47CO0uDr0jmCqhlh4mqmqomAMFK9Il9OUSLyRWq1v014DXJkX6SMO1NOA1cQx4Z2Xga+wS18s0awwQBG6+/keaZyNyaJpvB3ccJMlJPbvb47G0d5CjBJ8/xszrPLvVre4tQIudh7VfYb9g8pmBS6m4FqKBOcRCbp3WcDnaigKGb+KSb8CoQC6bDX2OVVPlquTzAuSxZqFtKd6cFJcN+LshxginlOestcnSDDV3ls2h86JwTDsnjmzD8hqxHJDgwqjgi2A== Received: from DM6PR18CA0017.namprd18.prod.outlook.com (2603:10b6:5:15b::30) by SJ0PR12MB5438.namprd12.prod.outlook.com (2603:10b6:a03:3ba::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Mon, 27 Feb 2023 07:15:44 +0000 Received: from DM6NAM11FT003.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::b5) by DM6PR18CA0017.outlook.office365.com (2603:10b6:5:15b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:15:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT003.mail.protection.outlook.com (10.13.173.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 07:15:43 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:15:33 -0800 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 26 Feb 2023 23:15:31 -0800 From: Xueming Li To: Shiyang He CC: =?UTF-8?q?Morten=20Br=C3=B8rup?= , dpdk stable Subject: patch 'net/ixgbe: fix firmware version consistency' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 15:00:42 +0800 Message-ID: <20230227070107.15664-134-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT003:EE_|SJ0PR12MB5438:EE_ X-MS-Office365-Filtering-Correlation-Id: 06cdd387-6ee6-4234-a60e-08db189270e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O15s2ALlAUOaSsOD+osMWP65Wnnolz4PbwMdses5VSZ0upNHT3oQU3Mt0kc8pusjZAn+0UGDdZ5/ogUMzg/DGO0UVm0eeGkF7z32+y5beyXK3ASDkyXF5xUJdrdQus5Zi2d6pxPZIqVeOyHSvIzgGlx0SioK5fddnikcwLO0aFSGiBhBsXhrT1RIe5Ti4sxBxn+295Z58Yk6hjgNpd31K6ZyZ94ZOq8CVXLJwGkgv9qLre82TUS6VEOTeypQmFxv6L9d/lcY1jIGQzDH9oWg7ASok2riPZAETCgH8kxcs9+b2N9S05ZgK3RyU+3nHq3HKa+mbyTsF4t4DL3dDrHoKyBTcu03tUgDW5eMa/MtH0Q1zUVhF9pznGMxZ+5M13Sk1DKpVlMw+Z8s1rGdBnFwVCPX5RsWwi5GaQwUIB4fBbtSAEQNsJyX20Ev+N8d3cUqZtaT2ThFVqjQ1NUtUMSPi/TOZZM/PU0ivISYEn4j7pOVpKH7mNnJq1Uuw5ulfzJcmQ5X2WgKaOBVSoYJugDUahj7ZeIrcOZ0/rAzZgyylgaVitpBtrXR6Slm1nn5sf6VhSxI1750w+CuTlCP8nQgZSWFeDZQUZBExJ6CXeEFpPSl2n3IIHTgoLwnphlJ5dLMHlZJXbSdLGgiWjbciPisGZUo2Kba/p2ol9Gbcdimnvo2DSx/Bqdg70NE002y9PE2yYDgIx66aZPiPqi6R09+HWHioKQpwmo3VT4tWNVMt+6FTnivK+lde6QOsOg/T3XT0O0RCs8Otok+IsiX9/ZqIBJbW21RVFGFhg7NxAYcomEUTy4mydj+xvryhECN0w+9 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(136003)(396003)(376002)(346002)(451199018)(40470700004)(36840700001)(46966006)(40460700003)(36756003)(54906003)(316002)(966005)(478600001)(8936002)(5660300002)(2906002)(7696005)(8676002)(70206006)(70586007)(6916009)(4326008)(41300700001)(7636003)(82740400003)(36860700001)(34020700004)(356005)(86362001)(55016003)(40480700001)(6286002)(186003)(26005)(16526019)(2616005)(6666004)(53546011)(83380400001)(82310400005)(1076003)(336012)(66574015)(47076005)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:15:43.9975 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06cdd387-6ee6-4234-a60e-08db189270e4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT003.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5438 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 22.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 03/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=dbe54bfd9b93675ae887b0081bca4ac4d51e1917 Thanks. Xueming Li --- >From dbe54bfd9b93675ae887b0081bca4ac4d51e1917 Mon Sep 17 00:00:00 2001 From: Shiyang He Date: Mon, 9 Jan 2023 06:53:09 +0000 Subject: [PATCH] net/ixgbe: fix firmware version consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ] This patch follows the code of ixgbe kernel driver so that it keeps the firmware version obtained by dpdk-ethtool consistent with that obtained by linux-ethtool. Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get") Signed-off-by: Shiyang He Acked-by: Morten Brørup --- .mailmap | 1 + drivers/net/ixgbe/ixgbe_ethdev.c | 31 ++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.mailmap b/.mailmap index 736f62c206..eb5bd55eb1 100644 --- a/.mailmap +++ b/.mailmap @@ -1212,6 +1212,7 @@ Shiqi Liu <835703180@qq.com> Shiri Kuzin Shivanshu Shukla Shiweixian +Shiyang He Shlomi Gridish Shougang Wang Shraddha Joshi diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ae9f65b334..65655b9212 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3852,23 +3852,32 @@ static int ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - u16 eeprom_verh, eeprom_verl; - u32 etrack_id; + struct ixgbe_nvm_version nvm_ver; int ret; - ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh); - ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl); + ixgbe_get_oem_prod_version(hw, &nvm_ver); + if (nvm_ver.oem_valid) { + snprintf(fw_version, fw_size, "%x.%x.%x", + nvm_ver.oem_major, nvm_ver.oem_minor, + nvm_ver.oem_release); + return 0; + } + + ixgbe_get_etk_id(hw, &nvm_ver); + ixgbe_get_orom_version(hw, &nvm_ver); - etrack_id = (eeprom_verh << 16) | eeprom_verl; - ret = snprintf(fw_version, fw_size, "0x%08x", etrack_id); + if (nvm_ver.or_valid) { + snprintf(fw_version, fw_size, "0x%08x, %d.%d.%d", + nvm_ver.etk_id, nvm_ver.or_major, + nvm_ver.or_build, nvm_ver.or_patch); + return 0; + } + + ret = snprintf(fw_version, fw_size, "0x%08x", nvm_ver.etk_id); if (ret < 0) return -EINVAL; - ret += 1; /* add the size of '\0' */ - if (fw_size < (size_t)ret) - return ret; - else - return 0; + return (fw_size < (size_t)ret++) ? ret : 0; } static int -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:45.190105500 +0800 +++ 0135-net-ixgbe-fix-firmware-version-consistency.patch 2023-02-27 14:08:40.919237000 +0800 @@ -1 +1 @@ -From b5c4535d5d9a6cf363f548503c2c755be0ab656b Mon Sep 17 00:00:00 2001 +From dbe54bfd9b93675ae887b0081bca4ac4d51e1917 Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index b797fec215..cb9bd28bd3 100644 +index 736f62c206..eb5bd55eb1 100644 @@ -27 +29 @@ -@@ -1217,6 +1217,7 @@ Shiqi Liu <835703180@qq.com> +@@ -1212,6 +1212,7 @@ Shiqi Liu <835703180@qq.com> @@ -36 +38 @@ -index 3f8da11bd1..88118bc305 100644 +index ae9f65b334..65655b9212 100644 @@ -39 +41 @@ -@@ -3853,23 +3853,32 @@ static int +@@ -3852,23 +3852,32 @@ static int