patch 'net/ixgbe: fix firmware version consistency' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 08:00:42 CET 2023


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 <xuemingl at nvidia.com>

---
>From dbe54bfd9b93675ae887b0081bca4ac4d51e1917 Mon Sep 17 00:00:00 2001
From: Shiyang He <shiyangx.he at intel.com>
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 <xuemingl at nvidia.com>

[ 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 <shiyangx.he at intel.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 .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 at qq.com>
 Shiri Kuzin <shirik at nvidia.com> <shirik at mellanox.com>
 Shivanshu Shukla <shivanshu.shukla at intel.com>
 Shiweixian <shiweixian at huawei.com>
+Shiyang He <shiyangx.he at intel.com>
 Shlomi Gridish <sgridish at marvell.com>
 Shougang Wang <shougangx.wang at intel.com>
 Shraddha Joshi <jshraddha at vmware.com>
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 <xuemingl at nvidia.com>
+
+[ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index b797fec215..cb9bd28bd3 100644
+index 736f62c206..eb5bd55eb1 100644
@@ -27 +29 @@
-@@ -1217,6 +1217,7 @@ Shiqi Liu <835703180 at qq.com>
+@@ -1212,6 +1212,7 @@ Shiqi Liu <835703180 at 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


More information about the stable mailing list