diff options
author | Kaixi Fan | 2022-04-30 15:48:42 +0800 |
---|---|---|
committer | Alexei Starovoitov | 2022-05-10 10:49:03 -0700 |
commit | 26101f5ab6bdf30ac25c8e578e0b4873e7849e0c (patch) | |
tree | 114aec250c8aeba16f76333621194030a9faadcb /tools/include/uapi | |
parent | bd2331b3757f5b2ab4aafc591b55fa2a592abf7c (diff) |
bpf: Add source ip in "struct bpf_tunnel_key"
Add tunnel source ip field in "struct bpf_tunnel_key". Add related code
to set and get tunnel source field.
Signed-off-by: Kaixi Fan <fankaixi.li@bytedance.com>
Link: https://lore.kernel.org/r/20220430074844.69214-2-fankaixi.li@bytedance.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/include/uapi')
-rw-r--r-- | tools/include/uapi/linux/bpf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 444fe6f1cf35..95a3d1ff6255 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -5604,6 +5604,10 @@ struct bpf_tunnel_key { __u8 tunnel_ttl; __u16 tunnel_ext; /* Padding, future use. */ __u32 tunnel_label; + union { + __u32 local_ipv4; + __u32 local_ipv6[4]; + }; }; /* user accessible mirror of in-kernel xfrm_state. |