| /tools/testing/selftests/bpf/prog_tests/ |
| A D | tc_bpf.c | 37 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 D | bpf_qdisc.c | 18 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 D | xfrm_info.c | 72 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 D | vrf_socket_lookup.c | 107 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 D | xdp_do_redirect.c | 42 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 D | test_tunnel.c | 539 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 D | netlink.c | 559 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 D | nft_queue.sh | 101 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 D | conntrack_vrf.sh | 90 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 D | nft_interface_stress.sh | 46 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 D | conntrack_icmp_related.sh | 119 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 D | conntrack_clash.sh | 31 type nat hook prerouting priority dstnat 37 type nat hook output priority dstnat 49 type filter hook forward priority 0
|
| A D | conntrack_tcp_unreplied.sh | 71 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 D | nft_nat.sh | 161 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 D | nf_queue.c | 92 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 D | conntrack_reverse_clash.sh | 22 type nat hook postrouting priority srcnat; policy accept;
|
| A D | nft_synproxy.sh | 65 type filter hook prerouting priority -300; policy accept; 70 type filter hook forward priority 0; policy accept;
|
| A D | nft_flowtable.sh | 156 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 D | nft_fib.sh | 45 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 D | nft_conntrack_helper.sh | 55 type filter hook prerouting priority 0; policy accept; 59 type filter hook output priority 0; policy accept;
|
| A D | nft_meta.sh | 52 type filter hook input priority 0; policy accept; 67 type filter hook output priority 0; policy accept;
|
| A D | br_netfilter.sh | 121 type filter hook input priority 1; policy accept 129 type filter hook forward priority 0; policy accept
|
| A D | nft_nat_zones.sh | 141 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 D | xdp_synproxy.c | 33 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 D | README | 4 by the PERF_TEST_ATTR environment variable and hook inside the 16 This is the sys_perf_event_open hook implementation. The hook
|