Commit c3572a0b authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

selftests: mlxsw: Test matchall failure with protocol match

The driver can only offload matchall rules that do not match on a
protocol. Test that matchall rules that match on a protocol are vetoed.
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2430304
......@@ -11,6 +11,7 @@ ALL_TESTS="
matchall_mirror_behind_flower_ingress_test
matchall_sample_behind_flower_ingress_test
matchall_mirror_behind_flower_egress_test
matchall_proto_match_test
police_limits_test
multi_police_test
"
......@@ -291,6 +292,22 @@ matchall_mirror_behind_flower_egress_test()
matchall_behind_flower_egress_test "mirror" "mirred egress mirror dev $swp2"
}
matchall_proto_match_test()
{
RET=0
tc qdisc add dev $swp1 clsact
tc filter add dev $swp1 ingress pref 1 proto ip handle 101 \
matchall skip_sw \
action sample group 1 rate 100
check_fail $? "Incorrect success to add matchall rule with protocol match"
tc qdisc del dev $swp1 clsact
log_test "matchall protocol match"
}
police_limits_test()
{
RET=0
......
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