diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-06-10 14:59:49 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-10 14:59:49 +0300 |
| commit | aee37546add852fcdd99a9fa48f015e6304939d3 (patch) | |
| tree | 812ddc1548778b6acd86c1fa805917cf9cc45433 /src | |
| parent | e165fdf83de96b74bfc53c1c261b8e8daf64b637 (diff) | |
| parent | 86fcbd673e7d4af79b1001f3d45f5dbd64ae974b (diff) | |
| download | vyos-1x-aee37546add852fcdd99a9fa48f015e6304939d3.tar.gz vyos-1x-aee37546add852fcdd99a9fa48f015e6304939d3.zip | |
Merge pull request #5238 from natali-rs1985/T8930
vpp: T8930: Block vif driver to prevent unhandled traceback on XCP-NG
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}' |
