diff options
author | 2021-04-05 12:59:55 -0700 | |
---|---|---|
committer | 2021-04-05 12:59:55 -0700 | |
commit | 4abb45240570e754dc17106302b714b4d7de3da5 (patch) | |
tree | 561e90df07e1d8edcd6e393840bc307fb39e3225 | |
parent | net/iproute2.sh: in _get_mac_address, don't return multiple addresses (diff) | |
parent | net/ethtool.sh: add "eee" and "tunable" setting operations (diff) | |
download | netifrc-4abb45240570e754dc17106302b714b4d7de3da5.tar.gz netifrc-4abb45240570e754dc17106302b714b4d7de3da5.tar.bz2 netifrc-4abb45240570e754dc17106302b714b4d7de3da5.zip |
Merge remote-tracking branch 'github/pr/36'
Closes: https://github.com/gentoo/netifrc/pull/36
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | doc/net.example.Linux.in | 14 | ||||
-rw-r--r-- | net/ethtool.sh | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in index 427b2da..b2c0f82 100644 --- a/doc/net.example.Linux.in +++ b/doc/net.example.Linux.in @@ -1275,12 +1275,18 @@ #ethtool_pause_eth0="autoneg off #rx on tx on" -# Enasble adaptive RX and TX coalescing +# Enable Energy-Efficient Ethernet +#ethtool_eee_eth0="eee on" + +# Enable adaptive RX and TX coalescing #ethtool_coalesce_eth0="adaptive-rx on adaptive-tx on" # Change ring buffer settings #ethtool_ring_eth0="" +# Set RX copy-break at 1500 bytes +#ethtool_tunable_eth0="rx-copybreak 1500" + # Enable all offload settings #ethtool_offload_eth0="rx on tx on sg on tso on ufo on gso on gro on lro on" @@ -1309,13 +1315,13 @@ # Additionally, there is a special control variable, if you need to change the # order of option processing. The default order is: -# flash change-eeprom change pause coalesce ring offload identify nfc rxfh-indir ntuple +# flash change-eeprom change pause eee coalesce ring offload tunable identify nfc rxfh-indir ntuple # Set global order to default -#ethtool_order="flash change-eeprom change pause coalesce ring offload identify nfc rxfh-indir ntuple" +#ethtool_order="flash change-eeprom change pause eee coalesce ring offload tunable identify nfc rxfh-indir ntuple" # Hypothetical network card that requires a change-eeprom toggle to enable flashing -#ethtool_order_eth0="change-eeprom flash change pause coalesce ring offload nfc rxfh-indir ntuple" +#ethtool_order_eth0="change-eeprom flash change pause eee coalesce ring offload tunable nfc rxfh-indir ntuple" #----------------------------------------------------------------------------- # Firewalld support diff --git a/net/ethtool.sh b/net/ethtool.sh index 57c98f7..0bcceff 100644 --- a/net/ethtool.sh +++ b/net/ethtool.sh @@ -17,7 +17,7 @@ ethtool_pre_start() { local order opt OFS="${OIFS}" eval order=\$ethtool_order_${IFVAR} [ -z "${order}" ] && eval order=\$ethtool_order - [ -z "${order}" ] && order="flash change-eeprom change pause coalesce ring offload identify nfc rxfh-indir ntuple" + [ -z "${order}" ] && order="flash change-eeprom change pause eee coalesce ring offload tunable identify nfc rxfh-indir ntuple" # ethtool options not used: --driver, --register-dump, --eeprom-dump, --negotiate, --test, --statistics eindent for opt in ${order} ; do @@ -36,7 +36,7 @@ ethtool_pre_start() { local args_pretty="$(_trim "${p}")" # Do nothing if empty [ -z "${args_pretty}" ] && continue - [ "${opt}" = "ring" ] && opt="set-ring" + [ "${opt}" = "eee" -o "${opt}" = "ring" -o "${opt}" = "tunable" ] && opt="set-${opt}" args_pretty="--${opt} $IFACE ${args_pretty}" args="--${opt} $IFACE ${args}" ebegin "ethtool ${args_pretty}" |