[dpdk-dev] [PATCH v4 1/2] ethdev: add return code to rte_eth_stats_reset()

Thomas Monjalon thomas at monjalon.net
Fri Sep 1 00:16:57 CEST 2017

10/08/2017 15:29, David Harton:
> Some devices do not support reset of eth stats.  An application may
> need to know not to clear shadow stats if the device cannot.

Yes, thanks for improving this old API.

> rte_eth_stats_reset is updated to provide a return code to share
> whether the device supports reset or not.

You need to change also this line:
typedef void (*eth_stats_reset_t)(struct rte_eth_dev *dev);

And while at it, you could apply the same change to stats_get.
A device can be in a state where it is impossible to read stats.

The same kind of update could be needed for promiscuous and allmulticast
functions but they are out of the scope of this patch.

More information about the dev mailing list