2 # SPDX-License-Identifier: GPL-2.0
4 readonly server_ns
=$
(mktemp
-u server-XXXXXXXX
)
5 readonly client_ns
=$
(mktemp
-u client-XXXXXXXX
)
13 [[ -e /var
/run
/netns
/"${ns_name}" ]] || ip netns add
"${ns_name}"
14 echo 1000000 > "/sys/class/net/${ns_dev}/gro_flush_timeout"
15 ip link
set dev
"${ns_dev}" netns
"${ns_name}" mtu
65535
16 ip
-netns "${ns_name}" link
set dev
"${ns_dev}" up
18 ip netns
exec "${ns_name}" ethtool
-K "${ns_dev}" gro on tso off
22 # Set up server_ns namespace and client_ns namespace
23 ip link add name server
type veth peer name client
25 setup_veth_ns
"${dev}" ${server_ns} server "${SERVER_MAC}"
26 setup_veth_ns
"${dev}" ${client_ns} client "${CLIENT_MAC}"
32 for ns_name
in ${client_ns} ${server_ns}; do
33 [[ -e /var
/run
/netns
/"${ns_name}" ]] && ip netns del
"${ns_name}"
38 # no global init setup step needed