From 971ec5c1a50053b55bcd50843b380ec9ebd84552 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 30 Mar 2021 20:06:33 +0200 Subject: xdp: T3448: bail out early on platforms not supporting xdp (e.g. RaspberryPi) --- python/vyos/ifconfig/interface.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index a61985da5..ff05cab0e 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -1069,6 +1069,10 @@ class Interface(Control): if not isinstance(state, bool): raise ValueError("Value out of range") + # https://phabricator.vyos.net/T3448 - there is (yet) no RPI support for XDP + if not os.path.exists('/usr/sbin/xdp_loader'): + return + ifname = self.config['ifname'] cmd = f'xdp_loader -d {ifname} -U --auto-mode' if state: -- cgit v1.2.3