Subject: Re: [RFC PATCH net-next 05/15] net/sched: taprio: give higher priority to higher TCs in software dequeue mode

From: Kurt Kanzenbach <[email-masked]>
Date: Sat, 28 Jan 2023 13:04:37 +0100

On Sat Jan 28 2023, Vladimir Oltean wrote:
> Currently taprio iterates over child qdiscs in increasing order of TXQ
> index, therefore giving higher xmit priority to TXQ 0 and lower to TXQ N.
>
> However, to the best of my understanding, we should prioritize based on
> the traffic class, so we should really dequeue starting with the highest
> traffic class and going down from there. We get to the TXQ using the
> tc_to_txq[] netdev property.
>
> TXQs within the same TC have the same (strict) priority, so we should
> pick from them as fairly as we can. Implement something very similar to
> q->curband from multiq_dequeue().

Totally makes sense to me...

>
> Something tells me Vinicius won't like the way in which this patch
> interacts with TXTIME_ASSIST_IS_ENABLED(q->flags) and NICs where TXQ 0
> really has higher priority than TXQ 1....

However, this change may be problematic for i210/i225/i226 NIC(s).

AFAIK the Tx queue priorities for i225/i226 are configurable. Meaning
the default could be adjusted to have Tx queue 4 with higher priority
than 3 and so on. For i210 I don't know. Also Tx Launch Time only works
for the lower queues. Hm.

Thanks,
Kurt