[RFC v3] net/af_packet: make stats reset reliable
Stephen Hemminger
stephen at networkplumber.org
Sat May 4 00:00:11 CEST 2024
On Fri, 3 May 2024 16:45:47 +0100
Ferruh Yigit <ferruh.yigit at amd.com> wrote:
> For stats reset, use an offset instead of zeroing out actual stats values,
> get_stats() displays diff between stats and offset.
> This way stats only updated in datapath and offset only updated in stats
> reset function. This makes stats reset function more reliable.
>
> As stats only written by single thread, we can remove 'volatile' qualifier
> which should improve the performance in datapath.
>
> While updating around, 'igb_stats' parameter renamed as 'stats'.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
> ---
> Cc: Mattias Rönnblom <mattias.ronnblom at ericsson.com>
> Cc: Stephen Hemminger <stephen at networkplumber.org>
> Cc: Morten Brørup <mb at smartsharesystems.com>
>
> This update triggered by mail list discussion [1].
>
> [1]
> https://inbox.dpdk.org/dev/3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.liu.se/
NAK
I did not hear a good argument why atomic or volatile was necessary in the first place.
Why?
Why is this driver special (a snowflake) compared to all the other drivers doing software
statistics (tap, virtio, xdp, ring, memif, netvsc, vmware)?
More information about the dev
mailing list