projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fb20ae
)
selftests: forwarding: Add tc offload check helper
author
Jiri Pirko
<
[email protected]
>
Wed, 28 Feb 2018 10:25:13 +0000
(12:25 +0200)
committer
David S. Miller
<
[email protected]
>
Wed, 28 Feb 2018 17:25:48 +0000
(12:25 -0500)
Signed-off-by: Jiri Pirko <
[email protected]
>
Signed-off-by: Ido Schimmel <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
tools/testing/selftests/net/forwarding/lib.sh
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/net/forwarding/lib.sh
b/tools/testing/selftests/net/forwarding/lib.sh
index 6866f4a4bc4e2ef9001973227f5b656b7e62a3dd..92e46426bd1d118c207d8f899e61fa0147281454 100644
(file)
--- a/
tools/testing/selftests/net/forwarding/lib.sh
+++ b/
tools/testing/selftests/net/forwarding/lib.sh
@@
-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