summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-ethernet.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-ethernet.py b/src/conf_mode/interfaces-ethernet.py
index 1f622c003..b358e9725 100755
--- a/src/conf_mode/interfaces-ethernet.py
+++ b/src/conf_mode/interfaces-ethernet.py
@@ -16,6 +16,7 @@
import os
+from glob import glob
from sys import exit
from vyos.config import Config
@@ -28,6 +29,7 @@ from vyos.configverify import verify_mtu_ipv6
from vyos.configverify import verify_vlan_config
from vyos.configverify import verify_vrf
from vyos.ifconfig import EthernetIf
+from vyos.util import dict_search
from vyos import ConfigError
from vyos import airbag
airbag.enable()
@@ -66,6 +68,12 @@ def verify(ethernet):
verify_address(ethernet)
verify_vrf(ethernet)
+ # XDP requires multiple TX queues
+ if 'xdp' in ethernet:
+ queues = glob('/sys/class/net/{ifname}/queues/tx-*'.format(**ethernet))
+ if len(queues) < 2:
+ raise ConfigError('XDP requires additional TX queues, too few available!')
+
if {'is_bond_member', 'mac'} <= set(ethernet):
print(f'WARNING: changing mac address "{mac}" will be ignored as "{ifname}" '
f'is a member of bond "{is_bond_member}"'.format(**ethernet))