Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dvrf_socket_lookup.c105 static int attach_progs(char *ifname, int tc_prog_fd, int xdp_prog_fd) in attach_progs() argument
126 ret = bpf_xdp_attach(ifindex, xdp_prog_fd, 0, NULL); in attach_progs()
145 int tc_prog_fd, xdp_prog_fd, ret = 0; in setup() local
182 xdp_prog_fd = bpf_program__fd(skel->progs.xdp_socket_lookup); in setup()
183 if (!ASSERT_GE(xdp_prog_fd, 0, "bpf_program__xdp_fd")) in setup()
186 if (attach_progs("veth01", tc_prog_fd, xdp_prog_fd)) in setup()
189 if (attach_progs("veth02", tc_prog_fd, xdp_prog_fd)) in setup()
H A Dxdp_do_redirect.c89 int err, xdp_prog_fd, tc_prog_fd, ifindex_src, ifindex_dst; in test_xdp_do_redirect() local
221 xdp_prog_fd = bpf_program__fd(skel->progs.xdp_redirect); in test_xdp_do_redirect()
222 err = bpf_prog_test_run_opts(xdp_prog_fd, &opts); in test_xdp_do_redirect()
H A Dtest_tunnel.c636 int xdp_prog_fd; in test_xfrm_tunnel() local
662 xdp_prog_fd = bpf_program__fd(skel->progs.xfrm_get_state_xdp); in test_xfrm_tunnel()
663 if (!ASSERT_GE(xdp_prog_fd, 0, "bpf_program__fd")) in test_xfrm_tunnel()
665 err = bpf_xdp_attach(ifindex, xdp_prog_fd, XDP_FLAGS_REPLACE, &opts); in test_xfrm_tunnel()