mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 14:16:39 +07:00
selftests: forwarding: Add tc offload check helper
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4fb20ae137
commit
2f19f2125d
@ -296,6 +296,19 @@ forwarding_restore()
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user