Home
last modified time | relevance | path

Searched refs:qdisc_hook (Results 1 – 3 of 3) sorted by relevance

/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Ddecap_sanity.c18 LIBBPF_OPTS(bpf_tc_hook, qdisc_hook, .attach_point = BPF_TC_EGRESS); in test_decap_sanity()
39 qdisc_hook.ifindex = if_nametoindex("lo"); in test_decap_sanity()
40 if (!ASSERT_GT(qdisc_hook.ifindex, 0, "if_nametoindex lo")) in test_decap_sanity()
43 err = bpf_tc_hook_create(&qdisc_hook); in test_decap_sanity()
48 err = bpf_tc_attach(&qdisc_hook, &tc_attach); in test_decap_sanity()
71 bpf_tc_hook_destroy(&qdisc_hook); in test_decap_sanity()
Dcrypto_sanity.c82 LIBBPF_OPTS(bpf_tc_hook, qdisc_hook, .attach_point = BPF_TC_EGRESS); in test_crypto_sanity()
111 qdisc_hook.ifindex = if_nametoindex("lo"); in test_crypto_sanity()
112 if (!ASSERT_GT(qdisc_hook.ifindex, 0, "if_nametoindex lo")) in test_crypto_sanity()
132 err = bpf_tc_hook_create(&qdisc_hook); in test_crypto_sanity()
143 err = bpf_tc_attach(&qdisc_hook, &tc_attach_enc); in test_crypto_sanity()
163 err = bpf_tc_detach(&qdisc_hook, &tc_attach_enc); in test_crypto_sanity()
168 err = bpf_tc_attach(&qdisc_hook, &tc_attach_dec); in test_crypto_sanity()
188 err = bpf_tc_detach(&qdisc_hook, &tc_attach_dec); in test_crypto_sanity()
Dtc_redirect.c329 static int qdisc_clsact_create(struct bpf_tc_hook *qdisc_hook, int ifindex) in qdisc_clsact_create() argument
334 qdisc_hook->ifindex = ifindex; in qdisc_clsact_create()
335 qdisc_hook->attach_point = BPF_TC_INGRESS | BPF_TC_EGRESS; in qdisc_clsact_create()
336 err = bpf_tc_hook_create(qdisc_hook); in qdisc_clsact_create()
339 if_indextoname(qdisc_hook->ifindex, ifname) ? : "<unknown_iface>"); in qdisc_clsact_create()
346 static int xgress_filter_add(struct bpf_tc_hook *qdisc_hook, in xgress_filter_add() argument
354 qdisc_hook->attach_point = xgress; in xgress_filter_add()
357 err = bpf_tc_attach(qdisc_hook, &tc_attach); in xgress_filter_add()
360 if_indextoname(qdisc_hook->ifindex, ifname) ? : "<unknown_iface>", in xgress_filter_add()
369 #define QDISC_CLSACT_CREATE(qdisc_hook, ifindex) ({ \ argument
[all …]