Struct DpdkBackendConfig¶
Defined in File config.h
Struct Documentation¶
-
struct
switchml::DpdkBackendConfig¶ Configuration options specific to using the DPDK backend.
Public Members
-
uint16_t
worker_port¶ The worker’s udp port. No restrictions here just choose a port that is unused by any application
-
std::string
worker_ip_str¶ Worker IP in the dotted decimal notation Choose the IP address for this worker and make sure its the one that corresponds to the correct network interface that you want to use for communication.
-
std::string
cores_str¶ The DPDK core configuration As you know, each worker can have multiple threads/cores. Here we specify the specific cores that we want to use For Ex. cores = 10-13 will use 4 cores 10 through 13. cores = 10 will only use the core numbered 10). For best performance, you should use cores that are on the same NUMA node as the NIC. To do this do the following:
Run
sudo lshw -class network -businfoand take note of the PCIe identifier of the NIC (Ex. 0000:81:00.0).Run
lspci -s 0000:81:00.0 -vv | grep NUMAto find out out the NUMA node at which this NIC resides.Run
lscpu | grep NUMAto know the core numbers that also reside on the same NUMA node.
make sure the number of cores you choose matches the number of worker threads in the general config
-
std::string
extra_eal_options¶ These are extra options that will be passed to DPDK EAL. What we should include here is the PCIe identifier of the NIC using the -w option. (Ex. ‘-w 0000:81:00.0’ ) to make sure that DPDK is using the right NIC. Otherwise you should find out the port id of the nic that you want.
-
uint16_t
port_id¶ Each NIC has an associated port id. Basically this is the index into the list of available NICs. If you’ve white listed the NIC that you want in extra_eal_options then you can always leave this as 0 since your chosen NIC will be the only one in the list.
-
uint32_t
pool_size¶ The size of the memory pool size for each worker thread. A memory pool is a chunk of memory from the huge pages which we use to allocate mbufs. Each worker thread will have its own memory pool for receiving mbufs (packets) and another for creating mbufs to be sent. Thus the total size of all memory pools can be calculated as pool_size*num_worker_threads*2. So just make sure you don’t try to overallocate space that you don’t have.
-
uint32_t
pool_cache_size¶ Each memory pool as described in pool_size has a dedicated software cache. How big do we want this to be? This value has strict restrictions from DPDK. If you don’t know what you’re doing you can leave it as it is.
-
uint32_t
burst_rx¶ What’s the maximum number of packets that we retrieve from the NIC at a time.
-
uint32_t
burst_tx¶ What’s the maximum number of packets that we push onto the NIC at a time.
-
uint32_t
bulk_drain_tx_us¶ Using what period in microseconds should we flush the transmit buffer?
-
uint16_t