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

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:06:08 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.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 02/28/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/a13a713ce4785603ade041dc696edfbbd30618d1

Thanks.

Kevin

---
>From a13a713ce4785603ade041dc696edfbbd30618d1 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 b56ac0e9f9..e9dd243d5b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3857,21 +3857,30 @@ 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;
 }
 
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 14:46:25.665817164 +0000
+++ 0077-net-ixgbe-fix-firmware-version-consistency.patch	2023-02-23 14:46:23.856236266 +0000
@@ -1 +1 @@
-From b5c4535d5d9a6cf363f548503c2c755be0ab656b Mon Sep 17 00:00:00 2001
+From a13a713ce4785603ade041dc696edfbbd30618d1 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,10 +22,0 @@
-diff --git a/.mailmap b/.mailmap
-index b797fec215..cb9bd28bd3 100644
---- a/.mailmap
-+++ b/.mailmap
-@@ -1218,4 +1218,5 @@ 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>
@@ -34 +24 @@
-index 3f8da11bd1..88118bc305 100644
+index b56ac0e9f9..e9dd243d5b 100644
@@ -37 +27 @@
-@@ -3854,21 +3854,30 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -3857,21 +3857,30 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)



More information about the stable mailing list