Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames
From: David Miller <davem@davemloft.net>
Date: 2019-01-31 17:45:26
From: David Miller <davem@davemloft.net>
Date: 2019-01-31 17:45:26
From: "Michael S. Tsirkin" <mst@redhat.com> Date: Thu, 31 Jan 2019 10:25:17 -0500
On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote:quoted
Previously virtnet_xdp_xmit() did not account for device tx counters, which caused confusions. To be consistent with SKBs, account them on freeing xdp_frames. Reported-by: David Ahern <redacted> Signed-off-by: Toshiaki Makita <redacted>Well we count them on receive so I guess it makes sense for consistency Acked-by: Michael S. Tsirkin <mst@redhat.com> however, I really wonder whether adding more and more standard net stack things like this will end up costing most of XDP its speed. Should we instead make sure *not* to account XDP packets in any counters at all? XDP programs can use maps to do their own counting...
This has been definitely a discussion point, and something we should develop a clear, strong, policy on. David, Jesper, care to chime in where we ended up in that last thread discussion this?