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 9EE2EA00C2; Wed, 4 Jan 2023 11:19:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 497C340A82; Wed, 4 Jan 2023 11:19:01 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id E583140697; Wed, 4 Jan 2023 11:18:59 +0100 (CET) Content-class: urn:content-classes:message Subject: RE: [PATCH] net/ixgbe: fix ixgbe firmware version get MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 4 Jan 2023 11:18:58 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87620@smartserver.smartshare.dk> In-Reply-To: <20230104095142.86796-1-shiyangx.he@intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] net/ixgbe: fix ixgbe firmware version get Thread-Index: AdkgI69Rfd18f6lbS1ekgHoWYZoUtwAAaozw References: <20230104095142.86796-1-shiyangx.he@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Shiyang He" , Cc: , , "Qiming Yang" , "Wenjun Wu" , "Remy Horton" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Shiyang He [mailto:shiyangx.he@intel.com] > Sent: Wednesday, 4 January 2023 10.52 >=20 > The firmware version obtained by dpdk-ethtool is inconsistent with = that > obtained by linux-ethtool. >=20 > This commit fixes the issue. >=20 > Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get") > Cc: stable@dpdk.org >=20 > Signed-off-by: Shiyang He > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index ae9f65b334..012096021e 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -3859,7 +3859,7 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, > char *fw_version, size_t fw_size) > ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh); > ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl); >=20 > - etrack_id =3D (eeprom_verh << 16) | eeprom_verl; > + etrack_id =3D (eeprom_verl << 16) | eeprom_verh; > ret =3D snprintf(fw_version, fw_size, "0x%08x", etrack_id); This looks wrong, assuming the high-word in 0x2e and the low-word in = 0x2d. Perhaps the linux ethtool needs to be fixed instead? I don't think DPDK should aim for "bug compatibility" with Linux. :-( > if (ret < 0) > return -EINVAL; > -- > 2.34.1 >=20