Skip to content

Commit ef776a2

Browse files
iamkafaiAlexei Starovoitov
authored andcommitted
bpf: Sync bpf.h to tools/
This patch sync the uapi bpf.h to tools/. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent dbafd7d commit ef776a2

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

  • tools/include/uapi/linux

‎tools/include/uapi/linux/bpf.h‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2366,6 +2366,14 @@ union bpf_attr {
23662366
* current value is ect (ECN capable). Works with IPv6 and IPv4.
23672367
* Return
23682368
* 1 if set, 0 if not set.
2369+
*
2370+
* struct bpf_sock *bpf_get_listener_sock(struct bpf_sock *sk)
2371+
* Description
2372+
* Return a **struct bpf_sock** pointer in TCP_LISTEN state.
2373+
* bpf_sk_release() is unnecessary and not allowed.
2374+
* Return
2375+
* A **struct bpf_sock** pointer on success, or NULL in
2376+
* case of failure.
23692377
*/
23702378
#define __BPF_FUNC_MAPPER(FN) \
23712379
FN(unspec), \
@@ -2465,7 +2473,8 @@ union bpf_attr {
24652473
FN(spin_unlock), \
24662474
FN(sk_fullsock), \
24672475
FN(tcp_sock), \
2468-
FN(skb_ecn_set_ce),
2476+
FN(skb_ecn_set_ce), \
2477+
FN(get_listener_sock),
24692478

24702479
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
24712480
* function eBPF program intends to call

0 commit comments

Comments
 (0)