On Wed, 24 Apr 2024 18:50:50 +0100
Ferruh Yigit <ferruh.yi...@amd.com> wrote:

> > I don't know how slow af_packet is, but if you care about performance,
> > you don't want to use atomic add for statistics.
> >   
> 
> There are a few soft drivers already using atomics adds for updating stats.
> If we document expectations from 'rte_eth_stats_reset()', we can update
> those usages.

Using atomic add is lots of extra overhead. The statistics are not guaranteed
to be perfect.  If nothing else, the bytes and packets can be skewed.

The soft drivers af_xdp, af_packet, and tun performance is dominated by the
overhead of the kernel system call and copies. Yes, alignment is good
but won't be noticeable.

Reply via email to