| /tools/testing/selftests/bpf/prog_tests/ |
| A D | lwt_ip_encap.c | 84 SYS(fail, "ip netns add %s", name); in create_ns() 109 SYS(fail, "ip -n %s link set dev veth1 up", ns1); in set_top_addr() 110 SYS(fail, "ip -n %s link set dev veth2 up", ns2); in set_top_addr() 111 SYS(fail, "ip -n %s link set dev veth3 up", ns2); in set_top_addr() 112 SYS(fail, "ip -n %s link set dev veth4 up", ns3); in set_top_addr() 130 SYS(fail, "ip -n %s link set dev veth5 up", ns1); in set_bottom_addr() 131 SYS(fail, "ip -n %s link set dev veth6 up", ns2); in set_bottom_addr() 146 SYS(fail, "ip -n %s link set red up", ns1); in configure_vrf() 153 SYS(fail, "ip -n %s link set red up", ns2); in configure_vrf() 258 SYS(fail, "ip link set gre_dev up"); in configure_ns3() [all …]
|
| A D | lwt_seg6local.c | 48 SYS(fail, "ip netns add %s%d", NETNS_BASE, ns); in setup() 50 SYS(fail, "ip -n %s6 link set dev lo up", NETNS_BASE); in setup() 64 SYS(fail, "ip -n %s%d -6 addr add fb00::%d%d/16 dev veth%d scope link", in setup() 66 SYS(fail, "ip -n %s%d -6 addr add fb00::%d%d/16 dev veth%d scope link", in setup() 73 SYS(fail, "ip -n %s1 -6 addr add fb00::1/16 dev lo", NETNS_BASE); in setup() 81 SYS(fail, in setup() 85 SYS(fail, in setup() 88 SYS(fail, "ip -n %s4 -6 addr add fc42::1 dev lo", NETNS_BASE); in setup() 92 SYS(fail, in setup() 96 SYS(fail, "ip -n %s6 -6 addr add fb00::6/16 dev lo", NETNS_BASE); in setup() [all …]
|
| A D | xdp_flowtable.c | 78 SYS(out, "ip netns add " TX_NETNS_NAME); in test_xdp_flowtable() 79 SYS(out, "ip netns add " RX_NETNS_NAME); in test_xdp_flowtable() 90 SYS(out, in test_xdp_flowtable() 94 SYS(out, "ip link add " RX_NAME " type dummy"); in test_xdp_flowtable() 97 SYS(out, "ip link set dev " RX_NAME " up"); in test_xdp_flowtable() 100 SYS(out, "nft add table ip filter"); in test_xdp_flowtable() 101 SYS(out, in test_xdp_flowtable() 104 SYS(out, in test_xdp_flowtable() 107 SYS(out, in test_xdp_flowtable() 112 SYS(out, in test_xdp_flowtable() [all …]
|
| A D | test_tunnel.c | 128 SYS(fail, "ip netns add at_ns0"); in config_device() 190 SYS(fail, "ip link set dev veth1 up"); in add_ip6vxlan_tunnel() 313 SYS(fail, in add_xfrm_tunnel() 319 SYS(fail, in add_xfrm_tunnel() 327 SYS(fail, in add_xfrm_tunnel() 333 SYS(fail, in add_xfrm_tunnel() 349 SYS(fail, in add_xfrm_tunnel() 354 SYS(fail, in add_xfrm_tunnel() 361 SYS(fail, in add_xfrm_tunnel() 366 SYS(fail, in add_xfrm_tunnel() [all …]
|
| A D | xdp_synproxy.c | 67 SYS(out, "ip netns add synproxy"); in test_synproxy() 70 SYS(out, "ip link set tmp1 netns synproxy"); in test_synproxy() 71 SYS(out, "ip link set tmp0 up"); in test_synproxy() 77 SYS(out, "ethtool -K tmp0 tx off"); in test_synproxy() 86 SYS(out, "ip link set lo up"); in test_synproxy() 87 SYS(out, "ip link set tmp1 up"); in test_synproxy() 89 SYS(out, "sysctl -w net.ipv4.tcp_syncookies=2"); in test_synproxy() 90 SYS(out, "sysctl -w net.ipv4.tcp_timestamps=1"); in test_synproxy() 92 SYS(out, "iptables-legacy -t raw -I PREROUTING \ in test_synproxy() 94 SYS(out, "iptables-legacy -t filter -A INPUT \ in test_synproxy() [all …]
|
| A D | xfrm_info.c | 114 SYS(fail, "ip netns add " NS0); in config_underlay() 115 SYS(fail, "ip netns add " NS1); in config_underlay() 116 SYS(fail, "ip netns add " NS2); in config_underlay() 121 SYS(fail, "ip -net " NS0 " link set dev veth01 up"); in config_underlay() 123 SYS(fail, "ip -net " NS1 " link set dev veth10 up"); in config_underlay() 128 SYS(fail, "ip -net " NS0 " link set dev veth02 up"); in config_underlay() 130 SYS(fail, "ip -net " NS2 " link set dev veth20 up"); in config_underlay() 141 SYS(fail, "ip -net %s xfrm state add src %s dst %s spi 1 " in setup_xfrm_tunnel_ns() 263 SYS(fail, "ip -net " NS0 " link set dev ipsec0 up"); in config_overlay() 267 SYS(fail, "ip -net " NS1 " link set dev ipsec0 up"); in config_overlay() [all …]
|
| A D | fib_lookup.c | 151 SYS(fail, "ip link add veth1 type veth peer name veth2"); in setup_netns() 152 SYS(fail, "ip link set dev veth1 up"); in setup_netns() 153 SYS(fail, "ip link set dev veth2 up"); in setup_netns() 167 SYS(fail, "ip addr add %s/24 dev veth1", IPV4_IFACE_ADDR); in setup_netns() 179 SYS(fail, "ip addr add %s/24 dev veth2", IPV4_TBID_ADDR); in setup_netns() 180 SYS(fail, "ip route del %s/24 dev veth2", IPV4_TBID_NET); in setup_netns() 184 SYS(fail, "ip addr add %s/64 dev veth2", IPV6_TBID_ADDR); in setup_netns() 185 SYS(fail, "ip -6 route del %s/64 dev veth2", IPV6_TBID_NET); in setup_netns() 198 SYS(fail, "ip addr add %s/24 dev veth1", IPV4_LOCAL); in setup_netns() 199 SYS(fail, "ip addr add %s/64 dev veth1 nodad", IPV6_LOCAL); in setup_netns() [all …]
|
| A D | xdp_vlan.c | 36 SYS(fail, "ip netns add %s", ns1); in setup_network() 37 SYS(fail, "ip netns add %s", ns2); in setup_network() 38 SYS(fail, "ip -n %s link add %s type veth peer name %s netns %s", in setup_network() 44 SYS(fail, "ip netns exec %s ethtool -K %s rxvlan off txvlan off", ns1, VETH_NAME); in setup_network() 45 SYS(fail, "ip netns exec %s ethtool -K %s rxvlan off txvlan off", ns2, VETH_NAME); in setup_network() 48 SYS(fail, "ip -n %s addr add %s/24 dev %s", ns1, NS1_IP_ADDR, VETH_NAME); in setup_network() 49 SYS(fail, "ip -n %s link set %s up", ns1, VETH_NAME); in setup_network() 52 SYS(fail, "ip -n %s link add link %s name %s.%d type vlan id %d", in setup_network() 54 SYS(fail, "ip -n %s addr add %s/24 dev %s.%d", ns2, NS2_IP_ADDR, VETH_NAME, VLAN_ID); in setup_network() 55 SYS(fail, "ip -n %s link set %s up", ns2, VETH_NAME); in setup_network() [all …]
|
| A D | vrf_socket_lookup.c | 148 SYS(fail, "ip netns add " NS0); in setup() 149 SYS(fail, "ip netns add " NS1); in setup() 155 SYS(fail, "ip -net " NS0 " link set dev veth01 up"); in setup() 157 SYS(fail, "ip -net " NS1 " link set dev veth10 up"); in setup() 163 SYS(fail, "ip -net " NS0 " link set dev veth02 up"); in setup() 165 SYS(fail, "ip -net " NS1 " link set dev veth20 up"); in setup() 168 SYS(fail, "ip -net " NS0 " link add vrf1 type vrf table 11"); in setup() 169 SYS(fail, "ip -net " NS0 " route add vrf vrf1 unreachable default" in setup() 171 SYS(fail, "ip -net " NS0 " link set vrf1 alias vrf"); in setup() 172 SYS(fail, "ip -net " NS0 " link set vrf1 up"); in setup() [all …]
|
| A D | lwt_redirect.c | 206 SYS(fail, "sysctl -w net.ipv6.conf.all.disable_ipv6=1"); in setup_redirect_target() 207 SYS(fail, "ip link add link_err type dummy"); in setup_redirect_target() 208 SYS(fail, "ip link set lo up"); in setup_redirect_target() 209 SYS(fail, "ip addr add dev lo " LOCAL_SRC "/32"); in setup_redirect_target() 210 SYS(fail, "ip link set link_err up"); in setup_redirect_target() 211 SYS(fail, "ip link set %s up", target_dev); in setup_redirect_target() 213 SYS(fail, "ip route add %s dev link_err encap bpf xmit obj %s sec %s", in setup_redirect_target() 267 SYS(out, "ip link set %s down", target_dev); in __test_lwt_redirect_dev_down() 298 SYS(out, "ip link add vlan100 link %s type vlan id 100", lower_dev); in test_lwt_redirect_dev_carrier_down() 299 SYS(out, "ip link set %s up", vlan_dev); in test_lwt_redirect_dev_carrier_down() [all …]
|
| A D | empty_skb.c | 95 SYS(out, "ip netns add empty_skb"); in test_empty_skb() 99 SYS(out, "ip link add veth0 type veth peer veth1"); in test_empty_skb() 100 SYS(out, "ip link set dev veth0 up"); in test_empty_skb() 101 SYS(out, "ip link set dev veth1 up"); in test_empty_skb() 102 SYS(out, "ip addr add 10.0.0.1/8 dev veth0"); in test_empty_skb() 103 SYS(out, "ip addr add 10.0.0.2/8 dev veth1"); in test_empty_skb() 106 SYS(out, "ip link add ipip0 type ipip local 10.0.0.1 remote 10.0.0.2"); in test_empty_skb() 107 SYS(out, "ip link set ipip0 up"); in test_empty_skb() 108 SYS(out, "ip addr add 192.168.1.1/16 dev ipip0"); in test_empty_skb()
|
| A D | xdp_do_redirect.c | 133 SYS(out, "ip netns add testns"); in test_xdp_do_redirect() 141 SYS(out, "ip link set dev veth_src up"); in test_xdp_do_redirect() 142 SYS(out, "ip link set dev veth_dst up"); in test_xdp_do_redirect() 143 SYS(out, "ip addr add dev veth_src fc00::1/64"); in test_xdp_do_redirect() 144 SYS(out, "ip addr add dev veth_dst fc00::2/64"); in test_xdp_do_redirect() 158 SYS(out, "sysctl -qw net.ipv6.conf.all.forwarding=1"); in test_xdp_do_redirect() 188 SYS(out, "ethtool -K veth_src gro on"); in test_xdp_do_redirect() 189 SYS(out, "ethtool -K veth_dst gro on"); in test_xdp_do_redirect() 317 SYS(fail, in ping_setup() 320 SYS(fail, "ip -n %s link set veth%d up", NS0, i); in ping_setup() [all …]
|
| A D | lwt_reroute.c | 165 SYS(fail, "ip link add link_err type dummy"); in setup() 166 SYS(fail, "ip link set lo up"); in setup() 167 SYS(fail, "ip addr add dev lo " LOCAL_SRC "/32"); in setup() 168 SYS(fail, "ip link set link_err up"); in setup() 169 SYS(fail, "ip link set %s up", tun_dev); in setup() 171 SYS(fail, "ip route add %s dev link_err encap bpf xmit obj %s sec lwt_xmit", in setup() 174 SYS(fail, "ip rule add pref 100 from all fwmark %d lookup 100", in setup() 176 SYS(fail, "ip route add t 100 default dev %s", tun_dev); in setup() 230 SYS(fail, "tc qdisc replace dev %s root fq limit 5 flow_limit 5", tun_dev); in test_lwt_reroute_qdisc_dropped()
|
| A D | bpf_qdisc.c | 99 SYS(out, "ip link add veth0 type veth peer veth1"); in test_qdisc_attach_to_mq() 101 SYS(out, "tc qdisc add dev veth0 root handle 1: mq"); in test_qdisc_attach_to_mq() 108 SYS(out, "tc qdisc delete dev veth0 root mq"); in test_qdisc_attach_to_mq() 130 SYS(out, "tc qdisc add dev lo root handle 1: htb"); in test_qdisc_attach_to_non_root() 131 SYS(out_del_htb, "tc class add dev lo parent 1: classid 1:1 htb rate 75Kbit"); in test_qdisc_attach_to_non_root() 138 SYS(out, "tc qdisc delete dev lo root htb"); in test_qdisc_attach_to_non_root() 200 SYS(out, "ip link add veth0 type veth peer veth1"); in test_default_qdisc_attach_to_mq() 201 SYS(out, "tc qdisc add dev veth0 root handle 1: mq"); in test_default_qdisc_attach_to_mq() 205 SYS(out, "tc qdisc delete dev veth0 root mq"); in test_default_qdisc_attach_to_mq()
|
| A D | tc_redirect.c | 247 SYS(fail, "ip link set src netns " NS_SRC); in netns_setup_links_and_routes() 248 SYS(fail, "ip link set src_fwd netns " NS_FWD); in netns_setup_links_and_routes() 249 SYS(fail, "ip link set dst_fwd netns " NS_FWD); in netns_setup_links_and_routes() 250 SYS(fail, "ip link set dst netns " NS_DST); in netns_setup_links_and_routes() 257 SYS(fail, "ip addr add " IP4_SRC "/32 dev src"); in netns_setup_links_and_routes() 259 SYS(fail, "ip link set dev src up"); in netns_setup_links_and_routes() 285 SYS(fail, "ip link set dev src_fwd up"); in netns_setup_links_and_routes() 286 SYS(fail, "ip link set dev dst_fwd up"); in netns_setup_links_and_routes() 309 SYS(fail, "ip link set dev dst up"); in netns_setup_links_and_routes() 310 SYS(fail, "ip link set dev lo up"); in netns_setup_links_and_routes() [all …]
|
| A D | ip_check_defrag.c | 46 SYS(fail, "ip netns add " NS0); in setup_topology() 47 SYS(fail, "ip netns add " NS1); in setup_topology() 48 SYS(fail, "ip link add " VETH0 " netns " NS0 " type veth peer name " VETH1 " netns " NS1); in setup_topology() 50 SYS(fail, "ip -6 -net " NS0 " addr add " VETH0_ADDR6 "/64 dev " VETH0 " nodad"); in setup_topology() 51 SYS(fail, "ip -6 -net " NS1 " addr add " VETH1_ADDR6 "/64 dev " VETH1 " nodad"); in setup_topology() 53 SYS(fail, "ip -net " NS0 " addr add " VETH0_ADDR "/24 dev " VETH0); in setup_topology() 54 SYS(fail, "ip -net " NS1 " addr add " VETH1_ADDR "/24 dev " VETH1); in setup_topology() 56 SYS(fail, "ip -net " NS0 " link set dev " VETH0 " up"); in setup_topology() 57 SYS(fail, "ip -net " NS1 " link set dev " VETH1 " up"); in setup_topology()
|
| A D | xdp_bonding.c | 145 SYS(fail, "ip netns add ns_dst"); in bonding_setup() 146 SYS(fail, "ip link add veth1_1 type veth peer name veth2_1 netns ns_dst"); in bonding_setup() 147 SYS(fail, "ip link add veth1_2 type veth peer name veth2_2 netns ns_dst"); in bonding_setup() 149 SYS(fail, "ip link add bond1 type bond mode %s xmit_hash_policy %s", in bonding_setup() 151 SYS(fail, "ip link set bond1 up address " BOND1_MAC_STR " addrgenmode none"); in bonding_setup() 156 SYS(fail, "ip link set veth1_1 master bond1"); in bonding_setup() 158 SYS(fail, "ip link set veth1_2 master bond1"); in bonding_setup() 160 SYS(fail, "ip link set veth1_2 up addrgenmode none"); in bonding_setup() 166 SYS(fail, "ip -netns ns_dst link set veth2_1 master bond2"); in bonding_setup() 169 SYS(fail, "ip -netns ns_dst link set veth2_2 master bond2"); in bonding_setup() [all …]
|
| A D | decap_sanity.c | 31 SYS(fail, "ip netns add %s", NS_TEST); in test_decap_sanity() 32 SYS(fail, "ip -net %s -6 addr add %s/128 dev lo nodad", NS_TEST, IPV6_IFACE_ADDR); in test_decap_sanity() 33 SYS(fail, "ip -net %s link set dev lo up", NS_TEST); in test_decap_sanity()
|
| A D | xdp_metadata.c | 368 SYS(out, "ip netns add " TX_NETNS_NAME); in test_xdp_metadata() 369 SYS(out, "ip netns add " RX_NETNS_NAME); in test_xdp_metadata() 374 SYS(out, "ip link add numtxqueues 1 numrxqueues 1 " TX_NAME in test_xdp_metadata() 376 SYS(out, "ip link set " RX_NAME " netns " RX_NETNS_NAME); in test_xdp_metadata() 378 SYS(out, "ip link set dev " TX_NAME " address " TX_MAC); in test_xdp_metadata() 379 SYS(out, "ip link set dev " TX_NAME " up"); in test_xdp_metadata() 381 SYS(out, "ip link add link " TX_NAME " " TX_NAME_VLAN in test_xdp_metadata() 383 SYS(out, "ip link set dev " TX_NAME_VLAN " up"); in test_xdp_metadata() 393 SYS(out, "ip link set dev " RX_NAME " address " RX_MAC); in test_xdp_metadata() 394 SYS(out, "ip link set dev " RX_NAME " up"); in test_xdp_metadata() [all …]
|
| A D | xdp_devmap_attach.c | 29 SYS(out_close, "ip netns add %s", TEST_NS); in test_xdp_with_devmap_helpers() 33 SYS(out_close, "ip link set dev lo up"); in test_xdp_with_devmap_helpers() 164 SYS(out_close, "ip netns add %s", TEST_NS); in test_xdp_with_devmap_helpers_veth() 169 SYS(out_close, "ip link add veth_src type veth peer name veth_dst"); in test_xdp_with_devmap_helpers_veth() 170 SYS(out_close, "ip link set dev veth_src up"); in test_xdp_with_devmap_helpers_veth() 171 SYS(out_close, "ip link set dev veth_dst up"); in test_xdp_with_devmap_helpers_veth()
|
| A D | xdp_dev_bound_only.c | 32 SYS(out, "ip netns add " LOCAL_NETNS); in test_xdp_dev_bound_only_offdev() 36 SYS(out, "ip link add eth42 type veth"); in test_xdp_dev_bound_only_offdev()
|
| A D | test_xdp_veth.c | 183 SYS(fail, "ip netns add %s", net_config->ns0_name); in create_network() 189 SYS(fail, "ip netns add %s", net_config->veth_cfg[i].namespace); in create_network() 198 SYS(fail, "ip link add %s type veth peer name %s netns %s", in create_network() 201 SYS(fail, "ip link set dev %s up", net_config->veth_cfg[i].local_veth); in create_network() 203 SYS(fail, "ip -n %s addr add %s/24 dev %s", in create_network() 207 SYS(fail, "ip -n %s link set dev %s up", net_config->veth_cfg[i].namespace, in create_network() 398 SYS(destroy_xdp_redirect_map, in xdp_veth_broadcast_redirect() 507 SYS(destroy_xdp_redirect_map, in xdp_veth_egress()
|
| A D | cgroup_storage.c | 14 SYS(fail, "ip netns add %s", TEST_NS); in setup_network() 18 SYS(cleanup_ns, "ip link set lo up"); in setup_network()
|
| A D | mptcp.c | 327 SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", NS_TEST); in endpoint_init() 328 SYS(fail, "ip -net %s addr add %s/24 dev veth1", NS_TEST, ADDR_1); in endpoint_init() 329 SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST); in endpoint_init() 330 SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, ADDR_2); in endpoint_init() 331 SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST); in endpoint_init()
|
| A D | crypto_sanity.c | 99 SYS(fail, "ip netns add %s", NS_TEST); in test_crypto_sanity() 100 SYS(fail, "ip -net %s -6 addr add %s/128 dev lo nodad", NS_TEST, IPV6_IFACE_ADDR); in test_crypto_sanity() 101 SYS(fail, "ip -net %s link set dev lo up", NS_TEST); in test_crypto_sanity()
|