Home
last modified time | relevance | path

Searched refs:hook (Results 1 – 25 of 40) sorted by relevance

12

/tools/testing/selftests/bpf/prog_tests/
A Dtc_bpf.c37 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic()
48 ret = bpf_tc_attach(hook, &opts); in test_tc_bpf_basic()
53 ret = bpf_tc_query(hook, &opts); in test_tc_bpf_basic()
64 ret = bpf_tc_detach(hook, &opts); in test_tc_bpf_basic()
246 ret = bpf_tc_query(hook, NULL); in test_tc_bpf_api()
368 hook.parent = 0; in tc_bpf_root()
369 bpf_tc_hook_destroy(&hook); in tc_bpf_root()
375 bpf_tc_hook_destroy(&hook); in tc_bpf_root()
382 bpf_tc_hook_destroy(&hook); in tc_bpf_root()
388 bpf_tc_hook_destroy(&hook); in tc_bpf_root()
[all …]
A Dbpf_qdisc.c18 DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = LO_IFINDEX, in do_test()
26 err = bpf_tc_hook_create(&hook); in do_test()
47 bpf_tc_hook_destroy(&hook); in do_test()
84 DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, in test_qdisc_attach_to_mq()
100 hook.ifindex = if_nametoindex("veth0"); in test_qdisc_attach_to_mq()
103 err = bpf_tc_hook_create(&hook); in test_qdisc_attach_to_mq()
106 bpf_tc_hook_destroy(&hook); in test_qdisc_attach_to_mq()
115 DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = LO_IFINDEX, in test_qdisc_attach_to_non_root()
133 err = bpf_tc_hook_create(&hook); in test_qdisc_attach_to_non_root()
135 bpf_tc_hook_destroy(&hook); in test_qdisc_attach_to_non_root()
A Dxfrm_info.c72 static int attach_tc_prog(struct bpf_tc_hook *hook, int igr_fd, int egr_fd) in attach_tc_prog() argument
80 ret = bpf_tc_hook_create(hook); in attach_tc_prog()
85 hook->attach_point = BPF_TC_INGRESS; in attach_tc_prog()
86 ret = bpf_tc_attach(hook, &opts1); in attach_tc_prog()
88 bpf_tc_hook_destroy(hook); in attach_tc_prog()
94 hook->attach_point = BPF_TC_EGRESS; in attach_tc_prog()
95 ret = bpf_tc_attach(hook, &opts2); in attach_tc_prog()
97 bpf_tc_hook_destroy(hook); in attach_tc_prog()
A Dvrf_socket_lookup.c107 LIBBPF_OPTS(bpf_tc_hook, hook, .attach_point = BPF_TC_INGRESS); in attach_progs()
115 hook.ifindex = ifindex; in attach_progs()
117 ret = bpf_tc_hook_create(&hook); in attach_progs()
121 ret = bpf_tc_attach(&hook, &opts); in attach_progs()
123 bpf_tc_hook_destroy(&hook); in attach_progs()
128 bpf_tc_hook_destroy(&hook); in attach_progs()
A Dxdp_do_redirect.c42 static int attach_tc_prog(struct bpf_tc_hook *hook, int fd) in attach_tc_prog() argument
47 ret = bpf_tc_hook_create(hook); in attach_tc_prog()
51 ret = bpf_tc_attach(hook, &opts); in attach_tc_prog()
53 bpf_tc_hook_destroy(hook); in attach_tc_prog()
A Dtest_tunnel.c539 DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = ifindex, in attach_tc_prog()
547 ret = bpf_tc_hook_create(&hook); in attach_tc_prog()
552 hook.attach_point = BPF_TC_INGRESS; in attach_tc_prog()
553 ret = bpf_tc_attach(&hook, &opts1); in attach_tc_prog()
555 bpf_tc_hook_destroy(&hook); in attach_tc_prog()
561 hook.attach_point = BPF_TC_EGRESS; in attach_tc_prog()
562 ret = bpf_tc_attach(&hook, &opts2); in attach_tc_prog()
564 bpf_tc_hook_destroy(&hook); in attach_tc_prog()
/tools/lib/bpf/
A Dnetlink.c559 if (OPTS_GET(hook, parent, 0)) in attach_point_to_config()
612 ret = config(&req, hook); in tc_qdisc_modify()
633 if (!hook || !OPTS_VALID(hook, bpf_tc_hook) || in bpf_tc_hook_create()
634 OPTS_GET(hook, ifindex, 0) <= 0) in bpf_tc_hook_create()
637 ret = tc_qdisc_create_excl(hook); in bpf_tc_hook_create()
647 if (!hook || !OPTS_VALID(hook, bpf_tc_hook) || in bpf_tc_hook_destroy()
648 OPTS_GET(hook, ifindex, 0) <= 0) in bpf_tc_hook_destroy()
740 if (!hook || !opts || in bpf_tc_attach()
741 !OPTS_VALID(hook, bpf_tc_hook) || in bpf_tc_attach()
814 if (!hook || in __bpf_tc_detach()
[all …]
/tools/testing/selftests/net/netfilter/
A Dnft_queue.sh101 type filter hook input priority $prio; policy accept;
105 type filter hook forward priority $prio; policy accept;
110 type filter hook output priority $prio; policy accept;
133 type filter hook input priority $prio; policy accept;
137 type filter hook forward priority $prio; policy accept;
141 type filter hook output priority $prio; policy accept;
182 type filter hook forward priority 0; policy accept;
325 type filter hook output priority 0; policy accept;
329 type filter hook postrouting priority 0; policy accept;
370 type filter hook output priority 0; policy accept;
[all …]
A Dconntrack_vrf.sh90 type filter hook prerouting priority raw;
100 type filter hook output priority raw;
144 type filter hook output priority raw;
149 type filter hook postrouting priority mangle;
154 type nat hook postrouting priority 0;
191 type nat hook postrouting priority 0;
A Dnft_interface_stress.sh46 type filter hook ingress device rc$i priority 0
50 type filter hook ingress device rs$i priority 0
60 hook ingress priority 0
106 hook ingress priority 0
A Dconntrack_icmp_related.sh119 type filter hook forward priority 0; policy accept;
136 type filter hook input priority 0; policy accept;
156 type filter hook input priority 0; policy accept;
164 type filter hook output priority 0; policy accept;
180 type nat hook postrouting priority 0; policy accept;
186 type nat hook postrouting priority 0; policy accept;
A Dconntrack_clash.sh31 type nat hook prerouting priority dstnat
37 type nat hook output priority dstnat
49 type filter hook forward priority 0
A Dconntrack_tcp_unreplied.sh71 type filter hook input priority 0; policy accept;
90 type filter hook input priority 0; policy accept;
129 type nat hook prerouting priority 0; policy accept;
A Dnft_nat.sh161 type nat hook output priority 0; policy accept;
231 type nat hook output priority 0; policy accept;
353 type nat hook output priority 0; policy accept;
415 type nat hook postrouting priority 0; policy accept;
506 type nat hook postrouting priority 0; policy accept;
595 type nat hook prerouting priority 0; policy accept;
670 type nat hook prerouting priority 0; policy accept;
771 type filter hook forward priority 0; policy accept;
841 type nat hook postrouting priority 0; policy accept;
1117 type filter hook input priority 0; policy accept;
[all …]
A Dnf_queue.c92 ntohs(ph->hw_protocol), ph->hook); in queue_cb()
94 if (ph->hook >= 5) { in queue_cb()
95 fprintf(stderr, "Unknown hook %d\n", ph->hook); in queue_cb()
114 queue_stats[ph->hook]++; in queue_cb()
A Dconntrack_reverse_clash.sh22 type nat hook postrouting priority srcnat; policy accept;
A Dnft_synproxy.sh65 type filter hook prerouting priority -300; policy accept;
70 type filter hook forward priority 0; policy accept;
A Dnft_flowtable.sh156 hook ingress priority 0
164 type filter hook forward priority 0; policy drop;
191 type filter hook input priority 0; policy accept;
385 type filter hook ingress device "veth0" priority 0; policy accept
402 type filter hook egress device "veth1" priority 0; policy accept
481 type nat hook prerouting priority 0; policy accept;
486 type nat hook postrouting priority 0; policy accept;
544 type nat hook prerouting priority 0; policy accept;
549 type nat hook postrouting priority 0; policy accept;
A Dnft_fib.sh45 type filter hook prerouting priority 0; policy accept;
58 type filter hook input priority 0; policy accept;
71 type filter hook forward priority raw;
100 type filter hook prerouting priority 0;
106 type filter hook input priority 0;
112 type filter hook forward priority 0;
118 type filter hook output priority 0;
124 type filter hook postrouting priority 0;
168 type filter hook prerouting priority 0; policy accept;
417 type filter hook prerouting priority 0;
A Dnft_conntrack_helper.sh55 type filter hook prerouting priority 0; policy accept;
59 type filter hook output priority 0; policy accept;
A Dnft_meta.sh52 type filter hook input priority 0; policy accept;
67 type filter hook output priority 0; policy accept;
A Dbr_netfilter.sh121 type filter hook input priority 1; policy accept
129 type filter hook forward priority 0; policy accept
A Dnft_nat_zones.sh141 type filter hook prerouting priority -64000; policy accept;
151 type nat hook postrouting priority 0; policy accept;
156 type filter hook prerouting priority -100; policy accept;
/tools/testing/selftests/bpf/
A Dxdp_synproxy.c33 LIBBPF_OPTS(bpf_tc_hook, hook, in cleanup()
37 err = bpf_tc_hook_destroy(&hook); in cleanup()
231 LIBBPF_OPTS(bpf_tc_hook, hook, in syncookie_attach()
239 err = bpf_tc_hook_create(&hook); in syncookie_attach()
245 err = bpf_tc_attach(&hook, &opts); in syncookie_attach()
/tools/perf/tests/shell/attr/
A DREADME4 by the PERF_TEST_ATTR environment variable and hook inside the
16 This is the sys_perf_event_open hook implementation. The hook

Completed in 30 milliseconds

12