diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-10-16 15:04:28 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-16 15:04:28 +0300 |
| commit | d8dc670cd3eb7c9d0e41d8211284e1469657cc42 (patch) | |
| tree | c799075502db2f43530a4ac94e285661aa5f0825 /src/migration-scripts/vpp | |
| parent | 4f46ade201e49d78a376d76f3dfd541c41f8636d (diff) | |
| parent | 5e2e4a8f183f9723d4967ce47045f8789b58e924 (diff) | |
| download | vyos-1x-d8dc670cd3eb7c9d0e41d8211284e1469657cc42.tar.gz vyos-1x-d8dc670cd3eb7c9d0e41d8211284e1469657cc42.zip | |
Merge pull request #4781 from natali-rs1985/T7897
T7897: VPP: fix rx-mode interrupt for XDP driver with workers
Diffstat (limited to 'src/migration-scripts/vpp')
| -rw-r--r-- | src/migration-scripts/vpp/1-to-2 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/migration-scripts/vpp/1-to-2 b/src/migration-scripts/vpp/1-to-2 new file mode 100644 index 000000000..822799cc6 --- /dev/null +++ b/src/migration-scripts/vpp/1-to-2 @@ -0,0 +1,34 @@ +# Copyright VyOS maintainers and contributors <maintainers@vyos.io> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this library. If not, see <http://www.gnu.org/licenses/>. + +# Delete 'vpp settings interface ethX xdp-options no-syscall-lock' +# since it is set automatically + +from vyos.configtree import ConfigTree + +base = ['vpp', 'settings', 'interface'] + +def migrate(config: ConfigTree) -> None: + if not config.exists(base): + # Nothing to do + return + + for iface_name in config.list_nodes(base): + xdp_options_base = base + [iface_name, 'xdp-options'] + if config.exists(xdp_options_base + ['no-syscall-lock']): + # Delete no-syscall-lock option from configuration + config.delete(xdp_options_base + ['no-syscall-lock']) + if config.exists(xdp_options_base) and len(config.list_nodes(xdp_options_base)) == 0: + config.delete(xdp_options_base) |
