Home
last modified time | relevance | path

Searched refs:link (Results 1 – 19 of 19) sorted by relevance

/samples/bpf/
Dtracex1_user.c9 struct bpf_link *link = NULL; in main() local
34 link = bpf_program__attach(prog); in main()
35 if (libbpf_get_error(link)) { in main()
37 link = NULL; in main()
47 bpf_link__destroy(link); in main()
Dtest_cgrp2_sock2.c37 struct bpf_link *link = NULL; in main() local
76 link = bpf_program__attach_cgroup(progs[filter_id], cg_fd); in main()
77 if (libbpf_get_error(link)) { in main()
79 link = NULL; in main()
83 err = bpf_link__pin(link, link_pin_path); in main()
92 bpf_link__destroy(link); in main()
Dtc_l2_redirect.sh18 $IP link add ve1 type veth peer name vens1
19 $IP link add ve2 type veth peer name vens2
20 $IP link set dev ve1 up
21 $IP link set dev ve2 up
22 $IP link set dev ve1 mtu 1500
23 $IP link set dev ve2 mtu 1500
24 $IP link set dev vens1 netns ns1
25 $IP link set dev vens2 netns ns2
27 $IP -n ns1 link set dev lo up
28 $IP -n ns1 link set dev vens1 up
[all …]
Dtracex7_user.c9 struct bpf_link *link = NULL; in main() local
41 link = bpf_program__attach(prog); in main()
42 if (libbpf_get_error(link)) { in main()
44 link = NULL; in main()
53 bpf_link__destroy(link); in main()
Dlwt_len_hist.sh14 ip link del $VETH0 2> /dev/null
15 ip link del $VETH1 2> /dev/null
23 ip link add $VETH0 type veth peer name $VETH1
24 ip link set dev $VETH0 up
26 ip link set $VETH1 netns $NS1
27 ip netns exec $NS1 ip link set dev $VETH1 up
Dtracex5_user.c37 struct bpf_link *link = NULL; in main() local
64 link = bpf_program__attach(prog); in main()
65 if (libbpf_get_error(link)) { in main()
67 link = NULL; in main()
95 bpf_link__destroy(link); in main()
Dtest_cgrp2_tc.sh74 $IP link add $HOST_IFC type veth peer name $NS_IFC || return $?
75 $IP link set dev $HOST_IFC up || return $?
79 $IP link set dev $NS_IFC netns ns || return $?
80 $IP -n $NS link set dev $NS_IFC up || return $?
87 $IP link del $HOST_IFC
126 $IP link show dev $HOST_IFC
131 $IP -n $NS link show dev $NS_IFC
132 $IP -n $NS -6 link show dev $NS_IFC
Dtest_cls_bpf.sh31 ip link add name $IFC type veth peer name pair_$IFC
32 ip link set $IFC up
33 ip link set pair_$IFC up
38 ip link del dev $IFC
Dtest_current_task_under_cgroup_user.c17 struct bpf_link *link = NULL; in main() local
50 link = bpf_program__attach(prog); in main()
51 if (libbpf_get_error(link)) { in main()
53 link = NULL; in main()
110 bpf_link__destroy(link); in main()
Dtrace_output_user.c47 struct bpf_link *link = NULL; in main() local
80 link = bpf_program__attach(prog); in main()
81 if (libbpf_get_error(link)) { in main()
83 link = NULL; in main()
104 bpf_link__destroy(link); in main()
Dtest_cgrp2_sock2.sh9 ip link add veth0 type veth peer name veth0b
10 ip link set veth0b up
11 ip link set veth0 netns at_ns0
14 ip netns exec at_ns0 ip link set dev veth0 up
43 ip link del veth0b
Dtest_lwt_bpf.sh28 MAC=$(ip netns exec $2 ip link show $1 | grep ether | awk '{print $2}')
30 MAC=$(ip link show $1 | grep ether | awk '{print $2}')
40 ip link del $VETH0 2> /dev/null
41 ip link del $VETH1 2> /dev/null
42 ip link del $VETH2 2> /dev/null
43 ip link del $VETH3 2> /dev/null
52 ip link add $2 type veth peer name $3
53 ip link set dev $2 up
55 ip link set $3 netns $1
56 ip netns exec $1 ip link set dev $3 up
Dtest_probe_write_user_user.c16 struct bpf_link *link = NULL; in main() local
52 link = bpf_program__attach(prog); in main()
53 if (libbpf_get_error(link)) { in main()
55 link = NULL; in main()
105 bpf_link__destroy(link); in main()
Dtest_map_in_map_user.c117 struct bpf_link *link = NULL; in main() local
154 link = bpf_program__attach(prog); in main()
155 if (libbpf_get_error(link)) { in main()
157 link = NULL; in main()
164 bpf_link__destroy(link); in main()
Dtask_fd_query_user.c132 struct bpf_link *link; in test_nondebug_fs_kuprobe_common() local
157 link = bpf_program__attach_perf_event(progs[0], fd); in test_nondebug_fs_kuprobe_common()
158 if (libbpf_get_error(link)) { in test_nondebug_fs_kuprobe_common()
160 link = NULL; in test_nondebug_fs_kuprobe_common()
170 bpf_link__destroy(link); in test_nondebug_fs_kuprobe_common()
236 struct bpf_link *link; in test_debug_fs_uprobe() local
272 link = bpf_program__attach_perf_event(progs[0], kfd); in test_debug_fs_uprobe()
273 if (libbpf_get_error(link)) { in test_debug_fs_uprobe()
275 link = NULL; in test_debug_fs_uprobe()
307 bpf_link__destroy(link); in test_debug_fs_uprobe()
Dcpustat_user.c192 struct bpf_link *link = NULL; in main() local
224 link = bpf_program__attach(prog); in main()
225 if (libbpf_get_error(link)) { in main()
227 link = NULL; in main()
249 bpf_link__destroy(link); in main()
Dxdp2skb_meta.sh156 call_ip link show dev $device | grep --color=auto xdp
173 call_ip link set dev $device xdp off
204 call_ip link set dev $device xdp obj $file sec $prog
Dtrace_event_user.c183 struct bpf_link *link = NULL; in test_perf_event_task() local
197 link = bpf_program__attach_perf_event(prog, pmu_fd); in test_perf_event_task()
198 if (libbpf_get_error(link)) { in test_perf_event_task()
200 link = NULL; in test_perf_event_task()
211 bpf_link__destroy(link); in test_perf_event_task()
Dhbm.c158 struct bpf_link *link = NULL; in run_bpf_prog() local
194 link = bpf_program__attach_cgroup(bpf_prog, cg1); in run_bpf_prog()
195 if (libbpf_get_error(link)) { in run_bpf_prog()
201 rc = bpf_link__pin(link, cg_pin_path); in run_bpf_prog()
405 bpf_link__destroy(link); in run_bpf_prog()