-
Notifications
You must be signed in to change notification settings - Fork 82
ToDPDKRing
ToDPDKRing — Click element; sends packets to a circular ring buffer using DPDK (user-level).
ToDPDKRing(MEMPOOL m, FROM_PROC p1, TO_PROC p2, [, keywords BURST, etc.])
Batching: Batching natively supported
Ports: 1 input, no outputs
Processing: push
Drivers: userlevel
Sends packets to the ring buffer with name MEMPOOL. As DPDK does not support polling, this element only supports PUSH. It will build a batch of packets inside an internal queue (limited to IQUEUE packets) until it reaches BURST packets, and then send the batch to DPDK. If the batch is not ready after TIMEOUT ms, it will flush the batch of packets even if it doesn't contain BURST packets.
Arguments:
- MEMPOOL — String. The name of the memory pool to attach.
- FROM_PROC — String. The name of the Click-DPDK process that uses this element. It can be a made-up name, however, the other end (a FromDPDKRing) must use the same name at its own TO_PROC parameter.
- TO_PROC — String. The name of the Click-DPDK process that is attached to our process. It can be a made-up name, however, the other end (a FromDPDKRing) must use the same name at its own FROM_PROC parameter.
- IQUEUE — Integer. Size of the internal queue, i.e. number of packets that we can buffer before pushing them to the DPDK framework. If IQUEUE is bigger than BURST, some packets could be buffered in the internal queue when the output ring is full. Defaults to 1024.
- BLOCKING — Boolean. If true, when there is no more space in the output device ring, and the IQUEUE is full, we'll block until some packet could be sent. If false the packet will be dropped. Defaults to true.
- BURST — Integer. Number of packets to batch before sending them out. A bigger BURST leads to more latency, but a better throughput. The default value of 32 is recommended as it is what DPDK will do under the hood. Prefer to set the TIMEOUT parameter to 0 if the throughput is low as it will maintain performance.
- TIMEOUT — Integer. Set a timeout to flush the internal queue. It is useful under low throughput as it could take a long time before reaching BURST packet in the internal queue. The timeout is expressed in milliseconds. Setting the timer to 0 is not a bad idea as it will schedule after the source element (such as a FromDPDKDevice) will have finished its burst, or all incoming packets. This would therefore ensure that a flush is done right after all packets have been processed by the Click pipeline. Setting a negative value disable the timer, this is generally acceptable if the thoughput of this element rarely drops below 32000 pps (~50 Mbps with maximal size packets) with a BURST of 32, as the internal queue will wait on average 1 ms before containing 32 packets. Defaults to 0 (immediate flush).
- NDESC — Integer. Number of descriptors per ring. The default is 1024.
- NUMA_ZONE — Integer. The NUMA memory zone (or CPU socket ID) where we allocate resources.
This element is only available at user level, when compiled with DPDK support.
... -> ToDPDKRing(MEM_POOL 2, FROM_PROC nf1_tx, TO_PROC nf2_rx, IQUEUE 1024, BURST 32)
- count (read-only) — Returns the number of packets sent by the device.
- dropped (read-only) — Returns the number of packets dropped by the device.
Generated by click-elem2man from ../elements/userlevel/todpdkring.hh:10
on 2018/10/03.