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 | |
| 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')
| -rwxr-xr-x | src/conf_mode/vpp.py | 6 | ||||
| -rw-r--r-- | src/migration-scripts/vpp/1-to-2 | 34 |
2 files changed, 38 insertions, 2 deletions
diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py index 204d8c6b7..7124c738a 100755 --- a/src/conf_mode/vpp.py +++ b/src/conf_mode/vpp.py @@ -107,7 +107,6 @@ drivers_support_interrupt: dict[str, list] = { 'igb': ['xdp'], 'igc': ['dpdk', 'xdp'], 'ixgbe': ['dpdk', 'xdp'], - 'ixgbevf': ['dpdk'], 'qede': ['dpdk', 'xdp'], 'vmxnet3': ['xdp'], 'virtio_net': ['xdp'], @@ -338,7 +337,10 @@ def get_config(config=None): ) if 'zero-copy' in iface_config['xdp_options']: xdp_api_params['mode'] = 'zero-copy' - if 'zero-copy' in iface_config['xdp_options']: + if iface_config.get('rx_mode') in ('interrupt', 'adaptive') and any( + key in config['settings'].get('cpu', {}) + for key in ('workers', 'corelist_workers') + ): xdp_api_params['flags'] = 'no_syscall_lock' iface_config['xdp_api_params'] = xdp_api_params 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) |
