summaryrefslogtreecommitdiff
path: root/python/vyos/ethtool.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-03-24 09:28:06 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-03-24 08:33:25 +0000
commit4d032c7d5829846f990c919400e024b34a765d6f (patch)
tree559dba798df0f107405d93b7e4ef2c2f0712889a /python/vyos/ethtool.py
parentb24adfb60a4207da471cf8efe19f56fc3c0a9b45 (diff)
downloadvyos-1x-4d032c7d5829846f990c919400e024b34a765d6f.tar.gz
vyos-1x-4d032c7d5829846f990c919400e024b34a765d6f.zip
Revert "ethernet: T5566: disable energy efficient ethernet (EEE) for interfaces"
This reverts commit ab30509b25d54dac99294b76ba03fd49c3d2c946. As in T6152 there seem to be some NICs that have a non working implementation of reading the EEE registers. Remove this feature in the meantime until there is a less exploding solution hindering boards to boot. Return to Kernel defaults by removing this code path. (cherry picked from commit 946f93778f15f4af9f31cd5b164efcd931693635)
Diffstat (limited to 'python/vyos/ethtool.py')
-rw-r--r--python/vyos/ethtool.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index 473c98d0c..5e241fc08 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -24,7 +24,6 @@ from vyos.utils.process import popen
_drivers_without_speed_duplex_flow = ['vmxnet3', 'virtio_net', 'xen_netfront',
'iavf', 'ice', 'i40e', 'hv_netvsc', 'veth', 'ixgbevf',
'tun']
-_drivers_without_eee = ['vmxnet3', 'virtio_net', 'xen_netfront', 'hv_netvsc']
class Ethtool:
"""
@@ -63,8 +62,6 @@ class Ethtool:
_auto_negotiation = False
_auto_negotiation_supported = None
_flow_control = None
- _eee = False
- _eee_enabled = None
def __init__(self, ifname):
# Get driver used for interface
@@ -118,15 +115,6 @@ class Ethtool:
if not bool(err):
self._flow_control = loads(out)
- # Get current Energy Efficient Ethernet (EEE) settings, but this is
- # not supported by all NICs (e.g. vmxnet3 does not support is)
- out, _ = popen(f'ethtool --show-eee {ifname}')
- if len(out.splitlines()) > 1:
- self._eee = True
- # read current EEE setting, this returns:
- # EEE status: disabled || EEE status: enabled - inactive || EEE status: enabled - active
- self._eee_enabled = bool('enabled' in out.splitlines()[1])
-
def check_auto_negotiation_supported(self):
""" Check if the NIC supports changing auto-negotiation """
return self._auto_negotiation_supported
@@ -211,15 +199,3 @@ class Ethtool:
'flow-control settings!')
return 'on' if bool(self._flow_control[0]['autonegotiate']) else 'off'
-
- def check_eee(self):
- """ Check if the NIC supports eee """
- if self.get_driver_name() in _drivers_without_eee:
- return False
- return self._eee
-
- def get_eee(self):
- if self._eee_enabled == None:
- raise ValueError('Interface does not support changing '\
- 'EEE settings!')
- return self._eee_enabled