Lines Matching +full:addr +full:- +full:mode

2 # SPDX-License-Identifier: GPL-2.0
8 # all tests in this script. Can be overridden with -t option
23 if [ ${rc} -eq ${expected} ]; then
24 printf " TEST: %-60s [ OK ]\n" "${msg}"
29 printf " TEST: %-60s [FAIL]\n" "${msg}"
48 set -e
50 IP="ip -netns $ns1"
65 rm -rf $TMPFILE
66 [ -n "$PID" ] && kill $PID
76 local addr
78 [ -n "$ns" ] && ns="-netns $ns"
80 addr=$(ip -6 -br $ns addr show dev ${dev} | \
88 addr=${addr/\/*}
90 [ -z "$addr" ] && return 1
92 echo $addr
101 local mode
103 [[ $a1 =~ ^[0-9.]*$ ]] && mode=gre || mode=ip6gre
105 ip tunnel add gre1 mode $mode local $a1 remote $a2 dev veth0
107 $IP tunnel add gre1 mode $mode local $a2 remote $a1 dev veth0
114 local addr=$2
117 [ "$proto" == 6 ] && addr="[$addr]"
119 $NS_EXEC socat - tcp${proto}-listen:$port,reuseaddr,fork >/dev/null &
121 while ! $NS_EXEC ss -ltn | grep -q $port; do ((i++)); sleep 0.01; done
123 cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port
124 log_test $? 0 "$name - copy file w/ TSO"
126 ethtool -K veth0 tso off
128 cat $TMPFILE | timeout 1 socat -u STDIN TCP:$addr:$port
129 log_test $? 0 "$name - copy file w/ GSO"
131 ethtool -K veth0 tso on
148 ip addr add 172.16.2.1/24 dev gre1
149 $IP addr add 172.16.2.2/24 dev gre1
151 ip -6 addr add 2001:db8:1::1/64 dev gre1 nodad
152 $IP -6 addr add 2001:db8:1::2/64 dev gre1 nodad
175 -t <test> Test(s) to run (default: all)
177 -p Pause on fail
178 -P Pause after each test before cleanup
179 -v verbose mode (show commands and output)
203 if [ "$(id -u)" -ne 0 ];then
208 if [ ! -x "$(command -v ip)" ]; then
213 if [ ! -x "$(command -v socat)" ]; then