Commit 7f333cbf authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

selftests: forwarding: move shblock tc support check to a separate helper

The shared block support is only needed for tc_shblock.sh. No need to
require that for other test.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2f2a1fd
...@@ -33,7 +33,10 @@ check_tc_version() ...@@ -33,7 +33,10 @@ check_tc_version()
echo "SKIP: iproute2 too old; tc is missing JSON support" echo "SKIP: iproute2 too old; tc is missing JSON support"
exit 1 exit 1
fi fi
}
check_tc_shblock_support()
{
tc filter help 2>&1 | grep block &> /dev/null tc filter help 2>&1 | grep block &> /dev/null
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo "SKIP: iproute2 too old; tc is missing shared block support" echo "SKIP: iproute2 too old; tc is missing shared block support"
......
...@@ -105,6 +105,8 @@ cleanup() ...@@ -105,6 +105,8 @@ cleanup()
ip link set $swp2 address $swp2origmac ip link set $swp2 address $swp2origmac
} }
check_tc_shblock_support
trap cleanup EXIT trap cleanup EXIT
setup_prepare setup_prepare
......
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