dpdkCore¶
-
class dpdkCore : public kotekan::Stage¶
The core interface between DPDK enabled NICs and the kotekan framework.
The idea of this objection is to deal with all the boiler plate which is needed to setup DPDK on enabled NICs and map all the ports to lcores (DPDK threads).
In the end anyone should be able to use this class with their own subclass of the
dpdkRXhandlerwithout understanding all the details about setting up the DPDK framework.- Optional config, don’t change unless you know what you are doing.
- Author
Andre Renard
- Param lcore_cpu_map:
Array of CPU IDs which should be used for lcores (DPDK threads locked to a CPU core). For example [0,6] would create 2 lcores mapped to the 1st and 7th CPU core.
- Param lcore_port_map:
Array of arrays mapping ports to lcores (DPDK threads locked to CPU code) Format is index = lcore, value = array of port IDs so
[[0,1],[2,3]] maps lcore 0 to service ports 0 and 1, and lcore 1 to service ports 2 and 3. Note there is aways one handler per port, so that means there can be more than one handler per lcore.- Param handlers:
Array of json objections which each contain the config line
dpdk_handler:<handler_name>which names the hander to use for the NIC port at its index in the handlers array. Addational config for each handler can be given within each of these objects. For example: handlers:dpdk_handler: myHandler # Handler for port 0 in_buf: my_buf_0
dpdk_handler: myHandler # Handler for port 1 in_buf: my_buf_1 Note that if a port isn’t being used it must be denoted by
- dpdk_handler: none. The number of handlers much match the number of ports in the system, even if they aren’t being used by the current config. There must be a valid handler for every port referenced inlcore_port_map
- Param main_lcore_cpu:
The CPU ID of the main lcore (which just handles simple things like updating stats, and other low volume operatings)
- Param num_mbufs:
Int. Default 1024 The size of the mbuf pool
- Param mbuf_cache_size:
Int. Default 250 The number of mbufs to cache Basically this is to try and keep mbufs always in l3 by reducing the number of mbufs used by default.
- Param burst_size:
Int. Default 32 The maximum number of packets returned by
rte_eth_rx_burst- Param rx_ring_size:
Int. Default 512 The size of the Receive ring
- Param tx_ring_size:
Int. Default 512 The size of the Transmit ring
- Param max_rx_pkt_len:
Int. Default 9000 The max packet size.
- Param jumbo_frame:
Bool. Default true Enable support for Jumbo frames
- Param num_mem_channels:
Int. Default 4 The number of system memory channels
- Param init_mem_alloc:
Int. Default 256 The initial memory allocation in MB
- Param pcie_block_list:
Array of strings. List of PCIe devices to block DPDK from using.
- Param lcore_start_delay:
Int. Default 40 Seconds to wait after port start before the lcore RX loop begins. Required on E810 NICs to allow ports to become ready.
Public Functions
-
dpdkCore(kotekan::Config &config, const std::string &unique_name, kotekan::bufferContainer &buffer_container)¶
-
~dpdkCore()¶
-
virtual void main_thread() override¶
-
virtual std::string dot_string(const std::string &prefix) const override¶
Generates a graphviz “dot” string for this stage.
By default this is just the stage name plus some default formatting.
- Returns:
“dot” style graph description for this stage.