diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-23 14:19:40 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-23 14:20:21 +0100 |
commit | 5a20c17fceffcbb977f713579a22fdb22f16cc74 (patch) | |
tree | 60d1ed5932962175ca22478fde027305339a458c /python/vyos/ifconfig/ethernet.py | |
parent | 24cce893acf0a5f62230c7f12f07e569b9233db0 (diff) | |
download | vyos-1x-5a20c17fceffcbb977f713579a22fdb22f16cc74.tar.gz vyos-1x-5a20c17fceffcbb977f713579a22fdb22f16cc74.zip |
xdp: T2666: move CLI node to "interfaces ethernet <eth> xdp"
Diffstat (limited to 'python/vyos/ifconfig/ethernet.py')
-rw-r--r-- | python/vyos/ifconfig/ethernet.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py index 5c8c42461..1bec45879 100644 --- a/python/vyos/ifconfig/ethernet.py +++ b/python/vyos/ifconfig/ethernet.py @@ -270,30 +270,6 @@ class EthernetIf(Interface): raise ValueError("Value out of range") return self.set_interface('ufo', 'on' if state else 'off') - def set_xdp(self, state): - """ - Enable Kernel XDP support. State can be either True or False. - - Example: - >>> from vyos.ifconfig import EthernetIf - >>> i = EthernetIf('eth0') - >>> i.set_xdp(True) - """ - if not isinstance(state, bool): - raise ValueError("Value out of range") - - ifname = self.config['ifname'] - cmd = f'xdp_loader -d {ifname} -U --auto-mode' - if state: - # Using 'xdp' will automatically decide if the driver supports - # 'xdpdrv' or only 'xdpgeneric'. A user later sees which driver is - # actually in use by calling 'ip a' or 'show interfaces ethernet' - cmd = f'xdp_loader -d {ifname} --auto-mode -F --progsec xdp_router ' \ - f'--filename /usr/share/vyos/xdp/xdp_prog_kern.o && ' \ - f'xdp_prog_user -d {ifname}' - - return self._cmd(cmd) - def set_ring_buffer(self, b_type, b_size): """ Example: @@ -340,9 +316,6 @@ class EthernetIf(Interface): # UDP fragmentation offloading self.set_ufo(dict_search('offload.ufo', config) != None) - # eXpress Data Path - highly experimental - self.set_xdp(dict_search('offload.xdp', config) != None) - # Set physical interface speed and duplex if {'speed', 'duplex'} <= set(config): speed = config.get('speed') |