Subject: Re: [PATCH net-next 2/6] sfc: implement basic per-queue stats

From: Jakub Kicinski <[email-masked]>
Date: Wed, 28 Aug 2024 17:41:14 -0700

On Wed, 28 Aug 2024 14:45:11 +0100 [email-masked] 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.