summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-01-11 17:32:56 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-11 17:32:56 -0500
commit23c09c2640c1cb9cba919cf4f181ae99a46d53bc (patch)
tree65fd4eeb16e674c7b7257601116a82a3ce204e61 /include
parentc8086f6d88f02aa8c87a71dca75fe5392d7679f7 (diff)
parentc6c33454072fc9fe961e2b25f22a619e4fa98838 (diff)
Merge branch 'bpf-next'
Daniel Borkmann says: ==================== BPF update This set adds IPv6 support for bpf_skb_{set,get}_tunnel_key() helper. It also exports flags to user space that are being used in helpers and weren't exported thus far. For more details, please see the individual patches. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/bpf.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 8bed7f1176b8..aa6f8571de13 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -273,6 +273,25 @@ enum bpf_func_id {
__BPF_FUNC_MAX_ID,
};
+/* All flags used by eBPF helper functions, placed here. */
+
+/* BPF_FUNC_skb_store_bytes flags. */
+#define BPF_F_RECOMPUTE_CSUM (1ULL << 0)
+
+/* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.
+ * First 4 bits are for passing the header field size.
+ */
+#define BPF_F_HDR_FIELD_MASK 0xfULL
+
+/* BPF_FUNC_l4_csum_replace flags. */
+#define BPF_F_PSEUDO_HDR (1ULL << 4)
+
+/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
+#define BPF_F_INGRESS (1ULL << 0)
+
+/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
+#define BPF_F_TUNINFO_IPV6 (1ULL << 0)
+
/* user accessible mirror of in-kernel sk_buff.
* new fields can only be added to the end of this structure
*/
@@ -296,7 +315,12 @@ struct __sk_buff {
struct bpf_tunnel_key {
__u32 tunnel_id;
- __u32 remote_ipv4;
+ union {
+ __u32 remote_ipv4;
+ __u32 remote_ipv6[4];
+ };
+ __u8 tunnel_tos;
+ __u8 tunnel_ttl;
};
#endif /* _UAPI__LINUX_BPF_H__ */