diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-23 14:24:55 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-23 14:24:55 +0100 |
commit | 440ce3011e8718c917933026e68047fcfb008031 (patch) | |
tree | 67d71ba2555c9e4b9d1895ebb04406d5af92e7a9 /python/vyos/ifconfig/ethernet.py | |
parent | 131b6ac0dfa0700820b2fe56adea2cad189b10ad (diff) | |
parent | 6f5eeaa22c32ab6e2c629a613fc5107d7b357b9d (diff) | |
download | vyos-1x-440ce3011e8718c917933026e68047fcfb008031.tar.gz vyos-1x-440ce3011e8718c917933026e68047fcfb008031.zip |
Merge branch 'xdp' of github.com:c-po/vyos-1x into current
* 'xdp' of github.com:c-po/vyos-1x:
bond: T2666: enable XDP support
xml: include: accel: convert dos/unix line endings
xdp: T2666: move CLI node to "interfaces ethernet <eth> xdp"
xdp: T2666: require at least 2 TX queues
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') |