From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 3/4] net/ixgbe: add firmware version get Date: Wed, 4 Jan 2017 09:06:23 +0000 Message-ID: References: <1481008582-69416-1-git-send-email-qiming.yang@intel.com> <1482841816-54143-1-git-send-email-qiming.yang@intel.com> <1482841816-54143-4-git-send-email-qiming.yang@intel.com> <9c401d90-0264-8fc8-3733-abb59bfd277e@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: "Horton, Remy" To: "Yang, Qiming" , "dev@dpdk.org" , "thomas.monjalon@6wind.com" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 21D2A2BB9 for ; Wed, 4 Jan 2017 10:06:28 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 1/4/2017 2:44 AM, Yang, Qiming wrote: > You can see the kernel version ethtool, use command 'ethtool -i ' > driver: ixgbe > version: 4.2.1-k > firmware-version: 0x61bf0001 > > Ixgbe's FW version do not have the major and minor number, and the original purpose of this function is get FW version, so I think it's enough. Is etrack_id a unique value that defines the FW version on its own? And is above definition true for all NICs (or at least Intel ones)? Because I can see i40e is using 4 bit value for etrack_id ? > > -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, January 3, 2017 11:04 PM > To: Yang, Qiming ; dev@dpdk.org; thomas.monjalon@6wind.com > Cc: Horton, Remy > Subject: Re: [PATCH v3 3/4] net/ixgbe: add firmware version get > > On 12/27/2016 12:30 PM, Qiming Yang wrote: >> This patch add a new function ixgbe_fw_version_get. >> >> Signed-off-by: Qiming Yang > > <...> > >> >> static void >> +ixgbe_fw_version_get(struct rte_eth_dev *dev, __rte_unused u32 *fw_major, >> + __rte_unused u32 *fw_minor, __rte_unused u32 *fw_patch, u32 >> +*etrack_id) > > This API at least provide major and minor fw versions I think. Isn't there any kind of FW version information for ixgbe? Just providing etrack_id is not looking good. > >> +{ >> + struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); >> + u16 eeprom_verh, eeprom_verl; >> + >> + ixgbe_read_eeprom(hw, 0x2e, &eeprom_verh); >> + ixgbe_read_eeprom(hw, 0x2d, &eeprom_verl); >> + >> + *etrack_id = (eeprom_verh << 16) | eeprom_verl; } >> + >> +static void >> ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info >> *dev_info) { >> struct rte_pci_device *pci_dev = IXGBE_DEV_TO_PCI(dev); >> >