Commit 2f19f212 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

selftests: forwarding: Add tc offload check helper

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4fb20ae1
...@@ -296,6 +296,19 @@ forwarding_restore() ...@@ -296,6 +296,19 @@ forwarding_restore()
sysctl -q -w net.ipv4.conf.all.forwarding=$ipv4_fwd sysctl -q -w net.ipv4.conf.all.forwarding=$ipv4_fwd
} }
tc_offload_check()
{
for i in $(eval echo {1..$NUM_NETIFS}); do
ethtool -k ${NETIFS[p$i]} \
| grep "hw-tc-offload: on" &> /dev/null
if [[ $? -ne 0 ]]; then
return 1
fi
done
return 0
}
############################################################################## ##############################################################################
# Tests # Tests
......
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