diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2026-05-29 12:53:21 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2026-06-04 16:15:44 +0300 |
| commit | 86fcbd673e7d4af79b1001f3d45f5dbd64ae974b (patch) | |
| tree | 2332a73f91d5158ae751a68df32117ff4541d7ec /src | |
| parent | 88dfc8cd43521ae489900fb9746c56545140df54 (diff) | |
| download | vyos-1x-86fcbd673e7d4af79b1001f3d45f5dbd64ae974b.tar.gz vyos-1x-86fcbd673e7d4af79b1001f3d45f5dbd64ae974b.zip | |
vpp: T8930: Block vif driver to prevent unhandled traceback on XCP-NG
The `vif` driver is fundamentally incompatible with VPP — no DPDK poll-mode
driver exists for Xen paravirtual interfaces and no PCI address is exposed,
so `allow-unsupported-nics` cannot rescue it either.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/vpp.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py index 342d58fca..c0e30d1f1 100755 --- a/src/conf_mode/vpp.py +++ b/src/conf_mode/vpp.py @@ -97,6 +97,10 @@ override_drivers: dict[str, str] = { # drivers that does not use PCIe addresses not_pci_drv: list[str] = ['hv_netvsc'] +# drivers that are fundamentally incompatible with VPP/DPDK — no PMD exists and +# they expose no PCI address, so allow-unsupported-nics cannot rescue them +incompatible_drv: list[str] = ['vif'] + # drivers that support interrupt RX mode for DPDK and XDP drivers_support_interrupt: dict[str, list] = { 'atlantic': ['dpdk', 'xdp'], @@ -596,6 +600,12 @@ def verify(config): # ensure DPDK/XDP settings are properly configured for iface, iface_config in config['settings']['interface'].items(): + orig_driver = dict_search(f'persist_config.{iface}.original_driver', config) + if orig_driver and orig_driver in incompatible_drv: + raise ConfigError( + f'Interface "{iface}" driver "{orig_driver}" is not supported by VPP/DPDK.' + ) + if not _is_device_allowed(config, iface): raise ConfigError( f'NIC used by "{iface}" is not validated for VPP on VyOS. ' @@ -645,10 +655,9 @@ def verify(config): if rx_mode and rx_mode != 'polling': # By default drivers operate in polling mode. Not all NIC drivers support # RX mode interrupt and adaptive - driver = config.get('persist_config').get(iface).get('original_driver') if ( - driver not in drivers_support_interrupt - or iface_config['driver'] not in drivers_support_interrupt[driver] + orig_driver not in drivers_support_interrupt + or iface_config['driver'] not in drivers_support_interrupt[orig_driver] ): raise ConfigError( f'RX mode {rx_mode} is not supported for interface {iface}' |
