summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-01-15 16:02:57 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2025-01-27 09:43:36 +0000
commit1659d7b60ee1128c365c597ee85697c051c23e4b (patch)
tree35e9d47e24019d3f95de48adf92dca63b369ed26
parenta89a9c758aa1b789fa6217d0c43e0f09598d4d84 (diff)
downloadvyos-1x-1659d7b60ee1128c365c597ee85697c051c23e4b.tar.gz
vyos-1x-1659d7b60ee1128c365c597ee85697c051c23e4b.zip
LCP: enable by default route-no-paths
-rw-r--r--data/templates/vpp/startup.conf.j22
-rw-r--r--interface-definitions/vpp.xml.in6
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py13
-rwxr-xr-xsrc/conf_mode/vpp.py6
4 files changed, 17 insertions, 10 deletions
diff --git a/data/templates/vpp/startup.conf.j2 b/data/templates/vpp/startup.conf.j2
index c1dac7757..5cab34a97 100644
--- a/data/templates/vpp/startup.conf.j2
+++ b/data/templates/vpp/startup.conf.j2
@@ -110,7 +110,7 @@ plugins {
linux-cp {
lcp-sync
lcp-auto-subint
-{% if lcp.route_no_paths is vyos_defined %}
+{% if lcp.ignore_kernel_routes is not vyos_defined %}
route-no-paths
{% endif %}
}
diff --git a/interface-definitions/vpp.xml.in b/interface-definitions/vpp.xml.in
index 0718ba0fe..349ec12f4 100644
--- a/interface-definitions/vpp.xml.in
+++ b/interface-definitions/vpp.xml.in
@@ -643,9 +643,9 @@
</leafNode>
</children>
</node>
- <leafNode name="route-no-paths">
+ <leafNode name="ignore-kernel-routes">
<properties>
- <help>Route no paths</help>
+ <help>Ignore kernel routes</help>
<valueless/>
</properties>
</leafNode>
@@ -653,7 +653,7 @@
</node>
<node name="logging">
<properties>
- <help>Loggint settings</help>
+ <help>Logging settings</help>
</properties>
<children>
<leafNode name="default-log-level">
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index be2164c19..a58604a96 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2023-2024 VyOS Inc.
+# Copyright (C) 2023-2025 VyOS Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -75,7 +75,6 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
poll_sleep = '0'
self.cli_set(base_path + ['settings', 'cpu', 'main-core', main_core])
- self.cli_set(base_path + ['settings', 'lcp', 'route-no-paths'])
self.cli_set(base_path + ['settings', 'unix', 'poll-sleep-usec', poll_sleep])
# commit changes
@@ -99,7 +98,15 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
# route-no-paths is not present in the output
# looks like vpp bug
_, out = rc_cmd('sudo vppctl show lcp')
- required_str = 'route-no-paths'
+ required_str = 'lcp route-no-paths on'
+ self.assertIn(required_str, out)
+
+ self.cli_set(base_path + ['settings', 'lcp', 'ignore-kernel-routes'])
+ self.cli_commit()
+
+ # check disabled 'route no path'
+ _, out = rc_cmd('sudo vppctl show lcp')
+ required_str = 'lcp route-no-paths off'
self.assertIn(required_str, out)
def test_02_vpp_vxlan(self):
diff --git a/src/conf_mode/vpp.py b/src/conf_mode/vpp.py
index 32dd0d01a..79486e099 100755
--- a/src/conf_mode/vpp.py
+++ b/src/conf_mode/vpp.py
@@ -471,10 +471,10 @@ def apply(config):
# immediately after the service restart
vpp_control = VPPControl(attempts=20, interval=500)
# preconfigure LCP plugin
- if 'route_no_paths' in config.get('settings', {}).get('lcp', {}):
- vpp_control.cli_cmd('lcp param route-no-paths on')
- else:
+ if 'ignore_kernel_routes' in config.get('settings', {}).get('lcp', {}):
vpp_control.cli_cmd('lcp param route-no-paths off')
+ else:
+ vpp_control.cli_cmd('lcp param route-no-paths on')
# add interfaces
iproute = IPRoute()
for iface, iface_config in config['settings']['interface'].items():