[dpdk-dev] [PATCH v4 5/5] ethtool: dispaly firmware version

Ferruh Yigit ferruh.yigit at intel.com
Wed Jan 4 15:00:55 CET 2017


On 1/4/2017 12:03 PM, Qiming Yang wrote:
> This patch enhances the ethtool example to support to show
> firmware version, in the same way that the Linux kernel
> ethtool does.
> 
> Signed-off-by: Qiming Yang <qiming.yang at intel.com>
<...>
>  
> @@ -61,6 +67,12 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo)
>  		dev_info.driver_name);
>  	snprintf(drvinfo->version, sizeof(drvinfo->version), "%s",
>  		rte_version());
> +	if (strcmp(drvinfo->driver, "net_ixgbe") == 0)

Do you need this check. I think it is not good idea to add this kind of
checks into ethtool app. Why not just print "%d.%d.%d %#X, major, minor,
patch, etrack" for all cases ?

> +		snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version),
> +			 "0x%08x", etrack);
> +	else
> +		snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version),
> +			 "%d.%02d 0x%08x", fw_major, fw_minor, etrack);
>  	if (dev_info.pci_dev)
>  		snprintf(drvinfo->bus_info, sizeof(drvinfo->bus_info),
>  			"%04x:%02x:%02x.%x",
> 



More information about the dev mailing list