/tools/testing/selftests/net/forwarding/ |
D | fib_offload_lib.sh | 7 local ns=$1; shift 13 ip -n $ns -j -p -$family route show $route \ 29 local ns=$1; shift 34 busywait 5000 __fib_trap_check $ns $family "$route" $should_fail 39 local ns=$1; shift 43 fib_trap_check $ns 4 "$route" $should_fail 48 local ns=$1; shift 52 fib_trap_check $ns 6 "$route" $should_fail 57 local ns=$1; shift 63 ip -n $ns link add name dummy$i type dummy [all …]
|
/tools/testing/selftests/net/ |
D | unicast_extensions.sh | 68 ip -n foo-ns address add $1/$3 dev foo || return 1 69 ip -n foo-ns link set foo up || return 1 70 ip -n bar-ns address add $2/$3 dev bar || return 1 71 ip -n bar-ns link set bar up || return 1 73 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1 74 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1 76 nettest -B -N bar-ns -O foo-ns -r $1 || return 1 77 nettest -B -N foo-ns -O bar-ns -r $2 || return 1 96 ip -n foo-ns address add $1/$5 dev foo || return 1 97 ip -n foo-ns link set foo up || return 1 [all …]
|
D | udpgro_fwd.sh | 21 local ns 25 for ns in $NS_SRC $NS_DST; do 26 ip netns del $ns 2>/dev/null 34 local ns 36 for ns in $NS_SRC $NS_DST; do 37 ip netns add $ns 38 ip -n $ns link set dev lo up 41 ip netns exec $ns sysctl -qw net.ipv6.conf.default.router_solicitations=0 42 ip netns exec $ns sysctl -qw net.ipv6.conf.all.router_solicitations=0 47 for ns in $SRC $DST; do [all …]
|
D | xfrm_policy.sh | 32 local ns=$1 39 …ip -net $ns xfrm policy add src $lnet dst $rnet dir out tmpl src $me dst $remote proto esp mode tu… 41 …ip -net $ns xfrm policy add src $rnet dst $lnet dir fwd tmpl src $remote dst $me proto esp mode tu… 45 local ns=$1 53 …ip -net $ns xfrm state add src $remote dst $me proto esp spi $spi_in enc aes $KEY_AES auth sha1 … 54 …ip -net $ns xfrm state add src $me dst $remote proto esp spi $spi_out enc aes $KEY_AES auth sha1 … 56 do_esp_policy $ns $me $remote $lnet $rnet 73 local ns=$1 76 ip -net $ns xfrm policy add src 10.1.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block 79 ip -net $ns xfrm policy add src 10.2.0.0/24 dst 10.0.0.0/24 dir fwd priority 200 action block [all …]
|
D | traceroute.sh | 36 local ns 41 ns="$1" 49 out=$(eval ip netns exec ${ns} ${cmd} 2>&1) 65 local ns=$1 72 ip netns add ${ns} 74 ip netns exec ${ns} ip link set lo up 76 ip netns exec ${ns} ip addr add dev lo ${addr} 79 ip netns exec ${ns} ip -6 addr add dev lo ${addr6} 82 ip netns exec ${ns} ip ro add unreachable default metric 8192 83 ip netns exec ${ns} ip -6 ro add unreachable default metric 8192 [all …]
|
D | vrf_route_leaking.sh | 174 local ns 176 for ns in h1 h2 r1 r2; do 177 ip netns del $ns 2>/dev/null 183 local ns=$1 185 ip -netns "${ns}" rule del pref 0 186 ip -netns "${ns}" rule add pref 32765 from all lookup local 187 ip -netns "${ns}" -6 rule del pref 0 188 ip -netns "${ns}" -6 rule add pref 32765 from all lookup local 193 local ns=$1 197 ip -netns "${ns}" link add "${vrf}" type vrf table "${table}" [all …]
|
D | icmp_redirect.sh | 117 local ns=$1 121 addr=$(ip -netns $ns -6 -br addr show dev ${dev} | \ 143 local ns 145 for ns in h1 h2 r1 r2; do 146 ip netns del $ns 2>/dev/null 152 local ns=$1 154 ip -netns ${ns} link add ${VRF} type vrf table ${VRF_TABLE} 155 ip -netns ${ns} link set ${VRF} up 156 ip -netns ${ns} route add vrf ${VRF} unreachable default metric 8192 157 ip -netns ${ns} -6 route add vrf ${VRF} unreachable default metric 8192 [all …]
|
D | vrf-xfrm-tests.sh | 88 local ns=$1 92 if [ -n "${ns}" ]; then 93 ns="-netns ${ns}" 96 ip ${ns} link add ${vrf} type vrf table ${table} 97 ip ${ns} link set ${vrf} up 98 ip ${ns} route add vrf ${vrf} unreachable default metric 8192 99 ip ${ns} -6 route add vrf ${vrf} unreachable default metric 8192 101 ip ${ns} addr add 127.0.0.1/8 dev ${vrf} 102 ip ${ns} -6 addr add ::1 dev ${vrf} nodad 104 ip ${ns} ru del pref 0 [all …]
|
D | fib_nexthop_multiprefix.sh | 73 local ns=${1} 75 ip netns del ${ns} 2>/dev/null 77 ip netns add ${ns} 78 ip -netns ${ns} addr add 127.0.0.1/8 dev lo 79 ip -netns ${ns} link set lo up 81 ip netns exec ${ns} sysctl -q -w net.ipv6.conf.all.keep_addr_on_down=1 82 case ${ns} in 84 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=0 87 ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1 88 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1 [all …]
|
D | l2tp.sh | 47 local ns 52 ns="$1" 60 out=$(eval ip netns exec ${ns} ${cmd} 2>&1) 76 local ns=$1 83 ip netns add ${ns} 85 ip -netns ${ns} link set lo up 87 ip -netns ${ns} addr add dev lo ${addr} 90 ip -netns ${ns} -6 addr add dev lo ${addr6} 93 ip -netns ${ns} ro add unreachable default metric 8192 94 ip -netns ${ns} -6 ro add unreachable default metric 8192 [all …]
|
D | veth.sh | 20 local ns 26 for ns in $NS_SRC $NS_DST; do 27 ip netns del $ns 2>/dev/null 34 local ns 36 for ns in $NS_SRC $NS_DST; do 37 ip netns add $ns 38 ip -n $ns link set dev lo up 43 for ns in $SRC $DST; do 44 ip link set dev veth$ns netns $BASE$ns up 45 ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24 [all …]
|
D | udpgro_bench.sh | 10 local -r ns="$(ip netns list|grep $PEER_NS)" 13 [ -n "$ns" ] && ip netns del $ns 2>/dev/null
|
D | gre_gso.sh | 79 local ns=$2 82 [ -n "$ns" ] && ns="-netns $ns" 84 addr=$(ip -6 -br $ns addr show dev ${dev} | \
|
/tools/testing/selftests/drivers/net/mlxsw/ |
D | fib.sh | 96 local ns="testns1" 100 ip -n $ns link add name dummy1 type dummy 101 ip -n $ns link set dev dummy1 up 103 ip -n $ns route add table local 192.0.2.1/32 dev dummy1 104 fib4_trap_check $ns "table local 192.0.2.1/32 dev dummy1" false 107 ip -n $ns route add table main 192.0.2.1/32 dev dummy1 108 fib4_trap_check $ns "table main 192.0.2.1/32 dev dummy1" true 111 fib4_trap_check $ns "table local 192.0.2.1/32 dev dummy1" false 115 ip -n $ns route add table main 192.0.2.2/32 dev dummy1 116 fib4_trap_check $ns "table main 192.0.2.2/32 dev dummy1" false [all …]
|
/tools/testing/selftests/net/mptcp/ |
D | diag.sh | 7 ns="ns1-$rndh" 20 ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGUSR1 &>/dev/null 25 ip netns pids "${ns}" | xargs --no-run-if-empty kill -SIGKILL &>/dev/null 27 ip netns del $ns 51 nr=$(ss -inmHMN $ns | $condition) 81 nr=$(ss -inmHMN $ns | $condition) 143 ip netns add $ns 144 ip -n $ns link set dev lo up 148 ip netns exec $ns \ 151 wait_local_port_listen $ns 10000 [all …]
|
D | mptcp_sockopt.sh | 21 local ns=$1 26 ip netns exec $ns $t -A OUTPUT -p tcp --syn -m mark --mark $m -j ACCEPT 29 ip netns exec $ns $t -A OUTPUT -p tcp --tcp-flags RST RST -m mark --mark 0 -j ACCEPT 31 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark $m -j ACCEPT 32 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark 0 -j DROP 109 local ns=$1 118 counters=$(ip netns exec $ns $tables -v -L OUTPUT | grep DROP) 123 echo "FAIL: got $tables $values in ns $ns , not 0 - not all expected packets marked" 1>&2
|
/tools/testing/selftests/netfilter/ |
D | nft_zones_many.sh | 7 ns="ns-$sfx" 18 ip netns del $ns 21 ip netns add $ns 34 ip -net "$ns" link set lo up 39 ip netns exec $ns sysctl -q net.netfilter.nf_conntrack_udp_timeout=3600 40 ip netns exec $ns nft -f /dev/stdin<<EOF 63 ) | ip netns exec $ns nft -f /dev/stdin 74 …dd if=/dev/zero of=/dev/stdout bs=8k count=10000 2>/dev/null | ip netns exec "$ns" nc -w 1 -q 1 -u… 86 local count=$(ip netns exec "$ns" conntrack -C) 92 ip netns exec $ns conntrack -S 1>&2 [all …]
|
/tools/testing/selftests/timers/ |
D | nsleep-lat.c | 79 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument 81 ts.tv_nsec += ns; in timespec_add() 98 int nanosleep_lat_test(int clockid, long long ns) in nanosleep_lat_test() argument 104 target.tv_sec = ns/NSEC_PER_SEC; in nanosleep_lat_test() 105 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test() 120 if (((timespec_sub(start, end)/count)-ns) > UNRESONABLE_LATENCY) { in nanosleep_lat_test() 121 printf("Large rel latency: %lld ns :", (timespec_sub(start, end)/count)-ns); in nanosleep_lat_test() 128 target = timespec_add(start, ns); in nanosleep_lat_test()
|
D | nanosleep.c | 91 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add() argument 93 ts.tv_nsec += ns; in timespec_add() 101 int nanosleep_test(int clockid, long long ns) in nanosleep_test() argument 108 target = timespec_add(now, ns); in nanosleep_test() 121 rel = timespec_add(rel, ns); in nanosleep_test() 122 target = timespec_add(now, ns); in nanosleep_test()
|
/tools/testing/selftests/nsfs/ |
D | owner.c | 28 int pfd[2], ns, uns, init_uns; in main() local 56 ns = open(path, O_RDONLY); in main() 57 if (ns < 0) in main() 60 uns = ioctl(ns, NS_GET_USERNS); in main() 84 if (ioctl(ns, NS_GET_USERNS) >= 0 || errno != EPERM) in main()
|
D | pidns.c | 47 int ns, pns, i; in main() local 56 ns = open(path, O_RDONLY); in main() 57 if (ns < 0) in main() 60 pns = ioctl(ns, NS_GET_PARENT); in main()
|
/tools/perf/scripts/python/ |
D | compaction-times.py | 48 def ns(sec, nsec): function 51 def time(ns): argument 52 return "%dns" % ns if opt_ns else "%dus" % (round(ns, -3) / 1000) 70 def __init__(self, ns): argument 71 self.ns = ns 77 self.ns += rhs.ns 85 s = "%s " % time(self.ns) 97 self.ns = ns(secs, nsecs) - self.ns 168 self.ns += rhs.ns 173 self.pending = cnode(ns(secs, nsecs))
|
D | futex-contention.py | 29 def syscalls__sys_enter_futex(event, ctxt, cpu, s, ns, tid, comm, callchain, argument 37 thread_blocktime[tid] = nsecs(s, ns) 40 def syscalls__sys_exit_futex(event, ctxt, cpu, s, ns, tid, comm, callchain, argument 43 elapsed = nsecs(s, ns) - thread_blocktime[tid]
|
/tools/testing/selftests/rcutorture/bin/ |
D | config2csv.sh | 52 ns = asorti(s, ss); 54 for (j = 1; j <= ns; j++) 59 for (j = 1; j <= ns; j++) {
|
/tools/testing/selftests/bpf/ |
D | test_offload.py | 143 def tool(name, args, flags, JSON=True, ns="", fail=True, include_stderr=False): argument 148 if ns != "": 149 ns = "ip netns exec %s " % (ns) 152 ret, stdout, stderr = cmd(ns + name + " " + params + args, 155 ret, stdout = cmd(ns + name + " " + params + args, 168 def bpftool(args, JSON=True, ns="", fail=True, include_stderr=False): argument 169 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns, 172 def bpftool_prog_list(expected=None, ns=""): argument 173 _, progs = bpftool("prog show", JSON=True, ns=ns, fail=True) 184 def bpftool_map_list(expected=None, ns=""): argument [all …]
|