[dpdk-dev] [PATCH 2/2] ethtool: add new library to provide ethtool-alike APIs

Wang, Liang-min liang-min.wang at intel.com
Fri May 29 20:17:40 CEST 2015


>On Fri, 29 May 2015 09:15:09 -0400
>Liang-Min Larry Wang <liang-min.wang at intel.com> wrote:
>
>> +	drvinfo->n_stats = sizeof(struct rte_eth_stats) / sizeof(uint64_t);
> >+	drvinfo->testinfo_len = 0;
>
>
>Providing a hook to access more functionality is good and compatiablity with old API's is helpful.  Too bad ethtool is kind of a clunky old inflexible, and easily broken with changes. But >that is not your fault.
>
>Duplicating eth_stats in ethtool is not helpful.
>This is actively discouraged for Linux device drivers.

(I have a typo of David's email, and I corrected it in this email)
This new library is designed to support ethtool alike interface, some of the implementation will be just a placeholder. The rte_ethtool_net_get_stats64 is designed as a place holder to support net_device_ops::ndo_get_stats64. For the legacy support, it is required to provide # of statistic parameters are supported, so caller can allocate right size of buffer to get statistic from device driver.


More information about the dev mailing list