[dpdk-dev,5/5] ethtool: dispaly bus info and firmware version
Checks
Commit Message
This patch enhances the ethtool-API to support to show the
bus information and firmware version as same as kernel
version ethtool displayed.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
examples/ethtool/ethtool-app/ethapp.c | 2 ++
examples/ethtool/lib/rte_ethtool.c | 3 +++
2 files changed, 5 insertions(+)
Comments
On 17/11/2016 17:42, Qiming Yang wrote:
> This patch enhances the ethtool-API to support to show the
> bus information and firmware version as same as kernel
> version ethtool displayed.
Suggest rewording as:
This patch enhances the ethtool example to support to show
bus information and firmware version, in the same way that
the Linux kernel ethtool does.
@@ -184,6 +184,8 @@ pcmd_drvinfo_callback(__rte_unused void *ptr_params,
printf("Port %i driver: %s (ver: %s)\n",
id_port, info.driver, info.version
);
+ printf("bus-info: %s\n", info.bus_info);
+ printf("firmware-version: %s\n", info.fw_version);
}
}
@@ -54,6 +54,9 @@ rte_ethtool_get_drvinfo(uint8_t port_id, struct ethtool_drvinfo *drvinfo)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+ rte_eth_dev_fwver_get(port_id, drvinfo->fw_version,
+ sizeof(drvinfo->fw_version));
+
memset(&dev_info, 0, sizeof(dev_info));
rte_eth_dev_info_get(port_id, &dev_info);