Skip to content

T7697: Merge vyos-vpp repo into vyos-1x #4650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 126 commits into from
Aug 12, 2025
Merged

Conversation

sever-sever
Copy link
Member

@sever-sever sever-sever commented Aug 7, 2025

Change summary

Merge vyos-vpp repo into vyos-1x

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

How to test / Smoketest result

Smoketest

sudo make test-vpp | tee smoketest_make_test_vpp.log

DEBUG - vyos@vyos:~$ cat /proc/cmdline
DEBUG - cat /proc/cmdline
DEBUG - BOOT_IMAGE=/boot/2025.08.08-0858-integration/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/2025.08.08-0858-integration mitigations=off hugepagesz=2M hugepages=1800 console=ttyS0,115200
DEBUG - vyos@vyos:~$ show version all | grep -e "vpp" -e "vyos-1x"
DEBUG - show version all | grep -e "vpp" -e "vyos-1x"
DEBUG - ii  libvppinfra                      25.06.0-21~g43212d8f7-dirty      amd64        Vector Packet Processing--runtime libraries
DEBUG - ii  libvppinfra-dev                  25.06.0-21~g43212d8f7-dirty      amd64        Vector Packet Processing--runtime libraries
DEBUG - ii  python3-vpp-api                  25.06.0-21~g43212d8f7-dirty      amd64        VPP Python3 API bindings
DEBUG - ii  vpp                              25.06.0-21~g43212d8f7-dirty      amd64        Vector Packet Processing--executables
DEBUG - ii  vpp-dev                          25.06.0-21~g43212d8f7-dirty      amd64        Vector Packet Processing--development support
DEBUG - ii  vpp-plugin-core                  25.06.0-21~g43212d8f7-dirty      amd64        Vector Packet Processing--runtime core plugins
DEBUG - ii  vpp-plugin-dpdk                  25.06.0-21~g43212d8f7-dirty      amd64        Vector Packet Processing--runtime dpdk plugin
DEBUG - ii  vyos-1x                          0.0-no.git.tag                   amd64        VyOS configuration scripts and data
DEBUG - ii  vyos-1x-aws                      0.0-no.git.tag                   all          VyOS configuration scripts and data for AWS Gateway Load Balancer
DEBUG - ii  vyos-1x-dbgsym                   0.0-no.git.tag                   amd64        debug symbols for vyos-1x
DEBUG - ii  vyos-1x-smoketest                0.0-no.git.tag                   all          VyOS build sanity checking toolkit
DEBUG - ii  vyos-1x-vmware                   0.0-no.git.tag                   all          VyOS configuration scripts and data for VMware
DEBUG - vyos@vyos:~$ lsb_release --short --id 2>/dev/null
DEBUG - lsb_release --short --id 2>/dev/null
DEBUG - VyOS
DEBUG - show log kernel | match "VyOS build time autogenerated kernel key"
DEBUG - vyos@vyos:~$ show log kernel | match "VyOS build time autogenerated kernel key"
DEBUG - vyos@vyos:~$ sudo find /usr/libexec/vyos/tests/smoke -maxdepth 2 -type f -name test_* ! \( -name "test_*vpp*.py" \) -delete
est_* ! \( -name "test_*vpp*.py" \) -deletemoke -maxdepth 2 -type f -name t 
 INFO - Executing VyOS smoketests
DEBUG - vyos@vyos:~$ /usr/bin/vyos-smoketest
DEBUG - /usr/bin/vyos-smoketest
DEBUG - Running Testcase: /usr/libexec/vyos/tests/smoke/cli/test_vpp.py
DEBUG - test_01_vpp_basic (__main__.TestVPP.test_01_vpp_basic) ... ok
DEBUG - test_02_vpp_vxlan (__main__.TestVPP.test_02_vpp_vxlan) ... ok
DEBUG - test_03_vpp_gre (__main__.TestVPP.test_03_vpp_gre) ... ok
DEBUG - test_04_vpp_geneve (__main__.TestVPP.test_04_vpp_geneve) ... skipped 'Skipping this test geneve index always is 0'
DEBUG - test_05_vpp_loopback (__main__.TestVPP.test_05_vpp_loopback) ... ok
DEBUG - test_06_vpp_bonding (__main__.TestVPP.test_06_vpp_bonding) ... skipped 'Skipping temporary bonding, sometimes get recursion T7117'
DEBUG - test_07_vpp_bridge (__main__.TestVPP.test_07_vpp_bridge) ... ok
DEBUG - test_08_vpp_ipip (__main__.TestVPP.test_08_vpp_ipip) ... ok
DEBUG - test_09_vpp_xconnect (__main__.TestVPP.test_09_vpp_xconnect) ... ok
DEBUG - test_10_vpp_driver_options (__main__.TestVPP.test_10_vpp_driver_options) ... ok
DEBUG - test_11_vpp_cpu_settings (__main__.TestVPP.test_11_vpp_cpu_settings) ... ok
DEBUG - test_12_vpp_cpu_corelist_workers (__main__.TestVPP.test_12_vpp_cpu_corelist_workers) ... ok
DEBUG - test_13_1_buffer_page_size (__main__.TestVPP.test_13_1_buffer_page_size) ... ok
DEBUG - test_13_2_statseg_page_size (__main__.TestVPP.test_13_2_statseg_page_size) ... ok
DEBUG - test_13_3_mem_page_size (__main__.TestVPP.test_13_3_mem_page_size) ... ok
DEBUG - test_14_mem_default_hugepage (__main__.TestVPP.test_14_mem_default_hugepage) ... ok
DEBUG - test_15_vpp_ipsec_xfrm_nl (__main__.TestVPP.test_15_vpp_ipsec_xfrm_nl) ... ok
DEBUG - test_16_vpp_cgnat (__main__.TestVPP.test_16_vpp_cgnat) ... ok
DEBUG - test_17_vpp_nat (__main__.TestVPP.test_17_vpp_nat) ... ok
DEBUG - test_18_vpp_sflow (__main__.TestVPP.test_18_vpp_sflow) ... ok
DEBUG - 
DEBUG - ----------------------------------------------------------------------
DEBUG - Ran 20 tests in 250.374s
DEBUG - 
DEBUG - OK (skipped=2)
DEBUG - vyos@vyos:~$ echo EXITCODE:$?
DEBUG - echo EXITCODE:$?
 INFO - Smoketest finished successfully!

Configtest:

sudo make testcvpp | tee smoketest_make_testcvpp.log

DEBUG - vyos@vyos:~$ /usr/bin/vyos-configtest
DEBUG - /usr/bin/vyos-configtest
DEBUG - Generating tests
DEBUG - Loaded migration result test for config "vpp"
DEBUG - ... completed: 0.001708
DEBUG - test_vpp (__main__.TestConfigVpp.test_vpp) ...  time: 18.634
DEBUG - ok
DEBUG - 
DEBUG - ----------------------------------------------------------------------
DEBUG - Ran 1 test in 18.642s
DEBUG - 
DEBUG - OK
DEBUG - vyos@vyos:~$ echo EXITCODE:$?
DEBUG - echo EXITCODE:$?
DEBUG - EXITCODE:0
 INFO - Configtest finished successfully!

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

dmbaturin and others added 30 commits January 7, 2025 17:29
Do not use 'recursive_defaults' as argument of the funciton get_config()
It cause vyos-1x/src/tests/test_configd_inspect.py signature checks fail

AssertionError: 2 != 1 : 'vpp_interfaces_bonding.py': 'get_config' incorrect signature
Introduce a delay to address instability in the VPP API, which may
fail to create the LCP or establish a connection.
This should be reviewed and resolved in future releases.

This fixes confgurations with included kernel-itnerface (LCP)
And all smoketests

Example:

  set interfaces ethernet eth1 address '192.0.2.1/30'
  set vpp settings interface eth1 driver 'dpdk'
  set vpp interfaces vxlan vxlan10 remote '192.0.2.2'
  set vpp interfaces vxlan vxlan10 source-address '192.0.2.1'
  set vpp interfaces vxlan vxlan10 vni '10'
  set vpp interfaces vxlan vxlan10 kernel-interface 'vpptap10'

Without this delay we get:

vyos@r14# commit
[ vpp interfaces vxlan vxlan10 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 139, in run_script
    script.apply(c)
  File "/usr/libexec/vyos//conf_mode/vpp_interfaces_vxlan.py", line 174, in apply
    i.kernel_add()
  File "/usr/lib/python3/dist-packages/vyos/vpp/interface/vxlan.py", line 85, in kernel_add
    self.vpp.lcp_pair_add(self.ifname, self.kernel_interface)
  File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 79, in check_retval_wrapper
    return_value = decorated_func(cls, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 58, in api_safe_wrapper
    return decorated_func(cls, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py", line 188, in lcp_pair_add
    return self.__vpp_api_client.api.lcp_itf_pair_add_del_v2(**api_call_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 129, in __call__
    return self._func(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 564, in f
    return self._call_vpp(i, msg, multipart, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 853, in _call_vpp
    raise VPPIOError(2, "VPP API client: read failed")
vpp_papi.vpp_papi.VPPIOError: [Errno 2] VPP API client: read failed
By default VPP creates interface via API with the 'down' state.
Add methods to set interface state UP/DOWN.

It probably should reuse the common Class in the future.
We do not have classes for interface (vpp) state settings.
Add tunnel type
 - erspan
 - l3
 - teb (Transparent Ethernet Bridge)

By default L3 GRE interfaces cannot be bridged to a bridge interface.
Add the ability to change tunnel type.

set vpp interfaces gre gre2 tunnel-type 'teb'
GRE: add encapsulation gre and gretap
Add ability to configure multipoint mode.
Remote IP address in this case has to be 0.0.0.0
Only one tunnel with the same source IP is allowed in the
point-to-multipoint mode

set vpp interfaces gre gre0 mode 'point-to-multipoint'
set vpp interfaces gre gre0 remote '0.0.0.0'
set vpp interfaces gre gre0 source-address '192.0.2.1'
- Only tunnel-type 'teb' (L2 Transparent Ethernet Bridge) is allowed
to brdige with other itnerfaces.

- Only one multipoint GRE tunnel is allowed from the same source
address. Do this check from the main vpp file as it has the full
vpp config dictionary.
LCP: enable by default route-no-paths
@sever-sever sever-sever requested review from zdc, jestabro and c-po August 7, 2025 15:45
The pylint does not like the IProute import (though it works fine)

 ************* Module vpp
src/conf_mode/vpp.py:21:0: E0611: No name 'IPRoute' in module 'pyroute2' (no-name-in-module)

Do this change only for pylint
@sever-sever sever-sever added the bp/circinus Create automatic backport for circinus label Aug 8, 2025
Ignore import vpp_api to skip pylint check.
The `python3-vpp-api` depends on `vpp` and we should not use VPP
in the container.
Use this workaround to skip pylint check.
@zdc
Copy link
Contributor

zdc commented Aug 8, 2025

I have read the CLA Document and I hereby sign the CLA

vyosbot added a commit to vyos/vyos-cla-signatures that referenced this pull request Aug 8, 2025
@HollyGurza
Copy link
Contributor

I have read the CLA Document and I hereby sign the CLA

vyosbot added a commit to vyos/vyos-cla-signatures that referenced this pull request Aug 8, 2025
Copy link

github-actions bot commented Aug 8, 2025

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests (no interfaces) 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Copy link
Member

@c-po c-po left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This merges unrelated histories of vyos-vpp and vyos-1x repo. I have checked that commit IDs are kept in tact from the old vyos-vpp repo.

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Histories are consistent, tests pass — should be good to go.

@dmbaturin dmbaturin merged commit 703031e into vyos:current Aug 12, 2025
16 of 18 checks passed
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-failed This PR mirror has failed mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow mirror-failed This PR mirror has failed labels Aug 12, 2025
sever-sever added a commit to sever-sever/vyos-build that referenced this pull request Aug 14, 2025
The vyos-vpp repo was merged to the vyos-1x in the
vyos/vyos-1x#4650
We do not need copy from vyos-vpp repo anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bp/circinus Create automatic backport for circinus current mirror-completed
Development

Successfully merging this pull request may close these issues.

10 participants