Lines Matching defs:skel
47 #include "vrf_socket_lookup.skel.h"
143 static int setup(struct vrf_socket_lookup *skel)
179 tc_prog_fd = bpf_program__fd(skel->progs.tc_socket_lookup);
182 xdp_prog_fd = bpf_program__fd(skel->progs.xdp_socket_lookup);
201 static int test_lookup(struct vrf_socket_lookup *skel, int sotype,
213 skel->bss->test_xdp = test_xdp;
214 skel->bss->tcp_skc = tcp_skc;
215 skel->bss->lookup_status = -1;
223 if (!ASSERT_EQ(skel->bss->lookup_status, lookup_status_exp,
236 static void _test_vrf_socket_lookup(struct vrf_socket_lookup *skel, int sotype,
261 if (!ASSERT_OK(test_lookup(skel, sotype, IP4_ADDR_VETH02, NON_VRF_PORT,
264 if (!ASSERT_OK(test_lookup(skel, sotype, IP4_ADDR_VETH02, IN_VRF_PORT,
267 if (!ASSERT_OK(test_lookup(skel, sotype, IP4_ADDR_VETH01, NON_VRF_PORT,
270 if (!ASSERT_OK(test_lookup(skel, sotype, IP4_ADDR_VETH01, IN_VRF_PORT,
285 struct vrf_socket_lookup *skel;
289 skel = vrf_socket_lookup__open_and_load();
290 if (!ASSERT_OK_PTR(skel, "vrf_socket_lookup__open_and_load"))
293 if (!ASSERT_OK(setup(skel), "setup"))
297 _test_vrf_socket_lookup(skel, SOCK_STREAM, false, false);
299 _test_vrf_socket_lookup(skel, SOCK_STREAM, false, false);
301 _test_vrf_socket_lookup(skel, SOCK_STREAM, false, false);
303 _test_vrf_socket_lookup(skel, SOCK_STREAM, true, false);
305 _test_vrf_socket_lookup(skel, SOCK_STREAM, true, false);
307 _test_vrf_socket_lookup(skel, SOCK_STREAM, true, false);
310 vrf_socket_lookup__destroy(skel);