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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:59 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/060c26e4450a9237b49f8dc75fac282d05bb0e25

Thanks.

Luca Boccassi

---
>From 060c26e4450a9237b49f8dc75fac282d05bb0e25 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

[ 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>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index cee7ee33f3..8041749e71 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3869,23 +3869,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;
+	}
 
-	etrack_id = (eeprom_verh << 16) | eeprom_verl;
-	ret = snprintf(fw_version, fw_size, "0x%08x", etrack_id);
+	ixgbe_get_etk_id(hw, &nvm_ver);
+	ixgbe_get_orom_version(hw, &nvm_ver);
+
+	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.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:30.427170255 +0000
+++ 0055-net-ixgbe-fix-firmware-version-consistency.patch	2023-02-23 09:36:28.326171781 +0000
@@ -1 +1 @@
-From b5c4535d5d9a6cf363f548503c2c755be0ab656b Mon Sep 17 00:00:00 2001
+From 060c26e4450a9237b49f8dc75fac282d05bb0e25 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit b5c4535d5d9a6cf363f548503c2c755be0ab656b ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -19 +19,0 @@
- .mailmap                         |  1 +
@@ -21 +21 @@
- 2 files changed, 21 insertions(+), 11 deletions(-)
+ 1 file changed, 20 insertions(+), 11 deletions(-)
@@ -23,12 +22,0 @@
-diff --git a/.mailmap b/.mailmap
-index b797fec215..cb9bd28bd3 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -1217,6 +1217,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>
@@ -36 +24 @@
-index 3f8da11bd1..88118bc305 100644
+index cee7ee33f3..8041749e71 100644
@@ -39 +27 @@
-@@ -3853,23 +3853,32 @@ static int
+@@ -3869,23 +3869,32 @@ static int


More information about the stable mailing list