Searched refs:tap_fd (Results 1 – 4 of 4) sorted by relevance
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | lwt_redirect.c | 159 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() 219 return tap_fd; in setup_redirect_target() 222 if (tap_fd >= 0) in setup_redirect_target() 223 close(tap_fd); in setup_redirect_target() 230 int tap_fd = -1; in test_lwt_redirect_normal() local 233 tap_fd = setup_redirect_target(target_dev, need_mac); in test_lwt_redirect_normal() [all …]
|
| H A D | xdp_context_test_run.c | 166 static int write_test_packet(int tap_fd) in write_test_packet() argument 183 n = write(tap_fd, packet, sizeof(packet)); in write_test_packet() 301 int tap_fd = -1; in test_tuntap() local 311 tap_fd = open_tuntap(TAP_NAME, true); in test_tuntap() 312 if (!ASSERT_GE(tap_fd, 0, "open_tuntap")) in test_tuntap() 345 ret = write_test_packet(tap_fd); in test_tuntap() 353 if (tap_fd >= 0) in test_tuntap() 354 close(tap_fd); in test_tuntap() 367 int tap_fd = -1; in test_tuntap_mirred() local 396 tap_fd = open_tuntap(TAP_NAME, true); in test_tuntap_mirred() [all …]
|
| H A D | lwt_reroute.c | 155 int tap_fd = -1; in setup() local 157 tap_fd = open_tuntap(tun_dev, false); in setup() 158 if (!ASSERT_GE(tap_fd, 0, "open_tun")) in setup() 178 return tap_fd; in setup() 181 if (tap_fd >= 0) in setup() 182 close(tap_fd); in setup()
|
| H A D | flow_dissector.c | 653 static void run_tests_skb_less(int tap_fd, struct bpf_map *keys, in run_tests_skb_less() argument 682 err = tx_tap(tap_fd, &tests[i].pkt, sizeof(tests[i].pkt)); in run_tests_skb_less() 705 int err, prog_fd, tap_fd; in test_flow_dissector_skb_less_direct_attach() local 729 tap_fd = create_tap("tap0"); in test_flow_dissector_skb_less_direct_attach() 730 if (!ASSERT_OK_FD(tap_fd, "create_tap")) in test_flow_dissector_skb_less_direct_attach() 736 run_tests_skb_less(tap_fd, skel->maps.last_dissection, in test_flow_dissector_skb_less_direct_attach() 743 close(tap_fd); in test_flow_dissector_skb_less_direct_attach() 752 int err, net_fd, tap_fd; in test_flow_dissector_skb_less_indirect_attach() local 773 tap_fd = create_tap("tap0"); in test_flow_dissector_skb_less_indirect_attach() 774 if (!ASSERT_OK_FD(tap_fd, "create_tap")) in test_flow_dissector_skb_less_indirect_attach() [all …]
|