netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 1/2] src: add dscp support
Date: Thu, 26 Nov 2015 10:45:11 +0100	[thread overview]
Message-ID: <20151126094511.GA1442@salvia> (raw)
In-Reply-To: <20151125232323.GD20093@macbook.localdomain>

On Wed, Nov 25, 2015 at 11:23:23PM +0000, Patrick McHardy wrote:
> On 25.11, Pablo Neira Ayuso wrote:
> > On Wed, Nov 25, 2015 at 08:45:13PM +0000, Patrick McHardy wrote:
> > > On 25.11, Pablo Neira Ayuso wrote:
> > > > On Wed, Nov 25, 2015 at 08:01:25PM +0000, Patrick McHardy wrote:
> > > > > On 25.11, Pablo Neira Ayuso wrote:
> > > > > >  #define TYPE_MAX		(__TYPE_MAX - 1)
> > > > > > diff --git a/include/proto.h b/include/proto.h
> > > > > > index a43bf98..41af0c1 100644
> > > > > > --- a/include/proto.h
> > > > > > +++ b/include/proto.h
> > > > > > @@ -176,7 +176,7 @@ enum ip_hdr_fields {
> > > > > >  	IPHDR_INVALID,
> > > > > >  	IPHDR_VERSION,
> > > > > >  	IPHDR_HDRLENGTH,
> > > > > > -	IPHDR_TOS,
> > > > > > +	IPHDR_DSCP,
> > > > > 
> > > > > Shouldn't we keep both? I think it should work to do that or at least not be
> > > > > difficult to make it work.
> > > > 
> > > > Last time we discussed this, people arised concerns related to the
> > > > fact that this is obsolete, and nobody should be using this these
> > > > days.
> > > 
> > > I don't really buy into these arguments. We support lots of obsolete things,
> > > the fact is that even though it is obsoleted, it still exists and for old
> > > devices might even be the only thing they support.
> > 
> > ToS breaks useful things like ECN, and the more I keep reading docs on
> > the Internet, the more problem I have to see how the user can benefit
> > from this.
> 
> We *match* on ToS, that cannot possibly break anything. Also I'm unsure how
> this could break ECN even otherwise, ToS does not even use the ECN bits.

ToS bits overlap with ECN bits, from that original ToS 8 bit-field now
we use 6 bit for DSCP and 2 bits for ECN.

> Its quite simple, if the user has old devices that set ToS values, he will
> be able to match on that without manually converting it to DSCP values.
> Given that our current tos definition is also not to practical for that
> since its too broad, I don't really care that much, although I think it
> should rather be fixed than simply thrown out.

People that designed DSCP and ECN did not care about having some
reasonable backward compatible behaviour wrt. ToS. They just changed
the semantics of those bits long time ago.

I can explore keeping this backward if you like, we can probably
accept ToS from the parser, then map it to DSCP, but that will no
achieve what the user expected on the network. I'm usually reticent to
break old stuff, but in this case I would skip.

Cheers,
Pablo

  reply	other threads:[~2015-11-26  9:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 19:39 [PATCH nft 1/2] src: add dscp support Pablo Neira Ayuso
2015-11-25 19:39 ` [PATCH nft 2/2] src: add ecn support Pablo Neira Ayuso
2015-11-25 20:02   ` Patrick McHardy
2015-11-25 20:01 ` [PATCH nft 1/2] src: add dscp support Patrick McHardy
2015-11-25 20:22   ` Pablo Neira Ayuso
2015-11-25 20:45     ` Patrick McHardy
2015-11-25 22:05       ` Pablo Neira Ayuso
2015-11-25 23:23         ` Patrick McHardy
2015-11-26  9:45           ` Pablo Neira Ayuso [this message]
2015-11-26  9:54             ` Patrick McHardy
2015-11-26 10:28               ` Pablo Neira Ayuso
2015-11-26 10:42                 ` Patrick McHardy
2015-11-25 23:17   ` Jan Engelhardt
2015-11-25 23:27     ` Patrick McHardy

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=20151126094511.GA1442@salvia \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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).