Home
last modified time | relevance | path

Searched refs:xdp (Results 1 – 20 of 20) sorted by relevance

/tools/testing/selftests/bpf/progs/
Dtest_xdp.c80 static __always_inline int handle_ipv4(struct xdp_md *xdp) in handle_ipv4() argument
82 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4()
83 void *data = (void *)(long)xdp->data; in handle_ipv4()
113 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct iphdr))) in handle_ipv4()
116 data = (void *)(long)xdp->data; in handle_ipv4()
117 data_end = (void *)(long)xdp->data_end; in handle_ipv4()
153 static __always_inline int handle_ipv6(struct xdp_md *xdp) in handle_ipv6() argument
155 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6()
156 void *data = (void *)(long)xdp->data; in handle_ipv6()
183 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct ipv6hdr))) in handle_ipv6()
[all …]
Dtest_xdp_loop.c76 static __always_inline int handle_ipv4(struct xdp_md *xdp) in handle_ipv4() argument
78 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4()
79 void *data = (void *)(long)xdp->data; in handle_ipv4()
109 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct iphdr))) in handle_ipv4()
112 data = (void *)(long)xdp->data; in handle_ipv4()
113 data_end = (void *)(long)xdp->data_end; in handle_ipv4()
149 static __always_inline int handle_ipv6(struct xdp_md *xdp) in handle_ipv6() argument
151 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6()
152 void *data = (void *)(long)xdp->data; in handle_ipv6()
179 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct ipv6hdr))) in handle_ipv6()
[all …]
Dtest_adjust_tail.c15 int _xdp_adjust_tail(struct xdp_md *xdp) in _xdp_adjust_tail() argument
17 void *data_end = (void *)(long)xdp->data_end; in _xdp_adjust_tail()
18 void *data = (void *)(long)xdp->data; in _xdp_adjust_tail()
25 if (bpf_xdp_adjust_tail(xdp, 0 - offset)) in _xdp_adjust_tail()
Dxdp_redirect_map.c14 int xdp_redirect_map_0(struct xdp_md *xdp) in xdp_redirect_map_0() argument
20 int xdp_redirect_map_1(struct xdp_md *xdp) in xdp_redirect_map_1() argument
26 int xdp_redirect_map_2(struct xdp_md *xdp) in xdp_redirect_map_2() argument
Dtest_xdp_redirect.c18 int xdp_redirect_to_111(struct xdp_md *xdp) in xdp_redirect_to_111() argument
23 int xdp_redirect_to_222(struct xdp_md *xdp) in xdp_redirect_to_222() argument
Dtest_xdp_noinline.c278 bool encap_v6(struct xdp_md *xdp, struct ctl_value *cval, in encap_v6() argument
289 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct ipv6hdr))) in encap_v6()
291 data = (void *)(long)xdp->data; in encap_v6()
292 data_end = (void *)(long)xdp->data_end; in encap_v6()
321 bool encap_v4(struct xdp_md *xdp, struct ctl_value *cval, in encap_v4() argument
337 if (bpf_xdp_adjust_head(xdp, 0 - (int)sizeof(struct iphdr))) in encap_v4()
339 data = (void *)(long)xdp->data; in encap_v4()
340 data_end = (void *)(long)xdp->data_end; in encap_v4()
369 if (bpf_xdp_adjust_head(xdp, (int)sizeof(struct iphdr))) in encap_v4()
375 bool decap_v6(struct xdp_md *xdp, void **data, void **data_end, bool inner_v4) in decap_v6() argument
[all …]
Dxdp_tx.c7 int xdp_tx(struct xdp_md *xdp) in xdp_tx() argument
/tools/testing/selftests/bpf/
Dtest_xdp_veth.sh61 if ! ip link set dev lo xdp off > /dev/null 2>&1; then
101 xdp_redirect_map.o $BPF_DIR/progs type xdp \
106 ip link set dev veth1 xdp pinned $BPF_DIR/progs/redirect_map_0
107 ip link set dev veth2 xdp pinned $BPF_DIR/progs/redirect_map_1
108 ip link set dev veth3 xdp pinned $BPF_DIR/progs/redirect_map_2
110 ip -n ns1 link set dev veth11 xdp obj xdp_dummy.o sec xdp_dummy
111 ip -n ns2 link set dev veth22 xdp obj xdp_tx.o sec tx
112 ip -n ns3 link set dev veth33 xdp obj xdp_dummy.o sec xdp_dummy
Dtest_tcp_check_syncookie_user.c81 static int get_map_fd_by_prog_id(int prog_id, bool *xdp) in get_map_fd_by_prog_id() argument
108 *xdp = info.type == BPF_PROG_TYPE_XDP; in get_map_fd_by_prog_id()
119 static int run_test(int server_fd, int results_fd, bool xdp) in run_test() argument
170 if (xdp && value_gen == 0) { in run_test()
210 bool xdp; in main() local
217 results = get_map_fd_by_prog_id(atoi(argv[1]), &xdp); in main()
242 if (run_test(server, results, xdp)) in main()
245 if (run_test(server_v6, results, xdp)) in main()
Dtest_xdp_meta.sh17 ip link set dev lo xdp off 2>/dev/null > /dev/null
43 ip netns exec ns1 ip link set dev veth1 xdp obj test_xdp_meta.o sec x
44 ip netns exec ns2 ip link set dev veth2 xdp obj test_xdp_meta.o sec x
Dtest_offload.py482 def ip_link_show(self, xdp): argument
488 fail(xdp != "xdp" in link,
490 ("xdp" in link, xdp))
686 xdp = sim.ip_link_show(xdp=True)["xdp"]
688 fail("prog" not in xdp, "Base program not reported in single program mode")
689 fail(len(xdp["attached"]) != 1,
693 two_xdps = sim.ip_link_show(xdp=True)["xdp"]
695 fail(xdp["attached"][0] not in two_xdps["attached"],
717 xdp = sim.ip_link_show(xdp=True)["xdp"]
720 fail(xdp["mode"] != modeid, "Bad mode reported after multiple programs")
[all …]
Dtest_tcp_check_syncookie.sh69 ns1_exec ip link set "${TEST_IF}" xdp \
Dtest_xdp_vlan.sh29 xdpgeneric | xdpdrv | xdp)
/tools/bpf/bpftool/Documentation/
Dbpftool-net.rst29 | *ATTACH_TYPE* := { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** }
36 Currently, only device driver xdp attachments and tc filter
47 The current output will start with all xdp program attachments, followed by
48 all tc class/qdisc bpf program attachments. Both xdp programs and
62 … **xdp** - try native XDP and fallback to generic XDP if NIC driver does not support it;
102 xdp:
118 "xdp": [{
169 xdp:
179 xdp:
189 xdp:
Dbpftool-map.rst222 | **# bpftool prog loadall tail_calls.o /sys/fs/bpf/foo type xdp**
227 545: xdp name main_func tag 674b4b5597193dc3 gpl
230 pinned /sys/fs/bpf/foo/xdp
231 546: xdp name bpf_func_process tag e369a529024751fc gpl
235 547: xdp name bpf_func_debug tag 0b597868bc7f0976 gpl
246 owner_prog_type xdp owner jited
Dbpftool-prog.rst39 | **tracepoint** | **raw_tracepoint** | **xdp** | **perf_event** | **cgroup/skb** |
223 10: xdp name some_prog tag 005a3d2123620c8b gpl run_time_ns 81632 run_cnt 10
233 "type": "xdp",
294 | **# bpftool prog load xdp1_kern.o /sys/fs/bpf/xdp1 type xdp map name rxcnt id 7**
299 9: xdp name xdp_prog1 tag 539ec6ce11b52f98 gpl
/tools/testing/selftests/net/
Dudpgro_bench.sh37 ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp_dummy
Dudpgro.sh29 ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o section xdp_dummy
/tools/bpf/bpftool/bash-completion/
Dbpftool385 xdp perf_event cgroup/skb cgroup/sock \
790 local ATTACH_TYPES='xdp xdpgeneric xdpdrv xdpoffload'
/tools/lib/bpf/
Dlibbpf.c4453 BPF_PROG_TYPE_FNS(xdp, BPF_PROG_TYPE_XDP);