From 5a20c17fceffcbb977f713579a22fdb22f16cc74 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 23 Dec 2020 14:19:40 +0100 Subject: xdp: T2666: move CLI node to "interfaces ethernet xdp" --- python/vyos/ifconfig/ethernet.py | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'python/vyos/ifconfig/ethernet.py') 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') -- cgit v1.2.3