From: Guillaume Nault <gnault@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Russell Strong <russell@strong.id.au>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: DSCP in IPv4 routing
Date: Fri, 13 Nov 2020 10:02:25 +0100 [thread overview]
Message-ID: <20201113090225.GA25425@linux.home> (raw)
In-Reply-To: <20201112193656.73621cd5@hermes.local>
On Thu, Nov 12, 2020 at 07:36:56PM -0800, Stephen Hemminger wrote:
> On Fri, 13 Nov 2020 12:06:37 +1000
> Russell Strong <russell@strong.id.au> wrote:
>
> > diff --git a/include/uapi/linux/in_route.h
> > b/include/uapi/linux/in_route.h index 0cc2c23b47f8..db5d236b9c50 100644
> > --- a/include/uapi/linux/in_route.h
> > +++ b/include/uapi/linux/in_route.h
> > @@ -28,6 +28,6 @@
> >
> > #define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
> >
> > -#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
> > +#define RT_TOS(tos) ((tos)&IPTOS_DS_MASK)
> >
>
> Changing behavior of existing header files risks breaking applications.
>
> > diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
> > index ce54a30c2ef1..1499105d1efd 100644
> > --- a/net/ipv4/fib_rules.c
> > +++ b/net/ipv4/fib_rules.c
> > @@ -229,7 +229,7 @@ static int fib4_rule_configure(struct fib_rule
> > *rule, struct sk_buff *skb, int err = -EINVAL;
> > struct fib4_rule *rule4 = (struct fib4_rule *) rule;
> >
> > - if (frh->tos & ~IPTOS_TOS_MASK) {
> > + if (frh->tos & ~IPTOS_RT_MASK) {
>
> This needs to be behind a sysctl and the default has to be to keep
> the old behavior
Can't we just define a new DSCP mask and replace the users of TOS one
by one? In most cases DSCP just makes the 3 highest bits available,
which souldn't change existing behaviours. We just need to pay
attention to the ECN bit that'd be masked out by DSCP but not by old
TOS. However, ECN has been supported for a long time, so most usages of
TOS already clear both ECN bits.
Let's not add a new sysctl if not necessary and, in any case, let's not
change macros blindly.
next prev parent reply other threads:[~2020-11-13 9:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 2:06 [PATCH net-next] net: DSCP in IPv4 routing Russell Strong
2020-11-13 3:36 ` Stephen Hemminger
2020-11-13 9:02 ` Guillaume Nault [this message]
2020-11-14 23:03 ` Russell Strong
2020-11-14 23:09 ` Russell Strong
2020-11-14 23:10 ` Russell Strong
2020-11-17 0:21 ` kernel test robot
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=20201113090225.GA25425@linux.home \
--to=gnault@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=russell@strong.id.au \
--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;
as well as URLs for NNTP newsgroup(s).