Skip to content
Tom Barbette edited this page Oct 3, 2018 · 4 revisions

ToDPDKDevice Element Documentation

NAME

ToDPDKDevice — Click element; sends packets to network device using Intel's DPDK (user-level)

SYNOPSIS

ToDPDKDevice(PORT [, QUEUE, N_QUEUES, keywords IQUEUE, BLOCKING, etc.])

Ports: 1 input, no outputs
Processing: push
Drivers: userlevel

DESCRIPTION

Sends packets to a network device with DPDK port identifier PORT. 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 cointain BURST packets.

Arguments:

  • PORT — Integer or PCI address. Port identifier of the device, or a PCI address in the format fffff:ff:ff.f
  • QUEUE — Integer. A specific hardware queue to use. Default is 0.
  • N_QUEUES — Integer. Number of hardware queues to use. -1 or default is to use as many queues as threads which can end up in this element.
  • 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). The timeout will be disabled (-1) if BURST is 1, as the packets will never wait in the internal queue.
  • NDESC — Integer. Number of descriptors per ring. The default is 1024.
  • ALLOW_NONEXISTENT — Boolean. Do not fail if the PORT do not existent. If it's the case the task will never run and this element will behave like Idle.

This element is only available at user level, when compiled with DPDK support.

EXAMPLES

  ... -> ToDPDKDevice(2, QUEUE 0, BLOCKING true)

ELEMENT HANDLERS

  • count (read-only) — Returns the number of packets sent by the device.
  • dropped (read-only) — Returns the number of packets dropped by the device.
  • reset_counts (write-only) — Resets n_send and n_dropped counts to zero.

SEE ALSO

DPDKInfo, FromDPDKDevice

Generated by click-elem2man from ../elements/userlevel/todpdkdevice.hh:11 on 2018/10/03.

Clone this wiki locally