summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-30 21:36:52 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-30 21:38:44 +0200
commitf5e46ee6cc2b6c1c1869e26beca4ccd5bf52b62f (patch)
tree6b624172bccb49988eccf3bfafa9b2dffd2d2414 /python/vyos
parenta515212f4efb08846df04405f31a828edcd63552 (diff)
downloadvyos-1x-f5e46ee6cc2b6c1c1869e26beca4ccd5bf52b62f.tar.gz
vyos-1x-f5e46ee6cc2b6c1c1869e26beca4ccd5bf52b62f.zip
ethernet: T3787: remove deprecated UDP fragmentation offloading option
Deprecated in the Linux Kernel by commit 08a00fea6de277df12ccfadc21 ("net: Remove references to NETIF_F_UFO from ethtool.").
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/ethtool.py3
-rw-r--r--python/vyos/ifconfig/ethernet.py28
2 files changed, 0 insertions, 31 deletions
diff --git a/python/vyos/ethtool.py b/python/vyos/ethtool.py
index a81ddac31..397be6bb2 100644
--- a/python/vyos/ethtool.py
+++ b/python/vyos/ethtool.py
@@ -122,9 +122,6 @@ class Ethtool:
def get_tcp_segmentation_offload(self):
return self._get_generic('tcp-segmentation-offload')
- def get_udp_fragmentation_offload(self):
- return self._get_generic('udp-fragmentation-offload')
-
def get_rx_buffer(self):
# Configuration of RX ring-buffers is not supported on every device,
# thus when it's impossible return None
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py
index cb03a006c..a6c7f5f25 100644
--- a/python/vyos/ifconfig/ethernet.py
+++ b/python/vyos/ifconfig/ethernet.py
@@ -72,11 +72,6 @@ class EthernetIf(Interface):
'possible': lambda i, v: EthernetIf.feature(i, 'tso', v),
# 'shellcmd': 'ethtool -K {ifname} tso {value}',
},
- 'ufo': {
- 'validate': lambda v: assert_list(v, ['on', 'off']),
- 'possible': lambda i, v: EthernetIf.feature(i, 'ufo', v),
- # 'shellcmd': 'ethtool -K {ifname} ufo {value}',
- },
}}
_sysfs_set = {**Interface._sysfs_set, **{
@@ -339,26 +334,6 @@ class EthernetIf(Interface):
print('Adapter does not support changing tcp-segmentation-offload settings!')
return False
- def set_ufo(self, state):
- """
- Enable UDP fragmentation offloading. State can be either True or False.
-
- Example:
- >>> from vyos.ifconfig import EthernetIf
- >>> i = EthernetIf('eth0')
- >>> i.set_udp_offload(True)
- """
- if not isinstance(state, bool):
- raise ValueError('Value out of range')
-
- enabled, fixed = self.ethtool.get_udp_fragmentation_offload()
- if enabled != state:
- if not fixed:
- return self.set_interface('gro', 'on' if state else 'off')
- else:
- print('Adapter does not support changing udp-fragmentation-offload settings!')
- return False
-
def set_ring_buffer(self, b_type, b_size):
"""
Example:
@@ -404,9 +379,6 @@ class EthernetIf(Interface):
# TSO (TCP segmentation offloading)
self.set_tso(dict_search('offload.tso', config) != None)
- # UDP fragmentation offloading
- self.set_ufo(dict_search('offload.ufo', config) != None)
-
# Set physical interface speed and duplex
if {'speed', 'duplex'} <= set(config):
speed = config.get('speed')