netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: chia-yu.chang@nokia-bell-labs.com
Cc: alok.a.tiwari@oracle.com, pctammela@mojatatu.com,
	horms@kernel.org, donald.hunter@gmail.com, xandfury@gmail.com,
	netdev@vger.kernel.org, dave.taht@gmail.com, pabeni@redhat.com,
	jhs@mojatatu.com, stephen@networkplumber.org,
	xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
	edumazet@google.com, andrew+netdev@lunn.ch, ast@fiberby.net,
	liuhangbin@gmail.com, shuah@kernel.org,
	linux-kselftest@vger.kernel.org, ij@kernel.org,
	ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com,
	g.white@cablelabs.com, ingemar.s.johansson@ericsson.com,
	mirja.kuehlewind@ericsson.com, cheshire@apple.com,
	rs.ietf@gmx.at, Jason_Livingood@comcast.com,
	vidhi_goel@apple.com
Subject: Re: [PATCH v20 net-next 6/6] Documentation: netlink: specs: tc: Add DualPI2 specification
Date: Fri, 27 Jun 2025 16:19:30 -0700	[thread overview]
Message-ID: <20250627161930.385554c0@kernel.org> (raw)
In-Reply-To: <20250621193331.16421-7-chia-yu.chang@nokia-bell-labs.com>

On Sat, 21 Jun 2025 21:33:31 +0200 chia-yu.chang@nokia-bell-labs.com
wrote:
> From: Chia-Yu Chang <chia-yu.chang@nokia-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.

  reply	other threads:[~2025-06-27 23:19 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21 19:33 [PATCH v20 net-next 0/6] DUALPI2 patch chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc chia-yu.chang
2025-06-24 11:01   ` Paolo Abeni
2025-06-27 23:25   ` Jakub Kicinski
2025-06-29 22:49     ` Chia-Yu Chang (Nokia)
2025-06-30 15:13       ` Jakub Kicinski
2025-06-30 15:51         ` Chia-Yu Chang (Nokia)
2025-06-30 16:23           ` Jakub Kicinski
2025-06-30 17:04             ` Chia-Yu Chang (Nokia)
2025-06-30 23:43               ` Jakub Kicinski
2025-07-01  5:41                 ` Chia-Yu Chang (Nokia)
2025-07-01 23:30                   ` Jakub Kicinski
2025-06-21 19:33 ` [PATCH v20 net-next 2/6] sched: Dump configuration and statistics " chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 3/6] sched: Add enqueue/dequeue " chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 4/6] selftests/tc-testing: Fix warning and style check on tdc.sh chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 5/6] selftests/tc-testing: Add selftests for qdisc DualPI2 chia-yu.chang
2025-06-21 19:33 ` [PATCH v20 net-next 6/6] Documentation: netlink: specs: tc: Add DualPI2 specification chia-yu.chang
2025-06-27 23:19   ` Jakub Kicinski [this message]
2025-06-29 22:32     ` Chia-Yu Chang (Nokia)
2025-06-30 15:12       ` Jakub Kicinski
2025-06-30 15:27         ` Chia-Yu Chang (Nokia)
2025-06-30 16:23           ` Jakub Kicinski
2025-06-24 11:08 ` [PATCH v20 net-next 0/6] DUALPI2 patch Paolo Abeni
2025-06-24 12:34 ` Ferenc Fejes
2025-06-24 13:53   ` Koen De Schepper (Nokia)
2025-06-25 10:10     ` Simon Horman

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=20250627161930.385554c0@kernel.org \
    --to=kuba@kernel.org \
    --cc=Jason_Livingood@comcast.com \
    --cc=alok.a.tiwari@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@fiberby.net \
    --cc=cheshire@apple.com \
    --cc=chia-yu.chang@nokia-bell-labs.com \
    --cc=dave.taht@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=g.white@cablelabs.com \
    --cc=horms@kernel.org \
    --cc=ij@kernel.org \
    --cc=ingemar.s.johansson@ericsson.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=koen.de_schepper@nokia-bell-labs.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=mirja.kuehlewind@ericsson.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pctammela@mojatatu.com \
    --cc=rs.ietf@gmx.at \
    --cc=shuah@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vidhi_goel@apple.com \
    --cc=xandfury@gmail.com \
    --cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).