Commit 9b5d5f27 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller
Browse files

selftests: lib: tc_rule_stats_get(): Move default to argument definition



The argument $dir has a fallback value of "ingress". Move the fallback from
the usage site to the argument definition block to make the fact clearer.

Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28e67746
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -199,10 +199,10 @@ tc_rule_stats_get()
{
	local dev=$1; shift
	local pref=$1; shift
	local dir=$1; shift
	local dir=${1:-ingress}; shift
	local selector=${1:-.packets}; shift

	tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \
	tc -j -s filter show dev $dev $dir pref $pref \
	    | jq ".[1].options.actions[].stats$selector"
}