Skip to contentSkip to conversation

network/busy_poll: TCONF if driver doesn't support busy-poll feature

PATCH New Alexey Kodanev 2 participants 4 messages Oct 6, 2016 – Oct 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 network/busy_poll: TCONF if driver doesn't support busy-poll feature

---
 testcases/network/busy_poll/busy_poll01.sh |    3 +++
 testcases/network/busy_poll/busy_poll02.sh |    3 +++
 testcases/network/busy_poll/busy_poll03.sh |    3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)
testcases/network/busy_poll/busy_poll01.sh +3 -0
index 8faa569..985c11d 100755
@@ -52,6 +52,9 @@ if [ ! -f "/proc/sys/net/core/busy_read" -a \
 	tst_brkm TCONF "busy poll not configured, CONFIG_NET_RX_BUSY_POLL"
 fi
 
+ethtool --show-features $(tst_iface) | grep -q 'busy-poll.*on' || \
+	tst_brkm TCONF "busy poll not supported by driver"
+
 set_busy_poll()
 {
 	local value=${1:-"0"}
testcases/network/busy_poll/busy_poll02.sh +3 -0
index cd69ed2..28f476d 100755
@@ -48,6 +48,9 @@ if [ ! -f "/proc/sys/net/core/busy_read" -a \
 	tst_brkm TCONF "busy poll not configured, CONFIG_NET_RX_BUSY_POLL"
 fi
 
+ethtool --show-features $(tst_iface) | grep -q 'busy-poll.*on' || \
+	tst_brkm TCONF "busy poll not supported by driver"
+
 set_busy_poll()
 {
 	local value=${1:-"0"}
testcases/network/busy_poll/busy_poll03.sh +3 -0
index 7e405ee..cc0e0db 100755
@@ -42,6 +42,9 @@ if [ ! -f "/proc/sys/net/core/busy_read" -a \
 	tst_brkm TCONF "busy poll not configured, CONFIG_NET_RX_BUSY_POLL"
 fi
 
+ethtool --show-features $(tst_iface) | grep -q 'busy-poll.*on' || \
+	tst_brkm TCONF "busy poll not supported by driver"
+
 set_busy_poll()
 {
 	local value=${1:-"0"}
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 network/busy_poll: TCONF if driver doesn't support busy-poll feature

Hi!

testcases/network/busy_poll/busy_poll01.sh if [ ! -f "/proc/sys/net/core/busy_read" -a \ · line 57

Quoted 3 lines
testcases/network/busy_poll/busy_poll01.sh +3 -0
+ethtool --show-features $(tst_iface) | grep -q 'busy-poll.*on' || \
+	tst_brkm TCONF "busy poll not supported by driver"
+

Maybe it would be better to move all the TCONF checks into a common bussy_poll_lib.sh and source it in the scripts.

And also we should check for ethtool command with the tst_check_cmds.

Signature · 2 lines
Cyril Hrubis
[email protected]
#2 lore raw

PATCH 1/1 network/busy_poll: TCONF if driver doesn't support busy-poll feature

Hi,

Quoted 6 lines · Cyril Hrubis

Hi!

testcases/network/busy_poll/busy_poll01.sh if [ ! -f "/proc/sys/net/core/busy_read" -a \ · line 57

Quoted 3 lines
testcases/network/busy_poll/busy_poll01.sh +3 -0
+ethtool --show-features $(tst_iface) | grep -q 'busy-poll.*on' || \
+	tst_brkm TCONF "busy poll not supported by driver"
+

Maybe it would be better to move all the TCONF checks into a common bussy_poll_lib.sh and source it in the scripts.

Good point, I'll do that.

Thanks,
Alexey

#3 lore raw

PATCH 1/1 network/busy_poll: TCONF if driver doesn't support busy-poll feature

In reply to Cyril Hrubis

Hi,

Quoted 8 lines · Cyril Hrubis

Hi!

testcases/network/busy_poll/busy_poll01.sh if [ ! -f "/proc/sys/net/core/busy_read" -a \ · line 57

Quoted 3 lines
testcases/network/busy_poll/busy_poll01.sh +3 -0
+ethtool --show-features $(tst_iface) | grep -q 'busy-poll.*on' || \
+	tst_brkm TCONF "busy poll not supported by driver"
+

Maybe it would be better to move all the TCONF checks into a common bussy_poll_lib.sh and source it in the scripts.

And also we should check for ethtool command with the tst_check_cmds.

Added new shell lib with checks and applied.

Thanks,
Alexey