Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-08 Thread Jesper Dangaard Brouer
On Wed, 6 Feb 2019 00:06:33 + Saeed Mahameed wrote: > 2) Driver should keep track of XDP decisions statistics, report them in > ethtool and in the new API suggested by David. track even (XDP_PASS) ? > > Maybe instead of having all drivers track the statistics on their own, > we should move t

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-06 Thread Jakub Kicinski
On Wed, 6 Feb 2019 14:48:14 +0100, Jesper Dangaard Brouer wrote: > On Wed, 6 Feb 2019 00:06:33 + > Saeed Mahameed wrote: > > > 3) Unrelated, In non XDP case, if skb allocation fails or driver fails > > to pass the skb up to the stack for somereason, should the driver > > increase rx packets ?

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-06 Thread Jesper Dangaard Brouer
On Wed, 6 Feb 2019 00:06:33 + Saeed Mahameed wrote: > 3) Unrelated, In non XDP case, if skb allocation fails or driver fails > to pass the skb up to the stack for somereason, should the driver > increase rx packets ? IMHO the answer should be yes if we want to have > similar behavior between

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-05 Thread Saeed Mahameed
On Mon, 2019-02-04 at 19:13 -0800, David Ahern wrote: > On 2/4/19 3:53 AM, Jesper Dangaard Brouer wrote: > > On Sat, 2 Feb 2019 14:27:26 -0700 > > David Ahern wrote: > > > > > On 1/31/19 1:15 PM, Jesper Dangaard Brouer wrote: > > > > > David, Jesper, care to chime in where we ended up in that > >

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-04 Thread David Ahern
On 2/4/19 3:53 AM, Jesper Dangaard Brouer wrote: > On Sat, 2 Feb 2019 14:27:26 -0700 > David Ahern wrote: > >> On 1/31/19 1:15 PM, Jesper Dangaard Brouer wrote: David, Jesper, care to chime in where we ended up in that last thread discussion this? >>> >>> IHMO packets RX and TX o

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-04 Thread Jesper Dangaard Brouer
On Sat, 2 Feb 2019 14:27:26 -0700 David Ahern wrote: > On 1/31/19 1:15 PM, Jesper Dangaard Brouer wrote: > >> > >> David, Jesper, care to chime in where we ended up in that last thread > >> discussion this? > > > > IHMO packets RX and TX on a device need to be accounted, in standard > > counte

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-03 Thread David Miller
From: Toshiaki Makita Date: Thu, 31 Jan 2019 20:40:30 +0900 > 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 > Signed-off-by: Toshiaki Makita Applie

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-02-02 Thread David Ahern
On 1/31/19 1:15 PM, Jesper Dangaard Brouer wrote: >> >> David, Jesper, care to chime in where we ended up in that last thread >> discussion this? > > IHMO packets RX and TX on a device need to be accounted, in standard > counters, regardless of XDP. For XDP RX the packet is counted as RX, > regar

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Toshiaki Makita
On 2019/02/01 5:15, Jesper Dangaard Brouer wrote: > On Thu, 31 Jan 2019 09:45:23 -0800 (PST) > David Miller wrote: > >> From: "Michael S. Tsirkin" >> Date: Thu, 31 Jan 2019 10:25:17 -0500 >> >>> On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: Previously virtnet_xdp_xmit()

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Jesper Dangaard Brouer
On Thu, 31 Jan 2019 09:45:23 -0800 (PST) David Miller wrote: > From: "Michael S. Tsirkin" > Date: Thu, 31 Jan 2019 10:25:17 -0500 > > > On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: > >> Previously virtnet_xdp_xmit() did not account for device tx counters, > >> which caused

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread David Miller
From: "Michael S. Tsirkin" Date: Thu, 31 Jan 2019 10:25:17 -0500 > On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: >> Previously virtnet_xdp_xmit() did not account for device tx counters, >> which caused confusions. >> To be consistent with SKBs, account them on freeing xdp_frame

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Michael S. Tsirkin
On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: > 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 > Signed-off-by: Toshiaki Makita Wel