selftests: forwarding: Add tc-police tests
authorIdo Schimmel <idosch@mellanox.com>
Wed, 15 Jul 2020 08:27:30 +0000 (11:27 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jul 2020 01:10:00 +0000 (18:10 -0700)
commitafe231d32eb5fa4f4975596958c48c3a77fa1773
treede33c5a90ae55b0a508ce90dccb36e7915228f50
parentaf11e818a7691468381bbb33a3b98fb718605385
selftests: forwarding: Add tc-police tests

Test tc-police action in various scenarios such as Rx policing, Tx
policing, shared policer and police piped to mirred. The test passes
with both veth pairs and loopbacked ports.

# ./tc_police.sh
TEST: police on rx                                                  [ OK ]
TEST: police on tx                                                  [ OK ]
TEST: police with shared policer - rx                               [ OK ]
TEST: police with shared policer - tx                               [ OK ]
TEST: police rx and mirror                                          [ OK ]
TEST: police tx and mirror                                          [ OK ]

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/tc_police.sh [new file with mode: 0755]