From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Question: AF-Independence of ECN (was [PATCH 0/4] inet6: minor cleanups)
Date: Wed, 22 Jul 2009 22:17:31 +0200 [thread overview]
Message-ID: <20090722201731.GA8877@gerrit.erg.abdn.ac.uk> (raw)
In-Reply-To: <20090721.125745.210846096.davem@davemloft.net>
Thank you for reviewing the patches.
| > Patch #4: Finds that RT_TOS() redefines IPTOS_TOS().
|
| This macro probably exists so that if the ipv4 route cache entry TOS
| representation changes compared to IPTOS_TOS(), we would simply have
| to change the definition of this macro.
|
| Just because they happen to be the same now is no reason to kill off
| this macro I think.
|
| I'm not applying this either.
|
These patches are a byproduct of studying the code. I think it is better to
post the question I am trying to resolve, before discussing any more patches.
I hope that there will be some input and/or discussion.
The problem is that
* IPv4 TOS and IPv6 Traffic Class have identical semantics
- the DiffServ bits 0..5 due to RFC 2474,
- the 'CU'/ECN bits 6,7 due to RFC 3168.
* in the code this is currently handled AF-dependent:
- as inet_sk's "tos" field,
- as ipv6_pinfo's "tclass" field.
There are already three existing Linux transport protocols affected by
the AF-dependence of ECN:
* TCPv4 supports ECN, but TCPv6 currently does not;
* SCTP achieves ECN support for v4 and v6 only with difficulties:
- it uses a function pointer 'ecn_capable', which calls wrappers around
- INET_ECN_xmit (sctp_v4_ecn_capable)
- modification of inet6_sk(sk)->tclass (sctp_v6_ecn_capable)
* DCCP ECN is not supported yet, but a working patch set exists.
So the whole point is: to achieve AF-independent ECN/DiffServ support,
I was using an ugly hack to work around the existing AF-dependence:
#define IP6_ECN_flow_xmit(sk, label) do { \
- if (INET_ECN_is_capable(inet6_sk(sk)->tclass)) \
- (label) |= htonl(INET_ECN_ECT_0 << 20); \
+ IP6_ECN_flow_init(label); \
+ (label) |= htonl((inet_sk(sk)->tos & INET_ECN_MASK) << 20); \
} while (0)
Realising that
* this is so ugly that I don't want to submit it (it has been the reason for
several patches sitting idly for a couple of months), and
* finding that other transport protocols are facing a similar situation,
I am interested in solving the problem so that
(a) the DCCP code becomes usable and
(b) other transport protocols might benefit from a more generic solution.
My question:
* is there support for an AF-independent use of ECN/DiffServ field?
* what needs to be considered other than a good understanding of the code:
- are there possible breakages,
- legacy code or,
- anything else that would prevent this?
Gerrit
prev parent reply other threads:[~2009-07-22 20:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <inet6_minor_cleanups>
2009-07-19 18:23 ` [PATCH 0/4] inet6: minor cleanups Gerrit Renker
2009-07-19 18:23 ` [PATCH 1/4] inet6: Return convention in datagram_send_ctl Gerrit Renker
2009-07-19 18:23 ` [PATCH 2/4] inet6: Consolidate common code for IPv6 Hop Limit / Traffic Class Gerrit Renker
2009-07-19 18:23 ` [PATCH 3/4] inet6: Conversion from u8 to int Gerrit Renker
2009-07-19 18:23 ` [PATCH 4/4] inet: in_route.h redefined macro Gerrit Renker
2009-07-21 19:57 ` [PATCH 0/4] inet6: minor cleanups David Miller
2009-07-22 20:17 ` Gerrit Renker [this message]
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=20090722201731.GA8877@gerrit.erg.abdn.ac.uk \
--to=gerrit@erg.abdn.ac.uk \
--cc=davem@davemloft.net \
--cc=netdev@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