Lines Matching +full:no +full:- +full:loopback +full:- +full:test
2 # SPDX-License-Identifier: GPL-2.0
8 readonly server_ns=$(mktemp -u server-XXXXXXXX)
9 readonly client_ns=$(mktemp -u client-XXXXXXXX)
12 local -r dev="$1"
16 if [[ "${carrier}" -ne 1 ]] ; then
27 # Assumes that there is no existing ipvlan device on the physical device
31 # Fail hard if cannot turn on loopback mode for current NIC
32 ethtool -K "${dev}" loopback on || exit 1
37 if [[ "${carrier}" -ne 1 ]] ; then
44 local -r link_dev="$1"
45 local -r ns_name="$2"
46 local -r ns_dev="$3"
47 local -r ns_mac="$4"
48 local -r addr="$5"
53 if [[ "${exit_code}" -ne 0 ]]; then
58 [[ -e /var/run/netns/"${ns_name}" ]] || ip netns add "${ns_name}"
60 ip -netns "${ns_name}" link set dev "${ns_dev}" up
61 if [[ -n "${addr}" ]]; then
62 ip -netns "${ns_name}" addr add dev "${ns_dev}" "${addr}"
72 ip -netns "${ns_name}" link del dev "${ns_dev}"
79 local -r dev="$1"
81 ethtool -K "${dev}" loopback off
86 if [[ "${carrier}" -ne 1 ]] ; then
95 # Reduce test flakiness caused by unexpected interrupts