Commit a66d62d8 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

selftests: forwarding: tc_rule_stats_get: Parameterize direction

The GRE multipath tests need stats on an egress counter. Change
tc_rule_stats_get() to take direction as an optional argument, with
default of ingress.

Take the opportunity to change line continuation character from | to \.
Move the | to the next line, which indent.
Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1b86fa3b
......@@ -383,9 +383,10 @@ tc_rule_stats_get()
{
local dev=$1; shift
local pref=$1; shift
local dir=$1; shift
tc -j -s filter show dev $dev ingress pref $pref |
jq '.[1].options.actions[].stats.packets'
tc -j -s filter show dev $dev ${dir:-ingress} pref $pref \
| jq '.[1].options.actions[].stats.packets'
}
mac_get()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment