From 45077f87eee6772839b9f0fabdf79a385d0b46f1 Mon Sep 17 00:00:00 2001 From: Oleksandr Kuchmystyi Date: Wed, 18 Feb 2026 12:35:28 +0300 Subject: vpp: T8274: Remove dpdk-options section for num-* parameters Remove `dpdk-options` under `set vpp settings interface ` and move its child options to the interface level: - `num-rx-desc` - `num-rx-queues` - `num-tx-desc` - `num-tx-queues` Also remove `set vpp settings interface dpdk-options promisc`. --- src/migration-scripts/vpp/7-to-8 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/migration-scripts/vpp') diff --git a/src/migration-scripts/vpp/7-to-8 b/src/migration-scripts/vpp/7-to-8 index 122456e1f..54a1a7c43 100644 --- a/src/migration-scripts/vpp/7-to-8 +++ b/src/migration-scripts/vpp/7-to-8 @@ -26,6 +26,11 @@ # Convert `vpp settings interface rx-mode` and `vpp kernel-interfaces rx-mode` # to `vpp settings interfaces-rx-mode` by choose the worst value from all nodes (T8266) # +# Get rid of 'dpdk-options' section for 'num-*' parameters: +# - `vpp settings interface dpdk-options num-*` +# - `vpp settings interface num-*` +# and delete `vpp settings interface dpdk-options promisc` (T8274) +# from vyos.configtree import ConfigTree @@ -155,6 +160,34 @@ def _migrate_vpp_interface_rx_mode(config: ConfigTree) -> None: _delete_rx_modes(kernel_interface_path) +def _migrate_vpp_dpdk_options(config: ConfigTree) -> None: + base_path = ['vpp', 'settings', 'interface'] + params = ['num-rx-desc', 'num-rx-queues', 'num-tx-desc', 'num-tx-queues'] + + if not config.exists(base_path): + return + + for iface_name in config.list_nodes(base_path): + iface_path = base_path + [iface_name] + dpdk_path = iface_path + ['dpdk-options'] + + if config.exists(dpdk_path): + for param in params: + param_path = dpdk_path + [param] + new_param_path = iface_path + [param] + + if config.exists(param_path): + # Move `vpp settings interface dpdk-options num-*` + # to `vpp settings interface num-*` + config.copy(param_path, new_param_path) + config.delete(param_path) + + # Delete `vpp settings interface dpdk-options promisc` + promisc_path = dpdk_path + ['promisc'] + if config.exists(promisc_path): + config.delete(promisc_path) + + def migrate(config: ConfigTree) -> None: if not config.exists(['vpp']): # Nothing to do @@ -166,3 +199,4 @@ def migrate(config: ConfigTree) -> None: _migrate_vpp_ipsec(config) _migrate_vpp_cpu(config) _migrate_vpp_interface_rx_mode(config) + _migrate_vpp_dpdk_options(config) -- cgit v1.2.3