* [PATCH net-next] inet: add rfc 3168 extract in front of INET_ECN_encapsulate()
@ 2011-10-22 5:11 Eric Dumazet
2011-10-22 5:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2011-10-22 5:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev
INET_ECN_encapsulate() is better understood if we can read the official
statement.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
include/net/inet_ecn.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h
index 2fa8d13..2fa1469 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] inet: add rfc 3168 extract in front of INET_ECN_encapsulate()
2011-10-22 5:11 [PATCH net-next] inet: add rfc 3168 extract in front of INET_ECN_encapsulate() Eric Dumazet
@ 2011-10-22 5:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-10-22 5:26 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 22 Oct 2011 07:11:08 +0200
> INET_ECN_encapsulate() is better understood if we can read the official
> statement.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-22 5:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-22 5:11 [PATCH net-next] inet: add rfc 3168 extract in front of INET_ECN_encapsulate() Eric Dumazet
2011-10-22 5:26 ` David Miller
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).