Home
last modified time | relevance | path

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

/Linux-v6.6/tools/testing/selftests/bpf/prog_tests/
Dlwt_redirect.c159 static void send_and_capture_test_packets(const char *test_name, int tap_fd, in send_and_capture_test_packets() argument
173 ret = wait_for_packet(tap_fd, filter, &timeo); in send_and_capture_test_packets()
196 int tap_fd = -1; in setup_redirect_target() local
198 tap_fd = open_tuntap(target_dev, need_mac); in setup_redirect_target()
199 if (!ASSERT_GE(tap_fd, 0, "open_tuntap")) in setup_redirect_target()
218 return tap_fd; in setup_redirect_target()
221 if (tap_fd >= 0) in setup_redirect_target()
222 close(tap_fd); in setup_redirect_target()
229 int tap_fd = -1; in test_lwt_redirect_normal() local
232 tap_fd = setup_redirect_target(target_dev, need_mac); in test_lwt_redirect_normal()
[all …]
Dlwt_reroute.c153 int tap_fd = -1; in setup() local
155 tap_fd = open_tuntap(tun_dev, false); in setup()
156 if (!ASSERT_GE(tap_fd, 0, "open_tun")) in setup()
176 return tap_fd; in setup()
179 if (tap_fd >= 0) in setup()
180 close(tap_fd); in setup()
Dflow_dissector.c537 static void run_tests_skb_less(int tap_fd, struct bpf_map *keys) in run_tests_skb_less() argument
561 err = tx_tap(tap_fd, &tests[i].pkt, sizeof(tests[i].pkt)); in run_tests_skb_less()
578 static void test_skb_less_prog_attach(struct bpf_flow *skel, int tap_fd) in test_skb_less_prog_attach() argument
590 run_tests_skb_less(tap_fd, skel->maps.last_dissection); in test_skb_less_prog_attach()
596 static void test_skb_less_link_create(struct bpf_flow *skel, int tap_fd) in test_skb_less_link_create() argument
609 run_tests_skb_less(tap_fd, skel->maps.last_dissection); in test_skb_less_link_create()
619 int i, err, prog_fd, keys_fd = -1, tap_fd; in test_flow_dissector() local
669 tap_fd = create_tap("tap0"); in test_flow_dissector()
670 CHECK(tap_fd < 0, "create_tap", "tap_fd %d errno %d\n", tap_fd, errno); in test_flow_dissector()
675 test_skb_less_prog_attach(skel, tap_fd); in test_flow_dissector()
[all …]