selftests: pass pref and handle to devlink_trap_drop_* helpers
Currently the helpers assume pref 1 and handle 101. Make that explicit and pass the values from callers. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0facf109f6
commit
c902a52c40
@@ -373,6 +373,7 @@ devlink_trap_drop_test()
|
||||
local trap_name=$1; shift
|
||||
local group_name=$1; shift
|
||||
local dev=$1; shift
|
||||
local handle=$1; shift
|
||||
|
||||
# This is the common part of all the tests. It checks that stats are
|
||||
# initially idle, then non-idle after changing the trap action and
|
||||
@@ -397,7 +398,7 @@ devlink_trap_drop_test()
|
||||
devlink_trap_group_stats_idle_test $group_name
|
||||
check_err $? "Trap group stats not idle after setting action to drop"
|
||||
|
||||
tc_check_packets "dev $dev egress" 101 0
|
||||
tc_check_packets "dev $dev egress" $handle 0
|
||||
check_err $? "Packets were not dropped"
|
||||
}
|
||||
|
||||
@@ -406,7 +407,9 @@ devlink_trap_drop_cleanup()
|
||||
local mz_pid=$1; shift
|
||||
local dev=$1; shift
|
||||
local proto=$1; shift
|
||||
local pref=$1; shift
|
||||
local handle=$1; shift
|
||||
|
||||
kill $mz_pid && wait $mz_pid &> /dev/null
|
||||
tc filter del dev $dev egress protocol $proto pref 1 handle 101 flower
|
||||
tc filter del dev $dev egress protocol $proto pref $pref handle $handle flower
|
||||
}
|
||||
|
Reference in New Issue
Block a user