[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <85f06f1f-2253-42a6-add3-ef7bad199322@intel.com>
Date: Thu, 29 Aug 2024 14:03:15 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, <edward.cree@....com>
CC: <linux-net-drivers@....com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<pabeni@...hat.com>, Edward Cree <ecree.xilinx@...il.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/6] sfc: implement basic per-queue stats
From: Jakub Kicinski <kuba@...nel.org>
Date: Wed, 28 Aug 2024 17:41:14 -0700
> On Wed, 28 Aug 2024 14:45:11 +0100 edward.cree@....com wrote:
>> + /* If a TX channel has XDP TXQs, the stats for these will be counted
>> + * under the channel rather than in base stats. Unclear whether this
>> + * is correct behaviour, but we can't reliably exclude XDP TXes from
>> + * these stats anyway because in EFX_XDP_TX_QUEUES_BORROWED we use
>> + * the same TXQ as the core.
>> + */
>> + efx_for_each_channel_tx_queue(tx_queue, channel)
>> + stats->packets += tx_queue->tx_packets - tx_queue->old_tx_packets;
>
> We haven't had to deal with shared host/XDP queues in the other
> drivers, yet. But talking to Olek about his stats work it sounds
> like he's planning to add support for reporting XDP queues.
> At which point it will be relatively intuitive - if XDP queues
> are listed - they count XDP packets, if not, and XDP_TX happens
> - the queues must be shared and so are the counters.
>
> IOW let's not count dedicated XDP queues here at all, if we can.
> XDP traffic on shared queues can get added in.
Yes, I agree. If a queue is shared between XDP and regular traffic,
everything should go to the NL stats. But if the driver allocates
dedicated XDP queues not exposed to the stack (i.e. above
dev->num_tx_queues), they shouldn't count for now.
Thanks,
Olek
Powered by blists - more mailing lists