[RFC v2] net/af_packet: make stats reset reliable
Stephen Hemminger
stephen at networkplumber.org
Thu May 2 17:59:10 CEST 2024
On Thu, 2 May 2024 15:22:35 +0100
Ferruh Yigit <ferruh.yigit at amd.com> wrote:
> >
> > It's not going to be completely MT safe, since you can't have two
> > threads calling the reset function in parallel.
> >
>
> This is what I meant with "MT-safe reset", so multiple threads not
> allowed to call stats reset in parallel.
>
> And for multiple concurrent counter-updating threads case, suggestion is
> to stop forwarding.
>
> Above two are the update I added to 'rte_eth_stats_reset()' API, and
I can't see the point of full MT-safe reset. No other driver does it.
The ethdev control side api's are not MT-safe and making them truly
MT-safe would add additional ref count and locking.
More information about the dev
mailing list