diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-05-13 10:28:47 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-05-13 10:28:47 +1000 |
commit | 6ce6cf287abf48f53dab37db21680cc37abd1954 (patch) | |
tree | fe75121397f3e5c4a5037c37d5e6feb610ecebf4 /include | |
parent | 411f05f123cbd7f8aa1edcae86970755a6e2a9d9 (diff) | |
parent | ca06707022d6ba4744198a8ebbe4994786b0c613 (diff) |
Merge remote-tracking branch 'net-current/master'
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_ecn.h | 16 |
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) return outer; } -#define INET_ECN_xmit(sk) do { inet_sk(sk)->tos |= INET_ECN_ECT_0; } while (0) -#define INET_ECN_dontxmit(sk) \ - do { inet_sk(sk)->tos &= ~INET_ECN_MASK; } while (0) +static inline void INET_ECN_xmit(struct sock *sk) +{ + inet_sk(sk)->tos |= INET_ECN_ECT_0; + if (inet6_sk(sk) != NULL) + inet6_sk(sk)->tclass |= INET_ECN_ECT_0; +} + +static inline void INET_ECN_dontxmit(struct sock *sk) +{ + inet_sk(sk)->tos &= ~INET_ECN_MASK; + if (inet6_sk(sk) != NULL) + inet6_sk(sk)->tclass &= ~INET_ECN_MASK; +} #define IP6_ECN_flow_init(label) do { \ (label) &= ~htonl(INET_ECN_MASK << 20); \ |