Discussion of explicit congestion notification's impact on the Internet
 help / color / mirror / Atom feed
From: "Rodney W. Grimes" <4bone@gndrsh.dnsmgr.net>
To: Jonathan Morton <chromatix99@gmail.com>
Cc: "Rodney W. Grimes" <4bone@gndrsh.dnsmgr.net>,
	Dave Taht <dave.taht@gmail.com>,
	ECN-Sane <ecn-sane@lists.bufferbloat.net>
Subject: Re: [Ecn-sane] Fwd: [PATCH net] ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst()
Date: Tue, 29 Dec 2020 12:13:16 -0800 (PST)	[thread overview]
Message-ID: <202012292013.0BTKDGCk078796@gndrsh.dnsmgr.net> (raw)
In-Reply-To: <977989B4-3537-40CC-8877-E78FE00B0A74@gmail.com>

> > On 29 Dec, 2020, at 3:33 pm, Rodney W. Grimes <4bone@gndrsh.dnsmgr.net> wrote:
> > 
> > A better fix might be to create some new macros, make the
> > old macro emmit a compile time warning to weed out the
> > bad use cases:
> > a)  Modify RT_TOS to assert a compile time warning to
> >    flag old usage.
> > 
> > b)  create RT_TOSBYTE, this returns the whole byte, used
> >    to replace RT_TOS when the whole byte is needed and
> >    dealt with properly.
> > 
> > c)  create RT_TOSTOSBITS, this returns ONLY the TOS bits,
> >    and probably should replace most of the current calls
> >    to RT_TOS with this, after inspecting the code to
> >    make sure it does the right thing.
> > 
> > d)  create RT_TOSECNBITS, this returns ONLY the ECN bits
> 
> Agree with the principle here, quibble with the terminology.  Better names for these new macros:

:-)  Its, blue, I tell you that bike shed must be blue!  :-)  

> 
> RT_TOSBYTE
> RT_TOS_DSFIELD
> RT_TOS_ECNFIELD

I agree that these are better names.

> 
> This emphasises that the "TOS bits" and Precedence field have been absorbed into the Diffserv field for the past 20 years already, and that generally the talk is nowadays of a "field" or a "flag" rather than "bits".
> 
> I would seriously consider also making the DSFIELD macro return a right-justified value, matching most Diffserv documentation tables, rather than just masking out the left-justified position it occupies within the TOS byte.  This requires a second macro to correctly insert a fresh right-justified value into the left-justified position, ideally without disturbing any ECN field value already present.  There is some evidence that mishandling this is a significant source of bugs in user code, if not also in kernel code.

That does make since but my concern is this would require more than just a drop in replacement of RT_TOS as now you would need to replace the macro and probably modify other nerby code.

If these are purely kernel macros that scope of work is well contained.  Are these macro's exported from a header to userland visible code?

>  - Jonathan Morton

-- 
Rod Grimes                                                 rgrimes@freebsd.org

  reply	other threads:[~2020-12-29 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <49ff39b1f55c914847cd58678bae6282112db701.1608836260.git.gnault@redhat.com>
2020-12-29  3:18 ` Dave Taht
2020-12-29 13:33   ` Rodney W. Grimes
2020-12-29 15:21     ` Jonathan Morton
2020-12-29 20:13       ` Rodney W. Grimes [this message]
2020-12-29 20:59         ` Jonathan Morton

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

  List information: https://lists.bufferbloat.net/postorius/lists/ecn-sane.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202012292013.0BTKDGCk078796@gndrsh.dnsmgr.net \
    --to=4bone@gndrsh.dnsmgr.net \
    --cc=chromatix99@gmail.com \
    --cc=dave.taht@gmail.com \
    --cc=ecn-sane@lists.bufferbloat.net \
    /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