selftests: mlxsw: tc_flower_scale: Add a traffic test
authorPetr Machata <petrm@nvidia.com>
Thu, 16 Jun 2022 10:42:43 +0000 (13:42 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Jun 2022 09:31:33 +0000 (10:31 +0100)
commitdd5d20e17c960dc5c8b8c585dfae79cf39660867
treef571afc1311453d0e8ba8cd68b307819139aeec4
parent35d5829e86c29892136ca96bd4d809d4429f1510
selftests: mlxsw: tc_flower_scale: Add a traffic test

Add a test that checks that the created filters do actually trigger on
matching traffic.

Exercising all the rules would be a very lengthy process. Instead, take a
log2 subset of rules. The logic behind picking log2 rules is that then
every bit of the instantiated item's number is exercised. This should catch
issues whether they happen at the high end, low end, or somewhere in
between.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh