/linux-6.1.9/tools/testing/selftests/bpf/progs/ |
D | test_sock_fields.c | 49 struct bpf_sock listen_sk = {}; 50 struct bpf_sock srv_sk = {}; 51 struct bpf_sock cli_sk = {}; 61 static void skcpy(struct bpf_sock *dst, in skcpy() 62 const struct bpf_sock *src) in skcpy() 127 struct bpf_sock *sk, *sk_ret; in egress_read_sock_fields() 222 struct bpf_sock *sk; in ingress_read_sock_fields() 260 static __noinline bool sk_dst_port__load_word(struct bpf_sock *sk) in sk_dst_port__load_word() 266 static __noinline bool sk_dst_port__load_half(struct bpf_sock *sk) in sk_dst_port__load_half() 272 static __noinline bool sk_dst_port__load_byte(struct bpf_sock *sk) in sk_dst_port__load_byte() [all …]
|
D | test_sk_lookup_kern.c | 62 struct bpf_sock *sk; in sk_lookup_success() 85 struct bpf_sock *sk; in sk_lookup_success_simple() 97 struct bpf_sock *sk; in err_use_after_free() 112 struct bpf_sock *sk; in err_modify_sk_pointer() 127 struct bpf_sock *sk; in err_modify_sk_or_null_pointer() 150 struct bpf_sock *sk; in err_release_twice() 162 struct bpf_sock *sk; in err_release_unchecked()
|
D | test_sk_lookup.c | 111 struct bpf_sock *sk; in redir_port() 130 struct bpf_sock *sk; in redir_ip4() 153 struct bpf_sock *sk; in redir_ip6() 178 struct bpf_sock *sk; in select_sock_a() 193 struct bpf_sock *sk; in select_sock_a_no_reuseport() 219 struct bpf_sock *sk; in sk_assign_eexist() 252 struct bpf_sock *sk; in sk_assign_replace_flag() 284 struct bpf_sock *sk = NULL; in sk_assign_null() 327 struct bpf_sock *sk1 = NULL, *sk2 = NULL; in access_ctx_sk() 393 struct bpf_sock *sk; in ctx_narrow_access() [all …]
|
D | udp_limit.c | 17 int sock(struct bpf_sock *ctx) in sock() 46 int sock_release(struct bpf_sock *ctx) in sock_release()
|
D | netns_cookie_prog.c | 33 struct bpf_sock *sk = ctx->sk; in get_netns_cookie_sockops() 65 struct bpf_sock *sk = msg->sk; in get_netns_cookie_sk_msg()
|
D | kfunc_call_test.c | 23 struct bpf_sock *sk = skb->sk; in kfunc_call_test2() 38 struct bpf_sock *sk = skb->sk; in kfunc_call_test1()
|
D | test_tcp_check_syncookie_kern.c | 26 static __always_inline __s64 gen_syncookie(void *data_end, struct bpf_sock *sk, in gen_syncookie() 49 struct bpf_sock *sk; in check_syncookie()
|
D | test_sk_assign.c | 92 struct bpf_sock *sk; in handle_udp() 123 struct bpf_sock *sk; in handle_tcp()
|
D | bind_perm.c | 12 struct bpf_sock *sk; in bind_prog()
|
D | freplace_cls_redirect.c | 22 struct bpf_sock *sk; in freplace_cls_redirect_test()
|
D | recvmsg4_prog.c | 19 struct bpf_sock *sk; in recvmsg4_prog()
|
D | recvmsg6_prog.c | 22 struct bpf_sock *sk; in recvmsg6_prog()
|
D | kfunc_call_test_subprog.c | 16 struct bpf_sock *sk = skb->sk; in f1()
|
D | test_sockmap_update.c | 30 struct bpf_sock *sk; in copy_sock_map()
|
D | tcp_rtt.c | 28 struct bpf_sock *sk; in _sockops()
|
/linux-6.1.9/tools/testing/selftests/bpf/ |
D | test_sock.c | 55 offsetof(struct bpf_sock, src_ip6[0])), 68 offsetof(struct bpf_sock, mark)), 81 offsetof(struct bpf_sock, src_ip4)), 94 offsetof(struct bpf_sock, src_port)), 203 offsetof(struct bpf_sock, src_ip6[3])), 207 offsetof(struct bpf_sock, src_port)), 233 offsetof(struct bpf_sock, src_ip4)), 237 offsetof(struct bpf_sock, src_port)), 263 offsetof(struct bpf_sock, src_ip4)), 267 offsetof(struct bpf_sock, src_port)), [all …]
|
D | cgroup_getset_retval_hooks.h | 5 BPF_RETVAL_HOOK(sock_create, "cgroup/sock_create", bpf_sock, 0) 25 BPF_RETVAL_HOOK(sock_release, "cgroup/sock_release", bpf_sock, 0)
|
/linux-6.1.9/tools/testing/selftests/bpf/verifier/ |
D | sock.c | 20 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, offsetof(struct bpf_sock, family)), 34 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, offsetof(struct bpf_sock, type)), 62 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, type)), 81 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, type)), 98 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, family)), 116 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, state)), 134 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, dst_port)), 152 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, dst_port)), 170 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_0, offsetof(struct bpf_sock, dst_port) + 2), 189 BPF_LDX_MEM(BPF_B, BPF_REG_2, BPF_REG_0, offsetof(struct bpf_sock, dst_port)), [all …]
|
D | ref_tracking.c | 730 offsetof(struct bpf_sock, mark)), 835 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_7, offsetof(struct bpf_sock, type)), 863 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_6, offsetof(struct bpf_sock, type)), 886 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_6, offsetof(struct bpf_sock, type)), 910 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_6, offsetof(struct bpf_sock, src_port)), 931 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_6, offsetof(struct bpf_sock, type)),
|
/linux-6.1.9/samples/bpf/ |
D | test_cgrp2_sock.c | 44 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, bound_dev_if)), in prog_load() 45 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, bound_dev_if)), in prog_load() 62 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, mark)), in prog_load() 63 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, mark)), in prog_load() 70 BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, priority)), in prog_load() 71 BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, priority)), in prog_load()
|
D | sock_flags_kern.c | 9 int bpf_prog1(struct bpf_sock *sk) in bpf_prog1() 32 int bpf_prog2(struct bpf_sock *sk) in bpf_prog2()
|
D | tcp_dumpstats_kern.c | 29 struct bpf_sock *sk; in _sockops()
|
/linux-6.1.9/tools/include/uapi/linux/ |
D | bpf.h | 5891 __bpf_md_ptr(struct bpf_sock *, sk); 5960 struct bpf_sock { struct 6121 __bpf_md_ptr(struct bpf_sock *, sk); /* current socket */ 6159 __bpf_md_ptr(struct bpf_sock *, sk); 6160 __bpf_md_ptr(struct bpf_sock *, migrating_sk); 6311 __bpf_md_ptr(struct bpf_sock *, sk); 6363 __bpf_md_ptr(struct bpf_sock *, sk); 6846 __bpf_md_ptr(struct bpf_sock *, sk); 6864 __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
|
/linux-6.1.9/include/uapi/linux/ |
D | bpf.h | 5891 __bpf_md_ptr(struct bpf_sock *, sk); 5960 struct bpf_sock { struct 6121 __bpf_md_ptr(struct bpf_sock *, sk); /* current socket */ 6159 __bpf_md_ptr(struct bpf_sock *, sk); 6160 __bpf_md_ptr(struct bpf_sock *, migrating_sk); 6311 __bpf_md_ptr(struct bpf_sock *, sk); 6363 __bpf_md_ptr(struct bpf_sock *, sk); 6846 __bpf_md_ptr(struct bpf_sock *, sk); 6864 __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
|
/linux-6.1.9/net/core/ |
D | filter.c | 5444 BPF_CALL_5(bpf_sock_ops_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, in BPF_CALL_5() argument 5447 return _bpf_setsockopt(bpf_sock->sk, level, optname, optval, optlen); in BPF_CALL_5() 5461 static int bpf_sock_ops_get_syn(struct bpf_sock_ops_kern *bpf_sock, in bpf_sock_ops_get_syn() argument 5464 struct sk_buff *syn_skb = bpf_sock->syn_skb; in bpf_sock_ops_get_syn() 5486 struct sock *sk = bpf_sock->sk; in bpf_sock_ops_get_syn() 5529 BPF_CALL_5(bpf_sock_ops_getsockopt, struct bpf_sock_ops_kern *, bpf_sock, in BPF_CALL_5() argument 5537 ret = bpf_sock_ops_get_syn(bpf_sock, optname, &start); in BPF_CALL_5() 5554 return _bpf_getsockopt(bpf_sock->sk, level, optname, optval, optlen); in BPF_CALL_5() 5568 BPF_CALL_2(bpf_sock_ops_cb_flags_set, struct bpf_sock_ops_kern *, bpf_sock, in BPF_CALL_2() argument 5571 struct sock *sk = bpf_sock->sk; in BPF_CALL_2() [all …]
|