[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250627161930.385554c0@kernel.org>
Date: Fri, 27 Jun 2025 16:19:30 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: chia-yu.chang@...ia-bell-labs.com
Cc: alok.a.tiwari@...cle.com, pctammela@...atatu.com, horms@...nel.org,
donald.hunter@...il.com, xandfury@...il.com, netdev@...r.kernel.org,
dave.taht@...il.com, pabeni@...hat.com, jhs@...atatu.com,
stephen@...workplumber.org, xiyou.wangcong@...il.com, jiri@...nulli.us,
davem@...emloft.net, edumazet@...gle.com, andrew+netdev@...n.ch,
ast@...erby.net, liuhangbin@...il.com, shuah@...nel.org,
linux-kselftest@...r.kernel.org, ij@...nel.org, ncardwell@...gle.com,
koen.de_schepper@...ia-bell-labs.com, g.white@...lelabs.com,
ingemar.s.johansson@...csson.com, mirja.kuehlewind@...csson.com,
cheshire@...le.com, rs.ietf@....at, Jason_Livingood@...cast.com,
vidhi_goel@...le.com
Subject: Re: [PATCH v20 net-next 6/6] Documentation: netlink: specs: tc: Add
DualPI2 specification
On Sat, 21 Jun 2025 21:33:31 +0200 chia-yu.chang@...ia-bell-labs.com
wrote:
> From: Chia-Yu Chang <chia-yu.chang@...ia-bell-labs.com>
>
> Introduce the specification of tc qdisc DualPI2 stats and attributes,
> which is the reference implementation of IETF RFC9332 DualQ Coupled AQM
> (https://datatracker.ietf.org/doc/html/rfc9332) providing two different
> queues: low latency queue (L-queue) and classic queue (C-queue).
> diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
> index 4cc1f6a45001..8a183799dceb 100644
> --- a/Documentation/netlink/specs/tc.yaml
> +++ b/Documentation/netlink/specs/tc.yaml
> @@ -56,6 +56,41 @@ definitions:
> - tundf
> - tunoam
> - tuncrit
> + -
> + name: dualpi2-drop-overload
> + name-prefix: tca-dualpi2-drop-overload-
As far as I understand tca / TCA stands for TC Attribute.
This is an enum for values, not for netlink attribute IDs,
tc-dualpi2-drop-overload- would be less confusing here
Which may in fact mean that you don't need name-prefix,
because I think that's what the default name would be.
same thing for other value enums
> + type: enum
> + entries:
FWIW if you don't document you can use the shorter notation:
entries: [overflow, drop]
> + - overflow
> + - drop
> + -
> + name: dualpi2-drop-early
> + name-prefix: tca-dualpi2-drop-early-
> + type: enum
> + entries:
> + - drop-dequeue
> + - drop-enqueue
> + -
> + name: dualpi2-ecn-mask
> + name-prefix: tca-dualpi2-ecn-mask-
> + type: enum
you can use
value-start: 1
entries: [l4s..
or just drop the values for entries other than first.
in enums the next value takes the previuos value + 1 by default
> + entries:
> + -
> + name: l4s-ect
> + value: 1
> + -
> + name: cla-ect
> + value: 2
> + -
> + name: any-ect
> + value: 3
> + -
> + name: tc-dualpi2-xstats
> + type: struct
> + members:
> + -
> + name: prob
> + type: u32
> + doc: Current probability
what's the probability of ?
> + -
> + name: ecn-mark
> + type: u32
> + doc: All packets marked with ecn
ECN
> + -
> + name: step-thresh
> + type: u32
> + doc: L4S step marking threshold (see also step-packets)
> + -
> + name: step-packets
> + type: flag
> + doc: L4S Step marking threshold unit in packets
> + (otherwise is in microseconds)
Why mux two distinct values in one attr and carry another attr for the
unit? IMO it'd be more idiomatic for Netlink to define two attributes,
one for threshold in packets and one in time. And enforce that only one
can be sent in a message (probably using an explicit check in the code).
Conversely only report one in GET / DUMP.
> + -
> + name: min-qlen-step
> + type: u32
> + doc: Packets enqueued to the L-queue can apply the step threshold
> + when the queue length of L-queue is larger than this value.
> + (0 is recommended)
> + -
> + name: coupling
> + type: u8
> + doc: Probability coupling factor between Classic and L4S
> + (2 is recommended)
> + -
> + name: drop-overload
> + type: u8
> + doc: Control the overload strategy (drop to preserve latency or
> + let the queue overflow)
> + enum: dualpi2-drop-overload
> + -
> + name: drop-early
> + type: u8
> + doc: Decide where the Classic packets are PI-based dropped or marked
> + enum: dualpi2-drop-early
> + -
> + name: c-protection
> + type: u8
> + doc: Classic WRR weight in percentage (from 0 to 100)
> + -
> + name: ecn-mask
> + type: u8
> + doc: Configure the L-queue ECN classifier
> + enum: dualpi2-ecn-mask
> + -
> + name: split-gso
> + type: u8
> + doc: Split aggregated skb or not
> + enum: dualpi2-split-gso
Keep in mind that values in netlink are in 4B granularity, so all these
will be carried as 1B + 3B of padding. If there's any chance you may
need more bits in the future u32 is a safer default choice.
Powered by blists - more mailing lists