Commit 5cce85c6 authored by brakmo's avatar brakmo Committed by Alexei Starovoitov
Browse files

bpf: sync bpf.h to tools and update bpf_helpers.h



This patch syncs the uapi bpf.h to tools/ and also updates
bpf_herlpers.h in tools/

Signed-off-by: default avatarLawrence Brakmo <brakmo@fb.com>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent f7c917ba
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -2359,6 +2359,13 @@ union bpf_attr {
 *	Return
 *		A **struct bpf_tcp_sock** pointer on success, or NULL in
 *		case of failure.
 *
 * int bpf_skb_ecn_set_ce(struct sk_buf *skb)
 *     Description
 *             Sets ECN of IP header to ce (congestion encountered) if
 *             current value is ect (ECN capable). Works with IPv6 and IPv4.
 *     Return
 *             1 if set, 0 if not set.
 */
#define __BPF_FUNC_MAPPER(FN)		\
	FN(unspec),			\
@@ -2457,7 +2464,8 @@ union bpf_attr {
	FN(spin_lock),			\
	FN(spin_unlock),		\
	FN(sk_fullsock),		\
	FN(tcp_sock),
	FN(tcp_sock),			\
	FN(skb_ecn_set_ce),

/* integer value in 'imm' field of BPF_CALL instruction selects which helper
 * function eBPF program intends to call
+2 −0
Original line number Diff line number Diff line
@@ -180,6 +180,8 @@ static struct bpf_sock *(*bpf_sk_fullsock)(struct bpf_sock *sk) =
	(void *) BPF_FUNC_sk_fullsock;
static struct bpf_tcp_sock *(*bpf_tcp_sock)(struct bpf_sock *sk) =
	(void *) BPF_FUNC_tcp_sock;
static int (*bpf_skb_ecn_set_ce)(void *ctx) =
	(void *) BPF_FUNC_skb_ecn_set_ce;

/* llvm builtin functions that eBPF C program may use to
 * emit BPF_LD_ABS and BPF_LD_IND instructions