summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-31 12:22:36 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-31 12:22:36 +0200
commita086dc2c429aea9614ac7a9c735c6475c2d6da59 (patch)
treeb930ebcc7c2bb2676f0bb8522302b0538ffd446b /python/vyos/ifconfig
parent00efce716912680354d47a2dca9769cd8c5c89ae (diff)
downloadvyos-1x-a086dc2c429aea9614ac7a9c735c6475c2d6da59.tar.gz
vyos-1x-a086dc2c429aea9614ac7a9c735c6475c2d6da59.zip
vyos.ethtool: T3163: use long option names when calling the ethtool binray
This makes understanding the code easier what is "really" called without opening the man page.
Diffstat (limited to 'python/vyos/ifconfig')
-rw-r--r--python/vyos/ifconfig/ethernet.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py
index 7d29da8fc..76ed3fd92 100644
--- a/python/vyos/ifconfig/ethernet.py
+++ b/python/vyos/ifconfig/ethernet.py
@@ -42,34 +42,29 @@ class EthernetIf(Interface):
@staticmethod
def feature(ifname, option, value):
- run(f'ethtool -K {ifname} {option} {value}')
+ run(f'ethtool --features {ifname} {option} {value}')
return False
_command_set = {**Interface._command_set, **{
'gro': {
'validate': lambda v: assert_list(v, ['on', 'off']),
'possible': lambda i, v: EthernetIf.feature(i, 'gro', v),
- # 'shellcmd': 'ethtool -K {ifname} gro {value}',
},
'gso': {
'validate': lambda v: assert_list(v, ['on', 'off']),
'possible': lambda i, v: EthernetIf.feature(i, 'gso', v),
- # 'shellcmd': 'ethtool -K {ifname} gso {value}',
},
'lro': {
'validate': lambda v: assert_list(v, ['on', 'off']),
'possible': lambda i, v: EthernetIf.feature(i, 'lro', v),
- # 'shellcmd': 'ethtool -K {ifname} lro {value}',
},
'sg': {
'validate': lambda v: assert_list(v, ['on', 'off']),
'possible': lambda i, v: EthernetIf.feature(i, 'sg', v),
- # 'shellcmd': 'ethtool -K {ifname} sg {value}',
},
'tso': {
'validate': lambda v: assert_list(v, ['on', 'off']),
'possible': lambda i, v: EthernetIf.feature(i, 'tso', v),
- # 'shellcmd': 'ethtool -K {ifname} tso {value}',
},
}}