aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_ecn.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_ecn.h')
-rw-r--r--include/net/inet_ecn.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h
index 88bdd010d65d..2fa8d1341a0a 100644
--- a/include/net/inet_ecn.h
+++ b/include/net/inet_ecn.h
@@ -38,9 +38,19 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner)
38 return outer; 38 return outer;
39} 39}
40 40
41#define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0) 41static inline void INET_ECN_xmit(struct sock *sk)
42#define INET_ECN_dontxmit(sk) \ 42{
43 do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0) 43 inet_sk(sk)->tos |= INET_ECN_ECT_0;
44 if (inet6_sk(sk) != NULL)
45 inet6_sk(sk)->tclass |= INET_ECN_ECT_0;
46}
47
48static inline void INET_ECN_dontxmit(struct sock *sk)
49{
50 inet_sk(sk)->tos &= ~INET_ECN_MASK;
51 if (inet6_sk(sk) != NULL)
52 inet6_sk(sk)->tclass &= ~INET_ECN_MASK;
53}
44 54
45#define IP6_ECN_flow_init(label) do { \ 55#define IP6_ECN_flow_init(label) do { \
46 (label) &= ~htonl(INET_ECN_MASK << 20); \ 56 (label) &= ~htonl(INET_ECN_MASK << 20); \