/linux/tools/lib/bpf/ |
H A D | libbpf.h | 439 struct bpf_link; 441 LIBBPF_API struct bpf_link *bpf_link__open(const char *path); 442 LIBBPF_API int bpf_link__fd(const struct bpf_link *link); 443 LIBBPF_API const char *bpf_link__pin_path(const struct bpf_link *link); 455 LIBBPF_API int bpf_link__pin(struct bpf_link *link, const char *path); 469 LIBBPF_API int bpf_link__unpin(struct bpf_link *link); 470 LIBBPF_API int bpf_link__update_program(struct bpf_link *link, 472 LIBBPF_API void bpf_link__disconnect(struct bpf_link *link); 473 LIBBPF_API int bpf_link__detach(struct bpf_link *link); 474 LIBBPF_API int bpf_link__destroy(struct bpf_link *link); [all …]
|
/linux/kernel/bpf/ |
H A D | link_iter.c | 16 struct bpf_link *link; in bpf_link_seq_start() 33 bpf_link_put((struct bpf_link *)v); in bpf_link_seq_next() 39 __bpf_md_ptr(struct bpf_link *, link); 42 DEFINE_BPF_ITER_FUNC(bpf_link, struct bpf_iter_meta *meta, struct bpf_link *link) in DEFINE_BPF_ITER_FUNC() argument 71 bpf_link_put((struct bpf_link *)v); in bpf_link_seq_stop() 81 BTF_ID_LIST_SINGLE(btf_bpf_link_id, struct, bpf_link)
|
H A D | tcx.c | 141 static int tcx_link_prog_attach(struct bpf_link *link, u32 flags, u32 id_or_fd, in tcx_link_prog_attach() 169 static void tcx_link_release(struct bpf_link *link) in tcx_link_release() 203 static int tcx_link_update(struct bpf_link *link, struct bpf_prog *nprog, in tcx_link_update() 246 static void tcx_link_dealloc(struct bpf_link *link) in tcx_link_dealloc() 251 static void tcx_link_fdinfo(const struct bpf_link *link, struct seq_file *seq) in tcx_link_fdinfo() 267 static int tcx_link_fill_info(const struct bpf_link *link, in tcx_link_fill_info() 283 static int tcx_link_detach(struct bpf_link *link) in tcx_link_detach()
|
H A D | net_namespace.c | 13 struct bpf_link link; 101 static void bpf_netns_link_release(struct bpf_link *link) in bpf_netns_link_release() 149 static int bpf_netns_link_detach(struct bpf_link *link) in bpf_netns_link_detach() 155 static void bpf_netns_link_dealloc(struct bpf_link *link) in bpf_netns_link_dealloc() 163 static int bpf_netns_link_update_prog(struct bpf_link *link, in bpf_netns_link_update_prog() 203 static int bpf_netns_link_fill_info(const struct bpf_link *link, in bpf_netns_link_fill_info() 222 static void bpf_netns_link_show_fdinfo(const struct bpf_link *link, in bpf_netns_link_show_fdinfo() 420 static int netns_bpf_link_attach(struct net *net, struct bpf_link *link, in netns_bpf_link_attach()
|
H A D | bpf_struct_ops.c | 33 struct bpf_link **links; 59 struct bpf_link link; 571 static void bpf_struct_ops_link_release(struct bpf_link *link) in bpf_struct_ops_link_release() 575 static void bpf_struct_ops_link_dealloc(struct bpf_link *link) in bpf_struct_ops_link_dealloc() 691 struct bpf_link **plink; in bpf_struct_ops_map_update_elem() 1095 bpf_map_area_alloc(st_map->funcs_cnt * sizeof(struct bpf_link *), in bpf_struct_ops_map_alloc() 1130 usage += st_map->funcs_cnt * sizeof(struct bpf_link *); in bpf_struct_ops_map_mem_usage() 1187 static void bpf_struct_ops_map_link_dealloc(struct bpf_link *link) in bpf_struct_ops_map_link_dealloc() 1202 static void bpf_struct_ops_map_link_show_fdinfo(const struct bpf_link *link, in bpf_struct_ops_map_link_show_fdinfo() 1216 static int bpf_struct_ops_map_link_fill_link_info(const struct bpf_link *link, in bpf_struct_ops_map_link_fill_link_info() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | bpf_loop.c | 10 struct bpf_link *link; in check_nr_loops() 45 struct bpf_link *link; in check_callback_fn_stop() 67 struct bpf_link *link; in check_null_callback_ctx() 86 struct bpf_link *link; in check_invalid_flags() 103 struct bpf_link *link; in check_nested_calls() 125 struct bpf_link *link = in check_non_constant_callback() 144 struct bpf_link *link = bpf_program__attach(skel->progs.stack_check); in check_stack()
|
H A D | cgroup_getset_retval.c | 22 struct bpf_link *link_set_eunatch = NULL; in test_setsockopt_set() 58 struct bpf_link *link_set_eunatch = NULL, *link_get_retval = NULL; in test_setsockopt_set_and_get() 101 struct bpf_link *link_get_retval = NULL; in test_setsockopt_default_zero() 137 struct bpf_link *link_get_retval = NULL, *link_set_eunatch = NULL; in test_setsockopt_default_zero_and_set() 181 struct bpf_link *link_set_eunatch = NULL, *link_set_eisconn = NULL; in test_setsockopt_override() 182 struct bpf_link *link_get_retval = NULL; in test_setsockopt_override() 231 struct bpf_link *link_legacy_eperm = NULL, *link_get_retval = NULL; in test_setsockopt_legacy_eperm() 276 struct bpf_link *link_set_eunatch = NULL, *link_legacy_eperm = NULL; in test_setsockopt_legacy_no_override() 277 struct bpf_link *link_get_retval = NULL; in test_setsockopt_legacy_no_override() 328 struct bpf_link *link_get_retval = NULL; in test_getsockopt_get() [all …]
|
H A D | bpf_tcp_ca.c | 99 struct bpf_link *link; in test_cubic() 151 struct bpf_link *link; in test_dctcp() 194 struct bpf_link *link; in test_dctcp_autoattach_map() 263 struct bpf_link *link = NULL; in test_dctcp_fallback() 342 struct bpf_link *link; in test_write_sk_pacing() 358 struct bpf_link *link; in test_incompl_cong_ops() 401 struct bpf_link *link; in test_update_ca() 439 struct bpf_link *link; in test_update_wrong() 476 struct bpf_link *link, *link_nl; in test_mixed_links() 505 struct bpf_link *link; in test_multi_links() [all …]
|
H A D | sock_iter_batch.c | 99 static int get_nth_socket(int *fds, int fds_len, struct bpf_link *link, int n) in get_nth_socket() 127 struct bpf_link *link = NULL; in destroy() 261 int counts_len, struct bpf_link *link, int iter_fd) in remove_seen() 294 struct bpf_link *link, int iter_fd) in remove_seen_established() 330 struct bpf_link *link, int iter_fd) in remove_unseen() 365 struct bpf_link *link, int iter_fd) in remove_unseen_established() 408 struct bpf_link *link, int iter_fd) in remove_all() 438 struct bpf_link *link, int iter_fd) in remove_all_established() 484 int counts_len, struct bpf_link *link, int iter_fd) in add_some() 516 int counts_len, struct bpf_link *link, in add_some_established() [all …]
|
H A D | cgroup_tcp_skb.c | 17 struct bpf_link **egress_link, in install_filters() 18 struct bpf_link **ingress_link, in install_filters() 40 static void uninstall_filters(struct bpf_link **egress_link, in uninstall_filters() 41 struct bpf_link **ingress_link) in uninstall_filters() 237 struct bpf_link *ingress_link = NULL; in test_cgroup_tcp_skb() 238 struct bpf_link *egress_link = NULL; in test_cgroup_tcp_skb()
|
H A D | cg_storage_multi.c | 93 struct bpf_link *parent_link = NULL, *child_link = NULL; in test_egress_only() 163 struct bpf_link *parent_egress1_link = NULL, *parent_egress2_link = NULL; in test_isolated() 164 struct bpf_link *child_egress1_link = NULL, *child_egress2_link = NULL; in test_isolated() 165 struct bpf_link *parent_ingress_link = NULL, *child_ingress_link = NULL; in test_isolated() 276 struct bpf_link *parent_egress1_link = NULL, *parent_egress2_link = NULL; in test_shared() 277 struct bpf_link *child_egress1_link = NULL, *child_egress2_link = NULL; in test_shared() 278 struct bpf_link *parent_ingress_link = NULL, *child_ingress_link = NULL; in test_shared()
|
H A D | bpf_cookie.c | 25 struct bpf_link *link1 = NULL, *link2 = NULL; in kprobe_subtest() 26 struct bpf_link *retlink1 = NULL, *retlink2 = NULL; in kprobe_subtest() 179 struct bpf_link *link1 = NULL, *link2 = NULL; in kprobe_multi_attach_api_subtest() 273 struct bpf_link *link1 = NULL, *link2 = NULL; in uprobe_multi_attach_api_subtest() 321 struct bpf_link *link1 = NULL, *link2 = NULL; in uprobe_subtest() 322 struct bpf_link *retlink1 = NULL, *retlink2 = NULL; in uprobe_subtest() 375 struct bpf_link *link1 = NULL, *link2 = NULL, *link3 = NULL; in tp_subtest() 444 struct bpf_link *link = NULL; in pe_subtest() 602 struct bpf_link *link = NULL; in tp_btf_subtest() 683 struct bpf_link *link = NULL; in raw_tp_subtest()
|
H A D | sockopt_multi.c | 10 struct bpf_link *link_parent = NULL; in run_getsockopt_test() 11 struct bpf_link *link_child = NULL; in run_getsockopt_test() 161 struct bpf_link *link_parent = NULL; in run_setsockopt_test() 162 struct bpf_link *link_child = NULL; in run_setsockopt_test()
|
H A D | netfilter_link_attach.c | 47 static void verify_netfilter_link_info(struct bpf_link *link, const struct nf_link_test nf_expected) in verify_netfilter_link_info() 82 struct bpf_link *link; in test_netfilter_link_attach() 95 struct bpf_link *link2; in test_netfilter_link_attach()
|
H A D | cgroup1_hierarchy.c | 12 struct bpf_link *lsm_link, *fentry_link; in bpf_cgroup1() 30 struct bpf_link *lsm_link, *fentry_link; in bpf_cgroup1_sleepable() 48 struct bpf_link *lsm_link, *fentry_link; in bpf_cgroup1_invalid_id()
|
H A D | attach_probe.c | 41 struct bpf_link *kprobe_link, *kretprobe_link; in test_attach_probe_manual() 42 struct bpf_link *uprobe_link, *uretprobe_link; in test_attach_probe_manual() 129 struct bpf_link *uprobe_link, *uretprobe_link; in test_attach_probe_auto() 175 struct bpf_link *kprobe_link, *kretprobe_link; in test_uprobe_lib() 206 struct bpf_link *uprobe_err_link; in test_uprobe_ref_ctr() 277 struct bpf_link *uprobe_link, *uretprobe_link; in test_uprobe_sleepable()
|
H A D | xdp_bonding.c | 96 struct bpf_link *links[MAX_BPF_LINKS]; 101 struct bpf_link *link; in xdp_attach() 382 struct bpf_link *link = NULL; in test_xdp_bonding_attach() 383 struct bpf_link *link2 = NULL; in test_xdp_bonding_attach() 462 struct bpf_link *link = NULL; in test_xdp_bonding_nested() 500 struct bpf_link *link = NULL; in test_xdp_bonding_features()
|
H A D | cgroup_iter.c | 56 struct bpf_link *link; in read_from_cgroup_iter() 100 struct bpf_link *link; in test_invalid_cgroup() 117 struct bpf_link *link; in test_invalid_cgroup_spec() 200 struct bpf_link *link; in test_walk_dead_self_only()
|
/linux/tools/bpf/bpftool/skeleton/ |
H A D | pid_iter.bpf.c | 19 struct bpf_link link; 49 return BPF_CORE_READ((struct bpf_link *)ent, id); in get_obj_id() 56 static __u64 get_bpf_cookie(struct bpf_link *link) in get_bpf_cookie() 108 struct bpf_link *link = (struct bpf_link *) file->private_data; in iter()
|
/linux/net/netfilter/ |
H A D | nf_bpf_link.c | 24 struct bpf_link link; 113 static void bpf_nf_link_release(struct bpf_link *link) in bpf_nf_link_release() 128 static void bpf_nf_link_dealloc(struct bpf_link *link) in bpf_nf_link_dealloc() 135 static int bpf_nf_link_detach(struct bpf_link *link) in bpf_nf_link_detach() 141 static void bpf_nf_link_show_info(const struct bpf_link *link, in bpf_nf_link_show_info() 151 static int bpf_nf_link_fill_link_info(const struct bpf_link *link, in bpf_nf_link_fill_link_info() 165 static int bpf_nf_link_update(struct bpf_link *link, struct bpf_prog *new_prog, in bpf_nf_link_update()
|
/linux/samples/bpf/ |
H A D | sampleip_user.c | 37 struct bpf_link *links[]) in sampling_start() 68 static void sampling_end(struct bpf_link *links[]) in sampling_end() 144 struct bpf_link **links; in main() 181 links = calloc(nr_cpus, sizeof(struct bpf_link *)); in main()
|
/linux/include/linux/ |
H A D | bpf.h | 1736 struct bpf_link { struct 1761 void (*release)(struct bpf_link *link); argument 1765 void (*dealloc)(struct bpf_link *link); 1772 void (*dealloc_deferred)(struct bpf_link *link); 1773 int (*detach)(struct bpf_link *link); 1774 int (*update_prog)(struct bpf_link *link, struct bpf_prog *new_prog, 1776 void (*show_fdinfo)(const struct bpf_link *link, struct seq_file *seq); 1777 int (*fill_link_info)(const struct bpf_link *link, 1779 int (*update_map)(struct bpf_link *link, struct bpf_map *new_map, 1785 struct bpf_link link; [all …]
|
H A D | bpf_mprog.h | 136 struct bpf_link *link; 155 struct bpf_link *link; 322 struct bpf_prog *prog_new, struct bpf_link *link, 328 struct bpf_prog *prog, struct bpf_link *link,
|
/linux/tools/testing/selftests/bpf/test_kmods/ |
H A D | bpf_test_no_cfi.c | 25 static int dummy_reg(void *kdata, struct bpf_link *link) in dummy_reg() 30 static void dummy_unreg(void *kdata, struct bpf_link *link) in dummy_unreg()
|
/linux/tools/testing/selftests/bpf/benchs/ |
H A D | bench_bloom_filter_map.c | 303 struct bpf_link *link; in bloom_lookup_setup() 320 struct bpf_link *link; in bloom_update_setup() 337 struct bpf_link *link; in false_positive_setup() 356 struct bpf_link *link; in hashmap_with_bloom_setup() 374 struct bpf_link *link; in hashmap_no_bloom_setup()
|