From: Eric Dumazet Date: Sat, 22 Oct 2011 05:25:23 +0000 (-0400) Subject: inet: add rfc 3168 extract in front of INET_ECN_encapsulate() X-Git-Tag: firefly_0821_release~3680^2~4326^2~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b5d9c9c281395f0967c8d93f42e8b0b8175b5180;p=firefly-linux-kernel-4.4.55.git inet: add rfc 3168 extract in front of INET_ECN_encapsulate() INET_ECN_encapsulate() is better understood if we can read the official statement. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 2fa8d1341a0a..2fa14691869c 100644 --- a/include/net/inet_ecn.h +++ b/include/net/inet_ecn.h @@ -30,6 +30,14 @@ static inline int INET_ECN_is_capable(__u8 dsfield) return dsfield & INET_ECN_ECT_0; } +/* + * RFC 3168 9.1.1 + * The full-functionality option for ECN encapsulation is to copy the + * ECN codepoint of the inside header to the outside header on + * encapsulation if the inside header is not-ECT or ECT, and to set the + * ECN codepoint of the outside header to ECT(0) if the ECN codepoint of + * the inside header is CE. + */ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) { outer &= ~INET_ECN_MASK;