selftests: forwarding: Move DSCP capture to lib.sh
authorPetr Machata <petrm@mellanox.com>
Tue, 31 Jul 2018 22:39:25 +0000 (00:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Aug 2018 16:52:30 +0000 (09:52 -0700)
commitcf60869814bcdfbeec02e92ce9e6b38562707edd
treebe348ac4e8c955bc175fcb77dc08a3a3b6ddeeed
parent989133bf7ff3fe6ebcb9c1e7b5e13bebac175d35
selftests: forwarding: Move DSCP capture to lib.sh

dscp_capture_install() and dscp_capture_uninstall() are going to be
useful for a test added by a following patch, move them therefore to
lib.sh together with related helpers.

While doing so, change the rule preference from mere DSCP value to
DSCP+100 in order to support adding captures of packets with DSCP of 0.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/qos_dscp_bridge.sh
tools/testing/selftests/net/forwarding/lib.sh