> From: He, ShiyangX [mailto:shiyangx...@intel.com] > Sent: Thursday, 5 January 2023 03.52 > > >From: Morten Brørup <m...@smartsharesystems.com> > >Sent: Wednesday, January 4, 2023 6:19 PM > > > >> From: Shiyang He [mailto:shiyangx...@intel.com] > >> Sent: Wednesday, 4 January 2023 10.52 > >> > >> The firmware version obtained by dpdk-ethtool is inconsistent with > >> that obtained by linux-ethtool. > >> > >> This commit fixes the issue. > >> > >> Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get") > >> Cc: sta...@dpdk.org > >> > >> Signed-off-by: Shiyang He <shiyangx...@intel.com> > >> --- > >> drivers/net/ixgbe/ixgbe_ethdev.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> 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); > >> > >> - etrack_id = (eeprom_verh << 16) | eeprom_verl; > >> + etrack_id = (eeprom_verl << 16) | eeprom_verh; > >> ret = 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. :-( > > After following your suggestions, I read the driver source code again, > which is implemented as the solution. I will send out V2 patch soon.
I suppose what you are looking for is here: https://elixir.bootlin.com/linux/v6.1.3/source/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c#L4106