/openbmc/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | tc_redirect.c | 147 struct nstoken *nstoken = NULL; in netns_setup_links_and_routes() local 187 nstoken = open_netns(NS_SRC); in netns_setup_links_and_routes() 188 if (!ASSERT_OK_PTR(nstoken, "setns src")) in netns_setup_links_and_routes() 206 close_netns(nstoken); in netns_setup_links_and_routes() 209 nstoken = open_netns(NS_FWD); in netns_setup_links_and_routes() 210 if (!ASSERT_OK_PTR(nstoken, "setns fwd")) in netns_setup_links_and_routes() 234 close_netns(nstoken); in netns_setup_links_and_routes() 237 nstoken = open_netns(NS_DST); in netns_setup_links_and_routes() 238 if (!ASSERT_OK_PTR(nstoken, "setns dst")) in netns_setup_links_and_routes() 255 close_netns(nstoken); in netns_setup_links_and_routes() [all …]
|
H A D | ip_check_defrag.c | 87 struct nstoken *nstoken; in attach() local 90 nstoken = open_netns(NS1); in attach() 98 close_netns(nstoken); in attach() 171 struct nstoken *nstoken; in test_bpf_ip_check_defrag_ok() local 190 nstoken = open_netns(NS1); in test_bpf_ip_check_defrag_ok() 191 if (!ASSERT_OK_PTR(nstoken, "setns ns1")) in test_bpf_ip_check_defrag_ok() 194 close_netns(nstoken); in test_bpf_ip_check_defrag_ok() 199 nstoken = open_netns(NS0); in test_bpf_ip_check_defrag_ok() 200 if (!ASSERT_OK_PTR(nstoken, "setns ns0")) in test_bpf_ip_check_defrag_ok() 203 close_netns(nstoken); in test_bpf_ip_check_defrag_ok() [all …]
|
H A D | mptcp.c | 67 static struct nstoken *create_netns(void) in create_netns() 77 static void cleanup_netns(struct nstoken *nstoken) in cleanup_netns() argument 79 if (nstoken) in cleanup_netns() 80 close_netns(nstoken); in cleanup_netns() 193 struct nstoken *nstoken = NULL; in test_base() local 200 nstoken = create_netns(); in test_base() 201 if (!ASSERT_OK_PTR(nstoken, "create_netns")) in test_base() 224 cleanup_netns(nstoken); in test_base() 307 struct nstoken *nstoken = NULL; in test_mptcpify() local 314 nstoken = create_netns(); in test_mptcpify() [all …]
|
H A D | vrf_socket_lookup.c | 146 struct nstoken *nstoken = NULL; in setup() local 176 nstoken = open_netns(NS0); in setup() 177 if (!ASSERT_OK_PTR(nstoken, "setns " NS0)) in setup() 196 if (nstoken) in setup() 197 close_netns(nstoken); in setup() 240 struct nstoken *nstoken = NULL; in _test_vrf_socket_lookup() local 242 nstoken = open_netns(NS0); in _test_vrf_socket_lookup() 243 if (!ASSERT_OK_PTR(nstoken, "setns " NS0)) in _test_vrf_socket_lookup() 256 close_netns(nstoken); in _test_vrf_socket_lookup() 257 nstoken = open_netns(NS1); in _test_vrf_socket_lookup() [all …]
|
H A D | xfrm_info.c | 211 struct nstoken *nstoken; in setup_xfrmi_external_dev() local 229 nstoken = open_netns(ns); in setup_xfrmi_external_dev() 230 if (!ASSERT_OK_PTR(nstoken, "setns")) in setup_xfrmi_external_dev() 244 if (nstoken) in setup_xfrmi_external_dev() 245 close_netns(nstoken); in setup_xfrmi_external_dev() 296 struct nstoken *nstoken = NULL; in _test_xfrm_info() local 304 nstoken = open_netns(NS0); in _test_xfrm_info() 305 if (!ASSERT_OK_PTR(nstoken, "setns " NS0)) in _test_xfrm_info() 328 if (nstoken) in _test_xfrm_info() 329 close_netns(nstoken); in _test_xfrm_info()
|
H A D | decap_sanity.c | 20 struct nstoken *nstoken = NULL; in test_decap_sanity() local 35 nstoken = open_netns(NS_TEST); in test_decap_sanity() 36 if (!ASSERT_OK_PTR(nstoken, "open_netns")) in test_decap_sanity() 70 if (nstoken) { in test_decap_sanity() 72 close_netns(nstoken); in test_decap_sanity()
|
H A D | test_tunnel.c | 311 struct nstoken *nstoken; in test_vxlan_tunnel() local 355 nstoken = open_netns("at_ns0"); in test_vxlan_tunnel() 356 if (!ASSERT_OK_PTR(nstoken, "setns src")) in test_vxlan_tunnel() 367 close_netns(nstoken); in test_vxlan_tunnel() 395 struct nstoken *nstoken; in test_ip6vxlan_tunnel() local 428 nstoken = open_netns("at_ns0"); in test_ip6vxlan_tunnel() 429 if (!ASSERT_OK_PTR(nstoken, "setns src")) in test_ip6vxlan_tunnel() 440 close_netns(nstoken); in test_ip6vxlan_tunnel() 468 struct nstoken *nstoken; in test_ipip_tunnel() local 522 nstoken = open_netns("at_ns0"); in test_ipip_tunnel() [all …]
|
H A D | ns_current_pid_tgid.c | 145 struct nstoken *nstoken = NULL; in test_in_netns() local 150 nstoken = open_netns("ns_current_pid_tgid"); in test_in_netns() 151 if (!ASSERT_OK_PTR(nstoken, "open_netns")) in test_in_netns() 157 if (nstoken) in test_in_netns() 158 close_netns(nstoken); in test_in_netns()
|
H A D | sock_destroy.c | 180 struct nstoken *nstoken = NULL; in test_sock_destroy() local 199 nstoken = open_netns(TEST_NS); in test_sock_destroy() 200 if (!ASSERT_OK_PTR(nstoken, "open_netns")) in test_sock_destroy() 215 if (nstoken) in test_sock_destroy() 216 close_netns(nstoken); in test_sock_destroy()
|
H A D | xdp_do_redirect.c | 92 struct nstoken *nstoken = NULL; in test_xdp_do_redirect() local 124 nstoken = open_netns("testns"); in test_xdp_do_redirect() 125 if (!ASSERT_OK_PTR(nstoken, "setns")) in test_xdp_do_redirect() 244 if (nstoken) in test_xdp_do_redirect() 245 close_netns(nstoken); in test_xdp_do_redirect()
|
H A D | fib_lookup.c | 162 struct nstoken *nstoken = NULL; in test_fib_lookup() local 184 nstoken = open_netns(NS_TEST); in test_fib_lookup() 185 if (!ASSERT_OK_PTR(nstoken, "open_netns")) in test_fib_lookup() 228 if (nstoken) in test_fib_lookup() 229 close_netns(nstoken); in test_fib_lookup()
|
H A D | xdp_dev_bound_only.c | 27 struct nstoken *tok = NULL; in test_xdp_dev_bound_only_offdev()
|
H A D | lwt_helpers.h | 21 struct nstoken *token = open_netns(NETNS); \
|
H A D | empty_skb.c | 11 struct nstoken *tok = NULL; in test_empty_skb()
|
H A D | xdp_synproxy.c | 62 struct nstoken *ns = NULL; in test_synproxy()
|
H A D | assign_reuse.c | 176 struct nstoken *tok = NULL; in test_assign_reuse()
|
H A D | xdp_metadata.c | 284 struct nstoken *tok = NULL; in test_xdp_metadata()
|
/openbmc/linux/tools/testing/selftests/bpf/ |
H A D | network_helpers.h | 64 struct nstoken; 71 struct nstoken *open_netns(const char *name); 72 void close_netns(struct nstoken *token);
|
H A D | network_helpers.c | 399 struct nstoken { struct 403 struct nstoken *open_netns(const char *name) in open_netns() argument 408 struct nstoken *token; in open_netns() 410 token = calloc(1, sizeof(struct nstoken)); in open_netns() 436 void close_netns(struct nstoken *token) in close_netns()
|