From: Daniel Machon <daniel.machon@microchip.com>
To: Ido Schimmel <idosch@nvidia.com>
Cc: <netdev@vger.kernel.org>, <dsahern@gmail.com>,
<stephen@networkplumber.org>, <gnault@redhat.com>,
<petrm@nvidia.com>
Subject: Re: [PATCH iproute2-next 2/2] iprule: Add DSCP support
Date: Thu, 10 Oct 2024 12:00:24 +0000 [thread overview]
Message-ID: <20241010120024.tq7headjnkytbt5a@DEN-DL-M70577> (raw)
In-Reply-To: <20241009062054.526485-3-idosch@nvidia.com>
> Add support for 'dscp' selector in ip-rule.
>
> Rules can be added with a numeric DSCP value:
>
> # ip rule add dscp 1 table 100
> # ip rule add dscp 0x02 table 200
>
> Or using symbolic names from /usr/share/iproute2/rt_dsfield or
> /etc/iproute2/rt_dsfield:
>
> # ip rule add dscp AF42 table 300
>
> Dump output:
>
> $ ip rule show
> 0: from all lookup local
> 32763: from all lookup 300 dscp AF42
> 32764: from all lookup 200 dscp 2
> 32765: from all lookup 100 dscp 1
> 32766: from all lookup main
> 32767: from all lookup default
>
> Dump can be filtered by DSCP value:
>
> $ ip rule show dscp 1
> 32765: from all lookup 100 dscp 1
>
> Or by a symbolic name:
>
> $ ip rule show dscp AF42
> 32763: from all lookup 300 dscp AF42
>
> When the numeric option is specified, symbolic names will be translated
> to numeric values:
>
> $ ip -N rule show
> 0: from all lookup 255
> 32763: from all lookup 300 dscp 36
> 32764: from all lookup 200 dscp 2
> 32765: from all lookup 100 dscp 1
> 32766: from all lookup 254
> 32767: from all lookup 253
>
> The same applies to the JSON output in order to be consistent with
> existing fields such as "tos" and "table":
>
> $ ip -j -p rule show dscp AF42
> [ {
> "priority": 32763,
> "src": "all",
> "table": "300",
> "dscp": "AF42"
> } ]
>
> $ ip -j -p -N rule show dscp AF42
> [ {
> "priority": 32763,
> "src": "all",
> "table": "300",
> "dscp": "36"
> } ]
>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
LGTM.
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
next prev parent reply other threads:[~2024-10-10 12:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 6:20 [PATCH iproute2-next 0/2] iprule: Add DSCP support Ido Schimmel
2024-10-09 6:20 ` [PATCH iproute2-next 1/2] man: Add ip-rule(8) as generation target Ido Schimmel
2024-10-10 11:59 ` Daniel Machon
2024-10-10 22:14 ` Guillaume Nault
2024-10-09 6:20 ` [PATCH iproute2-next 2/2] iprule: Add DSCP support Ido Schimmel
2024-10-10 12:00 ` Daniel Machon [this message]
2024-10-10 22:14 ` Guillaume Nault
2024-10-11 0:30 ` [PATCH iproute2-next 0/2] " patchwork-bot+netdevbpf
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=20241010120024.tq7headjnkytbt5a@DEN-DL-M70577 \
--to=daniel.machon@microchip.com \
--cc=dsahern@gmail.com \
--cc=gnault@redhat.com \
--cc=idosch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=stephen@networkplumber.org \
/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