Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Matt Corallo <cltaapptfwbs@mattcorallo.com>, cake@lists.bufferbloat.net
Subject: [Cake] Re: Parsing DSCP out of skb->priority
Date: Tue, 09 Sep 2025 12:32:21 +0200	[thread overview]
Message-ID: <87cy7zor0q.fsf@toke.dk> (raw)
In-Reply-To: <78318be7-30d0-4f6a-80f3-063f4558b142@mattcorallo.com>

Matt Corallo <cltaapptfwbs@mattcorallo.com> writes:

> Its (presumably) not uncommon to have multiple encapsulation tunnels
> running on a host which then wants to do (cake) shaping on the actual
> outbound interface. In this case, the skb->hash is (hopefully)
> preserved from the original packet to select the right flow queue, but
> the DSCP isn't. This is ideally what the priority field of the skb is
> for - `skbedit` can set the priority flag of the packet before
> "exiting" the tunnel interface, and cake can ultimately read that
> priority flag to select a tin. However, doing so requires manual tin
> mapping in skbedit, reading the DSCP field and mapping them to the
> right tin entirely be hand.
>
> skbedit also supports `inheritdsfield` which just sets skb->priority
> to the DSCP field as-is. It would be nice if cake could read such
> priority fields, treating skb->priority as a DSCP when
> TC_H_MAJ(skb->priority) is zero (which it always will be in this
> case). Is there any interest in a patch to do so?

Hmm, we already have quite a few custom ways of assigning packets to
tins, so I'm not sure if it's really a good idea to add another one.
What you're describing is fairly straight-forward to do with a BPF
program, without any performance overhead compared to the mapping cake
itself is doing.

> Would such a patch need a new userspace option to disable it, or would
> wash suffice?

We certainly can't assume that any priority value is a diffserv value
without some sort of explicit opt-in. And adding an option just for this
is really pushing it in the complexity-to-niche-feature trade-off scale :)

-Toke

      reply	other threads:[~2025-09-09 10:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-07 12:40 [Cake] " Matt Corallo
2025-09-09 10:32 ` Toke Høiland-Jørgensen [this message]

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

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

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

  git send-email \
    --in-reply-to=87cy7zor0q.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=cake@lists.bufferbloat.net \
    --cc=cltaapptfwbs@mattcorallo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox