[dpdk-dev] [PATCH] net/af_packet: add docs guide

Ferruh Yigit ferruh.yigit at intel.com
Tue Dec 18 01:31:46 CET 2018


On 12/17/2018 9:14 AM, Tiago Lam wrote:
> As of commit 364e08f2bbc0, DPDK allows an aplication to send and receive
> raw packets using an AF_PACKET and PACKET_MMAP, when using a Linux
> Kernel. This complements it by adding a simple guide with the following
> information:
> - An introduction, where a brief explanation of this driver is given,
>   pointing out the dependency on PACKET_MMAP;
> - Which options are supported at configuration time, while setting up an
>   interface, and it's inherent limitations;
> - What the prerequisites are;
> - A command line example of how to set up a DPDK port using the
>   af_packet driver.
> 
> Since there's a dependency in PACKET_MMAP, the guide also points to the
> original Kernel documentation, so the reader can get more details.
> 
> Signed-off-by: Tiago Lam <tiago.lam at intel.com>

Thanks Tiago, appreciated.

> ---
>  doc/guides/nics/af_packet.rst | 67 +++++++++++++++++++++++++++++++++++++++++++

index file (doc/guides/nics/index.rst) also needs to be updated to include new
doc, I can update this while merging.

<...>

> +Options and inherent limitations
> +--------------------------------
> +
> +The following options can be provided to set up an af_packet port in DPDK.
> +Some of these, in turn, will be used to configure the PAKET_MMAP settings.
> +
> +*   "iface" - name of the Kernel interface to attach to (required);
> +*   "qpairs" - number of Rx and Tx queues (optional, default 1);
> +*   "qdisc_bypass" - set PACKET_QDISC_BYPASS option in AF_PACKET (optional,
> +    disabled by default);
> +*   "blocksz" - PACKET_MMAP block size (optional, default 4096);
> +*   "framesz" - PACKET_MMAP frame size (optional, default 2048B; Note: multiple
> +    of 16B);
> +*   "framecnt" - PACKET_MMAP frame count (optional, default 512B).

using `` instead of " highlights the text, I can update this while merging.

Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>


More information about the dev mailing list