summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2025-12-26 16:12:46 +0200
committerNataliia Solomko <natalirs1985@gmail.com>2026-01-05 17:38:11 +0200
commita46d27d93a1370a154123ff7161429e2b5798ad2 (patch)
tree22a13d8900cb1002609af453d47cc31b003a6d46 /src
parent06945f0a7079b72ab3844bec77288aea208ac266 (diff)
downloadvyos-1x-a46d27d93a1370a154123ff7161429e2b5798ad2.tar.gz
vyos-1x-a46d27d93a1370a154123ff7161429e2b5798ad2.zip
T7098: Fix VPP MTU misconfiguration
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces_ethernet.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces_ethernet.py b/src/conf_mode/interfaces_ethernet.py
index d926c458c..4d1d8590f 100755
--- a/src/conf_mode/interfaces_ethernet.py
+++ b/src/conf_mode/interfaces_ethernet.py
@@ -46,6 +46,7 @@ from vyos.utils.dict import dict_to_paths_values
from vyos.utils.dict import dict_set
from vyos.utils.dict import dict_delete
from vyos.utils.process import is_systemd_service_running
+from vyos.vpp.control_vpp import VPPControl
from vyos import ConfigError
from vyos import airbag
airbag.enable()
@@ -436,13 +437,27 @@ def generate(ethernet):
def apply(ethernet):
if 'frr_dict' in ethernet and not is_systemd_service_running('vyos-configd.service'):
FRRender().apply()
- e = EthernetIf(ethernet['ifname'])
+ ifname = ethernet['ifname']
+ e = EthernetIf(ifname)
if 'deleted' in ethernet:
e.remove()
else:
e.update(ethernet)
if 'static_arp' in ethernet:
call_dependents()
+
+ # If the interface is managed by the VPP DPDK driver, synchronize runtime
+ # parameters between Linux and the corresponding VPP LCP interface
+ if dict_search(f'vpp.settings.interface.{ifname}.driver', ethernet) == 'dpdk':
+ vpp_api = VPPControl()
+ # Find LCP pair
+ lcp_pair = vpp_api.lcp_pair_find(vpp_name_hw=ifname)
+ lcp_name = lcp_pair.get('vpp_name_kernel')
+ # Sync MTU to VPP LCP pair interface
+ if lcp_name:
+ mtu = e.get_mtu()
+ vpp_api.set_iface_mtu(lcp_name, mtu)
+
return None
if __name__ == '__main__':