diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2016-03-08 21:00:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-11 15:14:26 -0500 |
commit | 134611446dc657e1bbc73ca0e4e6b599df687db0 (patch) | |
tree | 4a737866a24d8f515b09acda069ab422fe28344b /include/net/ip_tunnels.h | |
parent | e327f4e193b6a176f4dc3b19faf6371a8917588d (diff) |
ip_tunnel: add support for setting flow label via collect metadata
This patch extends udp_tunnel6_xmit_skb() to pass in the IPv6 flow label
from call sites. Currently, there's no such option and it's always set to
zero when writing ip6_flow_hdr(). Add a label member to ip_tunnel_key, so
that flow-based tunnels via collect metadata frontends can make use of it.
vxlan and geneve will be converted to add flow label support separately.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip_tunnels.h')
-rw-r--r-- | include/net/ip_tunnels.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 0acd80fadb32..5dc2e454f866 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h | |||
@@ -48,6 +48,7 @@ struct ip_tunnel_key { | |||
48 | __be16 tun_flags; | 48 | __be16 tun_flags; |
49 | u8 tos; /* TOS for IPv4, TC for IPv6 */ | 49 | u8 tos; /* TOS for IPv4, TC for IPv6 */ |
50 | u8 ttl; /* TTL for IPv4, HL for IPv6 */ | 50 | u8 ttl; /* TTL for IPv4, HL for IPv6 */ |
51 | __be32 label; /* Flow Label for IPv6 */ | ||
51 | __be16 tp_src; | 52 | __be16 tp_src; |
52 | __be16 tp_dst; | 53 | __be16 tp_dst; |
53 | }; | 54 | }; |
@@ -181,7 +182,7 @@ int ip_tunnel_encap_del_ops(const struct ip_tunnel_encap_ops *op, | |||
181 | 182 | ||
182 | static inline void ip_tunnel_key_init(struct ip_tunnel_key *key, | 183 | static inline void ip_tunnel_key_init(struct ip_tunnel_key *key, |
183 | __be32 saddr, __be32 daddr, | 184 | __be32 saddr, __be32 daddr, |
184 | u8 tos, u8 ttl, | 185 | u8 tos, u8 ttl, __be32 label, |
185 | __be16 tp_src, __be16 tp_dst, | 186 | __be16 tp_src, __be16 tp_dst, |
186 | __be64 tun_id, __be16 tun_flags) | 187 | __be64 tun_id, __be16 tun_flags) |
187 | { | 188 | { |
@@ -192,6 +193,7 @@ static inline void ip_tunnel_key_init(struct ip_tunnel_key *key, | |||
192 | 0, IP_TUNNEL_KEY_IPV4_PAD_LEN); | 193 | 0, IP_TUNNEL_KEY_IPV4_PAD_LEN); |
193 | key->tos = tos; | 194 | key->tos = tos; |
194 | key->ttl = ttl; | 195 | key->ttl = ttl; |
196 | key->label = label; | ||
195 | key->tun_flags = tun_flags; | 197 | key->tun_flags = tun_flags; |
196 | 198 | ||
197 | /* For the tunnel types on the top of IPsec, the tp_src and tp_dst of | 199 | /* For the tunnel types on the top of IPsec, the tp_src and tp_dst of |