Skip to content

vpp: T8261: Refactor resource settings into 'resource-allocation' section#4997

Merged
c-po merged 1 commit intovyos:currentfrom
natali-rs1985:T8261
Feb 19, 2026
Merged

vpp: T8261: Refactor resource settings into 'resource-allocation' section#4997
c-po merged 1 commit intovyos:currentfrom
natali-rs1985:T8261

Conversation

@natali-rs1985
Copy link
Contributor

Change summary

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): CLI change

Related Task(s)

Related PR(s)

How to test / Smoketest result

vyos@vyos# /usr/libexec/vyos/tests/smoke/cli/test_vpp.py
test_01_vpp_basic (__main__.TestVPP.test_01_vpp_basic) ... ok
test_02_vpp_vxlan (__main__.TestVPP.test_02_vpp_vxlan) ... ok
test_03_vpp_gre (__main__.TestVPP.test_03_vpp_gre) ... ok
test_04_vpp_geneve (__main__.TestVPP.test_04_vpp_geneve) ... skipped 'Skipping this test geneve index always is 0'
test_05_vpp_loopback (__main__.TestVPP.test_05_vpp_loopback) ... ok
test_06_vpp_bonding (__main__.TestVPP.test_06_vpp_bonding) ... ok
test_07_vpp_bridge (__main__.TestVPP.test_07_vpp_bridge) ... ok
test_08_vpp_ipip (__main__.TestVPP.test_08_vpp_ipip) ... ok
test_09_vpp_xconnect (__main__.TestVPP.test_09_vpp_xconnect) ... ok
test_10_vpp_driver_options (__main__.TestVPP.test_10_vpp_driver_options) ... ok
test_11_vpp_cpu_cores (__main__.TestVPP.test_11_vpp_cpu_cores) ... ok
test_12_1_buffer_page_size (__main__.TestVPP.test_12_1_buffer_page_size) ... ok
test_12_2_statseg_page_size (__main__.TestVPP.test_12_2_statseg_page_size) ... ok
test_12_3_mem_page_size (__main__.TestVPP.test_12_3_mem_page_size) ... ok
test_13_vpp_ipsec_xfrm_nl (__main__.TestVPP.test_13_vpp_ipsec_xfrm_nl) ... ok
test_14_1_vpp_cgnat (__main__.TestVPP.test_14_1_vpp_cgnat) ... ok
test_14_2_vpp_cgnat_bond_with_vifs (__main__.TestVPP.test_14_2_vpp_cgnat_bond_with_vifs) ... ok
test_15_vpp_nat44 (__main__.TestVPP.test_15_vpp_nat44) ... ok
test_16_vpp_sflow (__main__.TestVPP.test_16_vpp_sflow) ... ok
test_17_resource_limits (__main__.TestVPP.test_17_resource_limits) ... ok
test_18_vpp_pppoe_mapping (__main__.TestVPP.test_18_vpp_pppoe_mapping) ... ok
test_19_kernel_options_hugepages (__main__.TestVPP.test_19_kernel_options_hugepages) ... ok
test_20_static_arp (__main__.TestVPP.test_20_static_arp) ... ok
test_21_1_vpp_ipfix (__main__.TestVPP.test_21_1_vpp_ipfix) ... ok
test_21_2_vpp_ipfix_bond (__main__.TestVPP.test_21_2_vpp_ipfix_bond) ... ok

----------------------------------------------------------------------
Ran 25 tests in 742.425s

OK (skipped=1)



vyos@vyos# set vpp settings resource-allocation
Possible completions:
 > buffers              Buffer settings
   cpu-cores            Create worker threads (including main-core) (default: 1)
   ignore-kernel-routes Ignore kernel routes
 > ipv6                 IPv6 settings
   mac-limit            Number of MAC addresses in the L2 FIB (default: 4194304)
 > memory               Memory settings


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

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

👍
No issues in PR Title / Commit Title

Copy link
Member

@sever-sever sever-sever left a comment

Choose a reason for hiding this comment

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

LGTM
Before migration:

set vpp settings buffers buffers-per-numa 'auto'
set vpp settings buffers data-size '2048'
set vpp settings buffers page-size '2M'
set vpp settings interface eth1
set vpp settings ipv6 hash-buckets '65536'
set vpp settings ipv6 heap-size '64M'
set vpp settings l2learn limit '2000000'
set vpp settings logging default-level 'info'
set vpp settings memory main-heap-page-size '2M'
set vpp settings memory main-heap-size '3000M'
set vpp settings physmem max-size '8G'
set vpp settings poll-sleep-usec '2222'
set vpp settings resource-allocation cpu-cores '1'
set vpp settings statseg page-size '2M'
set vpp settings statseg size '256M'

After migration:

set vpp settings interface eth1
set vpp settings logging default-level 'info'
set vpp settings poll-sleep-usec '2222'
set vpp settings resource-allocation buffers buffers-per-numa 'auto'
set vpp settings resource-allocation buffers data-size '2048'
set vpp settings resource-allocation buffers page-size '2M'
set vpp settings resource-allocation cpu-cores '1'
set vpp settings resource-allocation ipv6 hash-buckets '65536'
set vpp settings resource-allocation ipv6 heap-size '64M'
set vpp settings resource-allocation mac-limit '2000000'
set vpp settings resource-allocation memory main-heap-page-size '2M'
set vpp settings resource-allocation memory main-heap-size '3000M'
set vpp settings resource-allocation memory physmem-max-size '8G'
set vpp settings resource-allocation memory stats page-size '2M'
set vpp settings resource-allocation memory stats size '256M'

VPP config after migration:

vyos@r14# cat /run/vpp/vpp.conf 
# Generated by ${vyos_conf_scripts_dir}/vpp.py

unix {
    nodaemon
    log /var/log/vpp.log
    full-coredump
    cli-listen /run/vpp/cli.sock
    gid vpp
    systemd-notify
    # exec /etc/vpp/bootstrap.vpp
    poll-sleep-usec 2222
}

cpu {
    main-core 2
    skip-cores 2
}

buffers {
    buffers-per-numa 16384
    default data-size 2048
    page-size 2M
}

ip6 {
    hash-buckets 65536
    heap-size 64M
}

l2learn {
    limit 2000000
}

logging {
    default-log-level info
    default-syslog-log-level info
}

physmem {
    max-size 8G
}

plugins {
    plugin default { disable }
    plugin avf_plugin.so { enable }
    plugin dpdk_plugin.so { enable }
    plugin vmxnet3_plugin.so { enable }
    plugin lacp_plugin.so { enable }
    plugin linux_cp_plugin.so { enable }
    plugin linux_nl_plugin.so { enable }
    plugin pppoe_plugin.so { enable }
    # Flow
    plugin flowprobe_plugin.so { enable }
    plugin sflow_plugin.so { enable }
    # NAT uncomment if needed
    # plugin cnat_plugin.so { enable }
    plugin nat_plugin.so { enable }
    plugin nat44_ei_plugin.so { enable }
    plugin det44_plugin.so { enable }
    # plugin nat44_ei_plugin.so { enable }
    # plugin nat64_plugin.so { enable }
    # plugin nat66_plugin.so { enable }
    # plugin pnat_plugin.so { enable }
    # Tunnels
    plugin geneve_plugin.so { enable }
    plugin gre_plugin.so { enable }
    plugin vxlan_plugin.so { enable }
    # Secure
    # plugin ikev2_plugin.so { enable }
    # plugin dns_plugin.so { enable } # Probably required for FQDN peers
    # plugin wireguard_plugin.so { enable }
    # ACL
    plugin acl_plugin.so { enable }
    # DHCP plugin
    plugin dhcp_plugin.so { enable }
}


crypto-engines {
    default { disable }
}


linux-cp {
    lcp-sync
    lcp-auto-subint
    route-no-paths
}

linux-nl {
    nl-rx-buffer-size 268435456
}

statseg {
    size 256M
    page-size 2M
}

memory {
    main-heap-size 3000M
    main-heap-page-size 2M
    default-hugepage-size 2M
}

dpdk {
    # Whitelist the fake PCI address 0000:00:00.0
    # This prevents all devices from being added to VPP-DPDK by default
    dev 0000:00:00.0
    dev 0000:07:00.0 {
        name eth1
        num-rx-desc 1024
        num-tx-desc 1024
        }
    uio-bind-force
}


pppoe {
    enable-pass-nd-and-dhcpv6
}
[edit]
vyos@r14# 

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.

Move CLI nodes - implementation looks good. tests pass

Copy link
Member

Choose a reason for hiding this comment

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

Using u32 will automatically expand to <0-4294967295> - see /etc/bash_completion.d/vyatta-cfg for details.

Suggested change
<format>u32:0-4294967295</format>
<format>u32</format>

@sever-sever
Copy link
Member

Conflicts in the migration script at the moment:

    _migrate_vpp_interface_rx_mode(config)
<<<<<<< T8261
    _migrate_vpp_resources(config)
=======
    _migrate_vpp_dpdk_options(config)
>>>>>>> current

@github-actions
Copy link

CI integration 👍 passed!

Details

CI logs

  • CLI Smoketests 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed
  • CLI Smoketests VPP 👍 passed
  • Config tests VPP 👍 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.

Requested changes adressed

@c-po c-po merged commit 388fecf into vyos:current Feb 19, 2026
27 of 29 checks passed
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Feb 19, 2026
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.

4 participants

Comments