Commit 755db477 authored by Peter Oskolkov's avatar Peter Oskolkov Committed by Alexei Starovoitov

bpf: sync <kdir>/include/.../bpf.h with tools/include/.../bpf.h

This patch copies changes in bpf.h done by a previous patch
in this patchset from the kernel uapi include dir into tools
uapi include dir.
Signed-off-by: default avatarPeter Oskolkov <posk@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 3bd0b152
...@@ -2016,6 +2016,19 @@ union bpf_attr { ...@@ -2016,6 +2016,19 @@ union bpf_attr {
* Only works if *skb* contains an IPv6 packet. Insert a * Only works if *skb* contains an IPv6 packet. Insert a
* Segment Routing Header (**struct ipv6_sr_hdr**) inside * Segment Routing Header (**struct ipv6_sr_hdr**) inside
* the IPv6 header. * the IPv6 header.
* **BPF_LWT_ENCAP_IP**
* IP encapsulation (GRE/GUE/IPIP/etc). The outer header
* must be IPv4 or IPv6, followed by zero or more
* additional headers, up to LWT_BPF_MAX_HEADROOM total
* bytes in all prepended headers. Please note that
* if skb_is_gso(skb) is true, no more than two headers
* can be prepended, and the inner header, if present,
* should be either GRE or UDP/GUE.
*
* BPF_LWT_ENCAP_SEG6*** types can be called by bpf programs of
* type BPF_PROG_TYPE_LWT_IN; BPF_LWT_ENCAP_IP type can be called
* by bpf programs of types BPF_PROG_TYPE_LWT_IN and
* BPF_PROG_TYPE_LWT_XMIT.
* *
* A call to this helper is susceptible to change the underlaying * A call to this helper is susceptible to change the underlaying
* packet buffer. Therefore, at load time, all checks on pointers * packet buffer. Therefore, at load time, all checks on pointers
...@@ -2517,7 +2530,8 @@ enum bpf_hdr_start_off { ...@@ -2517,7 +2530,8 @@ enum bpf_hdr_start_off {
/* Encapsulation type for BPF_FUNC_lwt_push_encap helper. */ /* Encapsulation type for BPF_FUNC_lwt_push_encap helper. */
enum bpf_lwt_encap_mode { enum bpf_lwt_encap_mode {
BPF_LWT_ENCAP_SEG6, BPF_LWT_ENCAP_SEG6,
BPF_LWT_ENCAP_SEG6_INLINE BPF_LWT_ENCAP_SEG6_INLINE,
BPF_LWT_ENCAP_IP,
}; };
#define __bpf_md_ptr(type, name) \ #define __bpf_md_ptr(type, name) \
...@@ -2606,7 +2620,15 @@ enum bpf_ret_code { ...@@ -2606,7 +2620,15 @@ enum bpf_ret_code {
BPF_DROP = 2, BPF_DROP = 2,
/* 3-6 reserved */ /* 3-6 reserved */
BPF_REDIRECT = 7, BPF_REDIRECT = 7,
/* >127 are reserved for prog type specific return codes */ /* >127 are reserved for prog type specific return codes.
*
* BPF_LWT_REROUTE: used by BPF_PROG_TYPE_LWT_IN and
* BPF_PROG_TYPE_LWT_XMIT to indicate that skb had been
* changed and should be routed based on its new L3 header.
* (This is an L3 redirect, as opposed to L2 redirect
* represented by BPF_REDIRECT above).
*/
BPF_LWT_REROUTE = 128,
}; };
struct bpf_sock { struct bpf_sock {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment