For the majority of cases the default dataplane configuration is sufficient, but certain cases may require adjustments. These are often covered in more detail throughout the documentation, and relevant sections will be linked where appropriate.
These commands are all available in
The dataplane service requires a restart to enable configuration
changes described in this section. After making changes, restart the
config mode using the following command:
tnsr# configure tnsr(config)# service dataplane restart
CPU Workers and Affinity¶
The dataplane has a variety of commands to fine-tune how it uses available CPU resources on the host. These commands control CPU cores TNSR will use, both the number of cores and specific cores.
- dataplane cpu corelist-workers <n>
Defines a specific list of CPU cores to be used by the dataplane. Run the command multiple times with different core numbers to define the list of cores to utilize. When removing items with
no, the command accepts a specific core to remove from the list.
- dataplane cpu coremask-workers <mask>
corelist-workers, but the cores are defined as a hexadecimal mask instead of a list. For example,
- dataplane cpu main-core <n>
Assigns the main dataplane process to a specific CPU core.
- dataplane cpu scheduler-policy (batch|fifo|idle|other|rr)
Defines a specific scheduler policy for worker thread processor usage allocation
Scheduling batch processes. Uses dynamic priorities based on
nicevalues in the host OS, but always gives the thread a small scheduling penalty so that other processes take precedence.
First in-first out scheduling. Will preempt other types of threads and threads with a lower priority.
Scheduling very low priority jobs.
Default Linux time-sharing scheduling. Uses dynamic priorities based on
nicevalues in the host OS, similar to
batchbut without the built-in penalty.
Round-robin scheduling. Similar to
fifobut each thread is time-limited
- dataplane cpu scheduler-priority <n>
rrscheduler policies, this number sets the priority of processes for the dataplane. It can be any number between 1 (low) and 99 (high).
- dataplane cpu skip-cores <n>
Defines the number of cores to skip when creating additional worker threads, in the range of 1` to the highest available core number. The first
<n>cores will not be used by worker threads.
This does not affect the core used by the main thread, which is set by
dataplane cpu main-core <n>.
- dataplane cpu workers <n>
Defines the number of worker threads to create for the dataplane.
The number of worker threads is in addition to the main process. For example, with a worker count of
4, the dataplane will use one main process with four worker threads, for a total of five threads.
This example sets four additional worker threads, and instructs the dataplane to skip one core when assigning worker threads to cores:
tnsr(config)# dataplane cpu workers 4 tnsr(config)# dataplane cpu skip-cores 1 tnsr(config)# service dataplane restart
The show dataplane cpu threads command displays the current dataplane process list, including the core usage and process IDs. This output corresponds to the example above:
tnsr(config)# show dataplane cpu threads ID Name Type PID LCore Core Socket -- -------- ------- ---- ----- ---- ------ 0 vpp_main 2330 1 0 0 1 vpp_wk_0 workers 2346 2 2 0 2 vpp_wk_1 workers 2347 3 3 0 3 vpp_wk_2 workers 2348 4 4 0 4 vpp_wk_3 workers 2349 5 5 0
The output includes the following columns:
Dataplane thread ID.
Name of the dataplane process.
The type of thread, which will be blank for the main process.
The host OS process ID for each thread.
The logical core used by the process.
The CPU core used by the process.
The CPU socket associated with the core used by the process.
Commands in this section configure hardware settings for DPDK devices.
- dataplane dpdk dev <pci-id> (crypto|network) [num-rx-queues [<r>]] [num-tx-queues [<t>]]
- dataplane dpdk no-tx-checksum-offload
Disables transmit checksum offloading for network devices.
- dataplane dpdk no-multi-seg
Disables multi-segment buffers for network devices. Can improve performance, but disables jumbo MTU support. Recommended for Mellanox devices.
- dataplane dpdk uio-driver [<driver-name>]
Configures the UIO driver for interfaces. See Setup NICs in Dataplane.
- dataplane dpdk vdev <sw-dev-type>
Defines a software device to be used by the dataplane, such as:
AESNI GCM cryptodev
AESNI multibuffer cryptodev
Commands in this section configure memory allocation for the dataplane.
- dataplane (ip|ip6) heap-size [<size>]
Defines the amount of memory to be allocated for the dataplane FIB. The default is 32MB. For more information, see Working with Large BGP Tables.
When tuning this value, also consider increasing the Statistics Segment
- dataplane ip6 hash-buckets [<size>]
Defines the number of IPv6 forwarding table hash buckets. The default is
Commands in this section configure dataplane NAT behavior.
- dataplane nat dslite-ce
Enables DS-Lite CE mode.
- dataplane nat max-translations-per-user <n>
Defines the number of NAT translation entries to allow for each IP address. The default value is
100. The ideal value depends entirely on the environment and number of sessions per IP address involved in NAT. This includes traffic sourced from TNSR itself address as well, not only internal source IP addresses.
- dataplane nat mode (deterministic|endpoint-dependent|simple)
Configures the operating NAT mode. See Dataplane NAT Modes.
- dataplane nat mode-options simple (out2in-dpo|static-mapping-only)
Configures options for the NAT mode. See Dataplane NAT Modes.
These commands configure the statistics segment parameters for the dataplane. This feature enables local access to dataplane statistics via shared memory.
For more information on how to make use of this feature, see the VPP documentation for the example stat_client.
- dataplane statseg heap-size <heap-size>[kKmMgG]
Size of shared memory allocation for stats segment, in bytes. This value can be suffixed with
G(gigabytes) in upper or lowercase. Default value is
This value may need to be increased to accommodate large amounts of routes in routing tables. The default value of
96Mcan safely accommodate approximately one million routes.
- dataplane statseg per-node-counters enable
Enables per-graph-node performance statistics.
- dataplane statseg socket-name <socket-name>
Absolute path to UNIX domain socket for stats segment. The default path is