Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c408dec authored by Willem de Bruijn's avatar Willem de Bruijn Committed by Alexei Starovoitov
Browse files

bpf: Sync bpf.h to tools



Sync include/uapi/linux/bpf.h with tools/

Changes
  v1->v2:
  - BPF_F_ADJ_ROOM_MASK moved, no longer in this commit
  v2->v3:
  - BPF_F_ADJ_ROOM_ENCAP_L3_MASK moved, no longer in this commit

Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 868d5235
Loading
Loading
Loading
Loading
+26 −3
Original line number Diff line number Diff line
@@ -1478,13 +1478,27 @@ union bpf_attr {
 * 		Grow or shrink the room for data in the packet associated to
 * 		*skb* by *len_diff*, and according to the selected *mode*.
 *
 * 		There is a single supported mode at this time:
 *		There are two supported modes at this time:
 *
 *		* **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
 *		  (room space is added or removed below the layer 2 header).
 *
 * 		* **BPF_ADJ_ROOM_NET**: Adjust room at the network layer
 * 		  (room space is added or removed below the layer 3 header).
 *
 * 		All values for *flags* are reserved for future usage, and must
 * 		be left at zero.
 *		The following flags are supported at this time:
 *
 *		* **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size.
 *		  Adjusting mss in this way is not allowed for datagrams.
 *
 *		* **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 **:
 *		* **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 **:
 *		  Any new space is reserved to hold a tunnel header.
 *		  Configure skb offsets and other fields accordingly.
 *
 *		* **BPF_F_ADJ_ROOM_ENCAP_L4_GRE **:
 *		* **BPF_F_ADJ_ROOM_ENCAP_L4_UDP **:
 *		  Use with ENCAP_L3 flags to further specify the tunnel type.
 *
 * 		A call to this helper is susceptible to change the underlaying
 * 		packet buffer. Therefore, at load time, all checks on pointers
@@ -2624,9 +2638,18 @@ enum bpf_func_id {
/* Current network namespace */
#define BPF_F_CURRENT_NETNS		(-1L)

/* BPF_FUNC_skb_adjust_room flags. */
#define BPF_F_ADJ_ROOM_FIXED_GSO	(1ULL << 0)

#define BPF_F_ADJ_ROOM_ENCAP_L3_IPV4	(1ULL << 1)
#define BPF_F_ADJ_ROOM_ENCAP_L3_IPV6	(1ULL << 2)
#define BPF_F_ADJ_ROOM_ENCAP_L4_GRE	(1ULL << 3)
#define BPF_F_ADJ_ROOM_ENCAP_L4_UDP	(1ULL << 4)

/* Mode for BPF_FUNC_skb_adjust_room helper. */
enum bpf_adj_room_mode {
	BPF_ADJ_ROOM_NET,
	BPF_ADJ_ROOM_MAC,
};

/* Mode for BPF_FUNC_skb_load_bytes_relative helper. */