All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kurt Kanzenbach <kurt@linutronix.de>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Subject: Re: [RFC PATCH net-next 06/15] net/sched: taprio: calculate tc gate durations
Date: Sat, 28 Jan 2023 13:05:09 +0100	[thread overview]
Message-ID: <87h6wavp8q.fsf@kurt> (raw)
In-Reply-To: <20230128010719.2182346-7-vladimir.oltean@nxp.com>

[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]

On Sat Jan 28 2023, Vladimir Oltean wrote:
> Current taprio code operates on a very simplistic (and incorrect)
> assumption: that egress scheduling for a traffic class can only take
> place for the duration of the current interval, or i.o.w., it assumes
> that at the end of each schedule entry, there is a "gate close" event
> for all traffic classes.
>
> As an example, traffic sent with the schedule below will be jumpy, even
> though all 8 TC gates are open, so there is absolutely no "gate close"
> event (effectively a transition from BIT(tc)==1 to BIT(tc)==0 in
> consecutive schedule entries):
>
> tc qdisc replace dev veth0 parent root taprio \
> 	num_tc 2 \
> 	map 0 1 \
> 	queues 1@0 1@1 \
> 	base-time 0 \
> 	sched-entry S 0xff 4000000000 \
> 	clockid CLOCK_TAI \
> 	flags 0x0
>
> This qdisc simply does not have what it takes in terms of logic to
> *actually* compute the durations of traffic classes. Also, it does not
> recognize the need to use this information on a per-traffic-class basis:
> it always looks at entry->interval and entry->close_time.
>
> This change proposes that each schedule entry has an array called
> tc_gate_duration[tc]. This holds the information: "for how long will
> this traffic class gate remain open, starting from *this* schedule
> entry". If the traffic class gate is always open, that value is equal to
> the cycle time of the schedule.
>
> We'll also need to keep track, for the purpose of queueMaxSDU[tc]
> calculation, what is the maximum time duration for a traffic class
> having an open gate. This gives us directly what is the maximum sized
> packet that this traffic class will have to accept. For everything else
> it has to qdisc_drop() it in qdisc_enqueue().
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2023-01-28 12:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  1:07 [RFC PATCH net-next 00/15] taprio fixprovements Vladimir Oltean
2023-01-28  1:07 ` [RFC PATCH net-next 01/15] net/sched: taprio: delete peek() implementation Vladimir Oltean
2023-01-28 11:59   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 02/15] net/sched: taprio: continue with other TXQs if one dequeue() failed Vladimir Oltean
2023-01-28 11:59   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 03/15] net/sched: taprio: refactor one skb dequeue from TXQ to separate function Vladimir Oltean
2023-01-28 11:59   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 04/15] net/sched: taprio: avoid calling child->ops->dequeue(child) twice Vladimir Oltean
2023-01-28 12:00   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 05/15] net/sched: taprio: give higher priority to higher TCs in software dequeue mode Vladimir Oltean
2023-01-28 12:04   ` Kurt Kanzenbach
2023-01-29 13:17     ` Vladimir Oltean
2023-01-31  9:37       ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 06/15] net/sched: taprio: calculate tc gate durations Vladimir Oltean
2023-01-28 12:05   ` Kurt Kanzenbach [this message]
2023-01-28  1:07 ` [RFC PATCH net-next 07/15] net/sched: taprio: rename close_time to end_time Vladimir Oltean
2023-01-28 12:05   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 08/15] net/sched: taprio: calculate budgets per traffic class Vladimir Oltean
2023-01-28 12:05   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 09/15] net/sched: taprio: calculate guard band against actual TC gate close time Vladimir Oltean
2023-01-28 12:05   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 10/15] net/sched: make stab available before ops->init() call Vladimir Oltean
2023-01-28 12:06   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 11/15] net/sched: taprio: warn about missing size table Vladimir Oltean
2023-01-28 12:06   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 12/15] net/sched: keep the max_frm_len information inside struct sched_gate_list Vladimir Oltean
2023-01-28 12:06   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 13/15] net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations Vladimir Oltean
2023-01-28 12:06   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 14/15] net/sched: taprio: split segmentation logic from qdisc_enqueue() Vladimir Oltean
2023-01-28 12:07   ` Kurt Kanzenbach
2023-01-28  1:07 ` [RFC PATCH net-next 15/15] net/sched: taprio: don't segment unnecessarily Vladimir Oltean
2023-01-28 12:07   ` Kurt Kanzenbach
2023-01-28 12:20 ` [RFC PATCH net-next 00/15] taprio fixprovements Kurt Kanzenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6wavp8q.fsf@kurt \
    --to=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.