ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.oItTujTNiz and /tmp/tmp.hVTxT0D2Ap Tree base: afae0da2f86b ("geneve: use GRO hint option in the RX path") Now at: 6bc3f05e6d3d ("selftests: net: tests for add double tunneling GRO/GSO") ====== Checking before the patch ====== ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/double_udp_encap.sh - 50379923693874982c625fa985479e812ae9045af0ea3ca2b6dffbf78639c11f In double_udp_encap.sh line 6: readonly CLI=$(dirname $(readlink -f $0))/../../../net/ynl/pyynl/cli.py ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^---------------^ SC2046 (warning): Quote this to prevent word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: readonly CLI=$(dirname $(readlink -f "$0"))/../../../net/ynl/pyynl/cli.py In double_udp_encap.sh line 20: is_ipv6() { ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In double_udp_encap.sh line 27: create_gnv_endpoint() { ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In double_udp_encap.sh line 38: if is_ipv6 $bm_rem_addr; then ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if is_ipv6 "$bm_rem_addr"; then In double_udp_encap.sh line 50: ip netns exec $netns $CLI --family rt-link --create --excl \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$netns" "$CLI" --family rt-link --create --excl \ In double_udp_encap.sh line 54: ip -n $netns link set dev $gnv_dev up ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$netns" link set dev "$gnv_dev" up In double_udp_encap.sh line 57: create_vxlan_endpoint() { ^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). In double_udp_encap.sh line 59: local -r bm_dev=$2 ^----^ SC2034 (warning): bm_dev appears unused. Verify use (or export if used externally). In double_udp_encap.sh line 76: ip -n $netns link add $vxlan_dev type vxlan id $vxlan_id \ ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$netns" link add "$vxlan_dev" type vxlan id "$vxlan_id" \ In double_udp_encap.sh line 77: remote $bm_rem_addr $opts ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: remote "$bm_rem_addr" "$opts" In double_udp_encap.sh line 78: ip -n $netns link set dev $vxlan_dev up ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$netns" link set dev "$vxlan_dev" up In double_udp_encap.sh line 85: local addr_src ^------^ SC2034 (warning): addr_src appears unused. Verify use (or export if used externally). In double_udp_encap.sh line 86: local addr_dst ^------^ SC2034 (warning): addr_dst appears unused. Verify use (or export if used externally). In double_udp_encap.sh line 110: ip link add name veth$SRC netns $NS_SRC type veth \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add name veth$SRC netns "$NS_SRC" type veth \ In double_udp_encap.sh line 111: peer name veth$DST netns $NS_DST ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: peer name veth$DST netns "$NS_DST" In double_udp_encap.sh line 124: for ns in ${NS_LIST[@]}; do ^-----------^ SC2068 (error): Double quote array expansions to avoid re-splitting elements. In double_udp_encap.sh line 125: ip -n $ns link set dev veth$id up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" link set dev veth$id up In double_udp_encap.sh line 128: ip netns exec $ns \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$ns" \ In double_udp_encap.sh line 133: ip -n $ns addr add dev veth$id $NET_V4$id/24 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" addr add dev veth$id $NET_V4$id/24 In double_udp_encap.sh line 134: $create_endpoint $ns veth$id $NET_V4$((3 - $id)) \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: $create_endpoint "$ns" veth$id $NET_V4$((3 - $id)) \ In double_udp_encap.sh line 135: $dev$id 4 $options ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $dev$id 4 "$options" In double_udp_encap.sh line 136: ip -n $ns addr add dev $dev$id $OL1_NET_V4$id/24 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" addr add dev $dev$id $OL1_NET_V4$id/24 In double_udp_encap.sh line 141: $create_endpoint $ns $dev$id $OL1_NET_V4$((3 - $id)) \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: $create_endpoint "$ns" $dev$id $OL1_NET_V4$((3 - $id)) \ In double_udp_encap.sh line 142: $dev"_nst"$id 40 '"port":6082' $nested_opt ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $dev"_nst"$id 40 '"port":6082' "$nested_opt" In double_udp_encap.sh line 143: ip -n $ns addr add dev $dev"_nst"$id $OL2_NET_V4$id/24 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" addr add dev $dev"_nst"$id $OL2_NET_V4$id/24 In double_udp_encap.sh line 144: ip -n $ns link set dev $dev"_nst"$id mtu 1392 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" link set dev $dev"_nst"$id mtu 1392 In double_udp_encap.sh line 146: ip -n $ns addr add dev veth$id $NET_V6$id/64 nodad ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" addr add dev veth$id $NET_V6$id/64 nodad In double_udp_encap.sh line 147: $create_endpoint $ns veth$id $NET_V6$((3 - $id)) \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: $create_endpoint "$ns" veth$id $NET_V6$((3 - $id)) \ In double_udp_encap.sh line 148: $dev"6"$id 6 $options ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $dev"6"$id 6 "$options" In double_udp_encap.sh line 149: ip -n $ns addr add dev $dev"6"$id $OL1_NET_V6$id/64 \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" addr add dev $dev"6"$id $OL1_NET_V6$id/64 \ In double_udp_encap.sh line 152: $create_endpoint $ns $dev"6"$id $OL1_NET_V6$((3 - $id))\ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2004 (style): $/${} is unnecessary on arithmetic variables. Did you mean: $create_endpoint "$ns" $dev"6"$id $OL1_NET_V6$((3 - $id))\ In double_udp_encap.sh line 153: $dev"6_nst"$id 60 '"port":6082' $nested_opt ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $dev"6_nst"$id 60 '"port":6082' "$nested_opt" In double_udp_encap.sh line 154: ip -n $ns addr add dev $dev"6_nst"$id $OL2_NET_V6$id/64\ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" addr add dev $dev"6_nst"$id $OL2_NET_V6$id/64\ In double_udp_encap.sh line 156: ip -n $ns link set dev $dev"6_nst"$id mtu 1352 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n "$ns" link set dev $dev"6_nst"$id mtu 1352 In double_udp_encap.sh line 164: ip netns exec $NS_SRC ethtool -K veth$SRC $feature off \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" ethtool -K veth$SRC $feature off \ In double_udp_encap.sh line 173: create_ns $* ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$*" In double_udp_encap.sh line 174: if [ $ENCAP = "geneve" ]; then ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$ENCAP" = "geneve" ]; then In double_udp_encap.sh line 180: ip netns exec $NS_SRC ethtool -K $dev$SRC tx-gso-partial on \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" ethtool -K $dev$SRC tx-gso-partial on \ In double_udp_encap.sh line 184: ip netns exec $NS_SRC ethtool -K $dev"6"$SRC tx-gso-partial on \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" ethtool -K $dev"6"$SRC tx-gso-partial on \ In double_udp_encap.sh line 192: create_ns_gso $* ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns_gso "$*" In double_udp_encap.sh line 193: ip netns exec $NS_DST ethtool -K veth$DST gro on ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_DST" ethtool -K veth$DST gro on In double_udp_encap.sh line 194: ip netns exec $NS_SRC ethtool -K veth$SRC tx off >/dev/null 2>&1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" ethtool -K veth$SRC tx off >/dev/null 2>&1 In double_udp_encap.sh line 214: filter=Ip6InReceives ^----^ SC2034 (warning): filter appears unused. Verify use (or export if used externally). In double_udp_encap.sh line 219: pkts=$((total_size / $GSO_SIZE)) ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In double_udp_encap.sh line 223: elif [ $((total_size % $GSO_SIZE)) -eq 0 ]; then ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In double_udp_encap.sh line 231: if [ $ENCAP = "geneve" ]; then ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$ENCAP" = "geneve" ]; then In double_udp_encap.sh line 238: ip netns exec $NS_SRC $ipt -A OUTPUT -p udp --dport $dport \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" $ipt -A OUTPUT -p udp --dport $dport \ In double_udp_encap.sh line 240: ip netns exec $NS_DST $ipt -A INPUT -p udp --dport $dport \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_DST" $ipt -A INPUT -p udp --dport $dport \ In double_udp_encap.sh line 243: ip netns exec $NS_DST ./udpgso_bench_rx -C 2000 -t -R 100 -n $pkts \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_DST" ./udpgso_bench_rx -C 2000 -t -R 100 -n $pkts \ In double_udp_encap.sh line 244: $rx_args & ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$rx_args" & In double_udp_encap.sh line 247: ip netns exec $NS_SRC ./udpgso_bench_tx -$FAMILY -t -M 1 \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" ./udpgso_bench_tx -$FAMILY -t -M 1 \ In double_udp_encap.sh line 248: -s $total_size -D $dst ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -s "$total_size" -D $dst In double_udp_encap.sh line 255: local snd=$(ip netns exec $NS_SRC $ipt"-save" -c | ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local snd=$(ip netns exec "$NS_SRC" $ipt"-save" -c | In double_udp_encap.sh line 258: check_err $? "send $snd packets on the lowest link, expected $wire_pkts" ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten. In double_udp_encap.sh line 260: local rcvpkts=$(ip netns exec $NS_DST $ipt"-save" -c | \ ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local rcvpkts=$(ip netns exec "$NS_DST" $ipt"-save" -c | \ In double_udp_encap.sh line 277: IPT=ip6tables ^-^ SC2034 (warning): IPT appears unused. Verify use (or export if used externally). In double_udp_encap.sh line 297: ip netns exec $NS_SRC sysctl -qw net.ipv4.ip_no_pmtu_disc=1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$NS_SRC" sysctl -qw net.ipv4.ip_no_pmtu_disc=1 In double_udp_encap.sh line 336: $((GSO_SIZE * 4 + $GSO_SIZE / 2)) 2 ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. In double_udp_encap.sh line 340: exit $EXIT_STATUS ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: exit "$EXIT_STATUS" For more information: https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2034 -- IPT appears unused. Verify use (o... https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...