[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb9b316f-4703-69fd-31cc-41dc3c13c50f@lab.ntt.co.jp>
Date: Wed, 28 Nov 2018 14:09:27 +0900
From: Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
To: Jason Wang <jasowang@...hat.com>, David Ahern <dsahern@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc: Paweł Staszewski <pstaszewski@...are.pl>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Saeed Mahameed <saeedm@...lanox.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
David Miller <davem@...emloft.net>
Subject: Re: consistency for statistics with XDP mode
On 2018/11/28 13:03, Jason Wang wrote:
> On 2018/11/27 下午3:04, Toshiaki Makita wrote:
>> On 2018/11/26 10:37, Toshiaki Makita wrote:
>>> On 2018/11/23 1:43, David Ahern wrote:
>>>> On 11/21/18 5:53 PM, Toshiaki Makita wrote:
>>>>>> We really need consistency in the counters and at a minimum, users
>>>>>> should be able to track packet and byte counters for both Rx and Tx
>>>>>> including XDP.
>>>>>>
>>>>>> It seems to me the Rx and Tx packet, byte and dropped counters
>>>>>> returned
>>>>>> for the standard device stats (/proc/net/dev, ip -s li show, ...)
>>>>>> should
>>>>>> include all packets managed by the driver regardless of whether
>>>>>> they are
>>>>>> forwarded / dropped in XDP or go up the Linux stack. This also aligns
>>>>> Agreed. When I introduced virtio_net XDP counters, I just forgot to
>>>>> update tx packets/bytes counters on ndo_xdp_xmit. Probably I
>>>>> thought it
>>>>> is handled by free_old_xmit_skbs.
>>>> Do you have some time to look at adding the Tx counters to virtio_net?
>>> hoping I can make some time within a couple of days.
>> Hmm... It looks like free_old_xmit_skbs() calls dev_consume_skb_any()
>> for xdp_frame when napi_tx is enabled. I will fix this beforehand.
>
>
> Good catch. But the fix may require some thought. E.g one idea is to not
> call free_old_xmit_skbs() for XDP TX ring?
Yes, that's what I'm planning to do.
--
Toshiaki Makita
Powered by blists - more mailing lists