diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2021-04-05 12:54:47 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2021-04-05 13:00:28 -0700 |
commit | 4bd8be5f43d07a9e92b73174c7fbef8b989aaa55 (patch) | |
tree | 18c957fd0427b3ec4105dfad10f5cb70cd6aa981 /net | |
parent | Merge remote-tracking branch 'github/pr/36' (diff) | |
download | netifrc-4bd8be5f43d07a9e92b73174c7fbef8b989aaa55.tar.gz netifrc-4bd8be5f43d07a9e92b73174c7fbef8b989aaa55.tar.bz2 netifrc-4bd8be5f43d07a9e92b73174c7fbef8b989aaa55.zip |
net/ethtool: support more ethtool config knobs
Additional options now supported:
--set-channels
--set-dump
--set-fec
--set-phy-tunable
--set-priv-flags
--set-rxfh-indir
--per-queue
--features
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ethtool.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/net/ethtool.sh b/net/ethtool.sh index 0bcceff..ee595a2 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 eee coalesce ring offload tunable identify nfc rxfh-indir ntuple" + [ -z "${order}" ] && order="flash change-eeprom change priv-flags channels dump pause eee fec coalesce per-queue ring offload features phy-tunable 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,18 @@ ethtool_pre_start() { local args_pretty="$(_trim "${p}")" # Do nothing if empty [ -z "${args_pretty}" ] && continue - [ "${opt}" = "eee" -o "${opt}" = "ring" -o "${opt}" = "tunable" ] && opt="set-${opt}" + case "$opt" in + # Cleaner to patch in future for new options + channels) opt="set-${opt}" ;; + dump) opt="set-${opt}" ;; + eee) opt="set-${opt}" ;; + fec) opt="set-${opt}" ;; + phy-tunable) opt="set-${opt}" ;; + priv-flags) opt="set-${opt}" ;; + ring) opt="set-${opt}" ;; + rxfh-indir) opt="set-${opt}" ;; + tunable) opt="set-${opt}" ;; + esac args_pretty="--${opt} $IFACE ${args_pretty}" args="--${opt} $IFACE ${args}" ebegin "ethtool ${args_pretty}" |