1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2016-2018 Oracle and/or its affiliates. All Rights Reserved. 4 5TST_SETUP="setup" 6TST_TESTFUNC="test" 7TST_CLEANUP="cleanup" 8TST_NEEDS_TMPDIR=1 9TST_NEEDS_ROOT=1 10TST_NEEDS_CMDS="pkill sysctl ethtool" 11# for more stable results set to a single thread 12TST_NETLOAD_CLN_NUMBER=1 13 14busy_poll_check_config() 15{ 16 if [ ! -f "/proc/sys/net/core/busy_read" -a \ 17 ! -f "/proc/sys/net/core/busy_poll" ]; then 18 tst_brk TCONF "busy poll not configured, CONFIG_NET_RX_BUSY_POLL" 19 fi 20 21 if tst_kvcmp -lt "4.5"; then 22 ethtool --show-features $(tst_iface) | \ 23 grep -q 'busy-poll.*on' || \ 24 tst_brk TCONF "busy poll not supported by driver" 25 fi 26} 27 28. tst_net.sh 29