DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mcnamara, John" <john.mcnamara@intel.com>
To: "Wiles, Keith" <keith.wiles@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "pmatilai@redhat.com" <pmatilai@redhat.com>,
	"yuanhan.liu@linux.intel.com" <yuanhan.liu@linux.intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH v8] drivers/net:new PMD using tun/tap host	interface
Date: Thu, 13 Oct 2016 16:33:02 +0000	[thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE20262C783@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1476375088-40892-1-git-send-email-keith.wiles@intel.com>

Hi,

Some doc comments below. Apologies, for the late review, I didn't see
the docs inline.

 

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Keith Wiles
> Sent: Thursday, October 13, 2016 5:11 PM
> To: dev@dpdk.org
> Cc: pmatilai@redhat.com; yuanhan.liu@linux.intel.com; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: [dpdk-dev] [PATCH v8] drivers/net:new PMD using tun/tap host
> interface
> 
> The rte_eth_tap.c PMD creates a device using TUN/TAP interfaces on the
> local host. The PMD allows for DPDK and the host to communicate using a
> raw device interface on the host and in the DPDK application. The device
> created is a Tap device with a L2 packet header.
> 
> v8 - Fix issue with tap_tx_queue_setup() not return zero on success.
> v7 - Reword the comment in common_base and fix the data->name issue
> v6 - fixed the checkpatch issues
> v5 - merge in changes from list review see related emails
>      fixed many minor edits
> v4 - merge with latest driver changes
> v3 - fix includes by removing ifdef for other type besides Linux
>      Fix the copyright notice in the Makefile
> v2 - merge all of the patches into one patch
>      Fix a typo on naming the tap device
>      Update the maintainers list
> 
> Signed-off-by: Keith Wiles <keith.wiles@intel.com>
> ---
>  MAINTAINERS                             |   5 +
>  config/common_base                      |   9 +
>  config/common_linuxapp                  |   1 +
>  doc/guides/nics/tap.rst                 | 138 ++++++
>  drivers/net/Makefile                    |   1 +
>  drivers/net/tap/Makefile                |  57 +++
>  drivers/net/tap/rte_eth_tap.c           | 756


You need to add "tap" to the doc/guides/nics/index.rst file to
include the tap.rst in the docs.


> +
> +Tun/Tap Poll Mode Driver
> +========================================
> +
> +The rte_eth_tap.c PMD creates a device using TUN/TAP interfaces on the
> +local host. The PMD allows for DPDK and the host to communicate using a
> +raw device interface on the host and in the DPDK application.
> +
> +The device created is a TAP device, which sends/receives packet in a
> +raw format with a L2 header. The usage for a TAP PMD is for
> +connectivity to the local host using a TAP interface. When the TAP PMD
> +is initialized it will create a number of tap devices in the host
> +accessed via 'ifconfig -a' or 'ip' command. The commands can be used to
> assign and query the virtual like device.

The apostrophes around the commands should be replaced with `` to render
them as fixed width.


> +
> +These TAP interfaces can be used with wireshark or tcpdump or
> +Pktgen-DPDK along with being able to be used as a network connection to
> +the DPDK application. The method enable one or more interfaces is to
> +use the --vdev=net_tap option on the DPDK application  command line.
> +Each --vdev=net_tap option give will create an interface named dtap0,
> dtap1, ... and so forth.

Same here, include any commands or variable names in backticks to render
them as fixed width in the text: ``--vdev=net_tap``


> +
> +.. code-block:: console
> +
> +   The interfaced name can be changed by adding the iface=foo0
> +   e.g. --vdev=net_tap,iface=foo0 --vdev=net_tap,iface=foo1, ...

This would be better formatted as follows:

The interfaced name can be changed by adding the ``iface=foo0``, for example::

   --vdev=eth_tap,iface=foo0 --vdev=eth_tap,iface=foo1, ...



> +If you have a Network Stack in your DPDK application or something like
> +it you can utilize that stack to handle the network protocols. Plus you
> +would be able to address the interface using an IP address assigned to
> the internal interface.
> +
> +A very crude test you can do the following:
> +
> +Apply the patch below and make sure you have socat installed on your
> system.

There is no patch below in the docs. ;-) Also, this would probably be better
as a new section. Something like:

 
Example
-------

The following is a simple example of using the TUN/TAP PMD with the Pktgen
packet generator. It requires that the ``socat`` utility is installed on the
test system.

Build DPDK, then pull down Pktgen and build pktgen using the DPDK SDK/Target
used to build the dpdk you pulled down.

...

> +
> +Build DPDK, then pull down Pktgen and build pktgen using the DPDK
> +SDK/Target used to build the dpdk you pulled down.
> +
> +Run pktgen from the pktgen repo directory in an xterm:
> +    Note: change the -b options to blacklist all of your physical ports.
> The
> +          following command line is all one line.


The RST syntax for Note and the indentation are wrong here. Also the note
would be better after the example. Something like:


.. Note:

   Change the ``-b`` options to blacklist all of your physical ports. The
   following command line is all one line.

   Also, ``-f themes/black-yellow.theme`` is optional if the default colors
   work on your system configuration. See the Pktgen docs for more
   information.


Finally, if you want to include the TAP PMD in the NIC overview table:

    http://dpdk.org/doc/guides/nics/overview.html

You need to include a feature .ini file in the following dir:

    http://dpdk.org/browse/dpdk/tree/doc/guides/nics/features

Use the default as an example:

    http://dpdk.org/browse/dpdk/tree/doc/guides/nics/features/default.ini


Apart from those small changes it is a nice introduction and example code.

John

  reply	other threads:[~2016-10-13 16:33 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 14:10 [dpdk-dev] [PATCH 1/3] " Keith Wiles
2016-09-15 14:10 ` [dpdk-dev] [PATCH 2/3] docs:tun/tap PMD information Keith Wiles
2016-09-15 14:13   ` Wiles, Keith
2016-09-15 14:15     ` Wiles, Keith
2016-09-21  2:00   ` [dpdk-dev] [PATCH v3] drivers/net:new PMD using tun/tap host interface Keith Wiles
2016-10-04 14:45     ` [dpdk-dev] [PATCH v4] " Keith Wiles
2016-10-11  9:40       ` Ferruh Yigit
2016-10-11 11:30       ` Michał Mirosław
2016-10-11 20:56         ` Wiles, Keith
2016-10-12  8:14           ` Michał Mirosław
2016-10-11 11:49       ` Ferruh Yigit
2016-10-11 21:07         ` Wiles, Keith
2016-10-11 12:28       ` Ferruh Yigit
2016-10-11 20:57         ` Wiles, Keith
2016-10-11 21:51       ` [dpdk-dev] [PATCH v5] " Keith Wiles
2016-10-12 14:56         ` Ferruh Yigit
2016-10-12 18:19           ` Wiles, Keith
2016-10-12 19:57             ` Wiles, Keith
2016-10-12 20:54     ` [dpdk-dev] [PATCH v6] " Keith Wiles
2016-10-13 14:41       ` Ferruh Yigit
2016-10-13 15:36     ` [dpdk-dev] [PATCH v7] " Keith Wiles
2016-10-13 16:11     ` [dpdk-dev] [PATCH v8] " Keith Wiles
2016-10-13 16:33       ` Mcnamara, John [this message]
2016-10-13 22:03     ` [dpdk-dev] [PATCH v9] " Keith Wiles
2016-10-14  6:41       ` Mcnamara, John
2016-10-14  9:39       ` Ferruh Yigit
2016-11-21 12:56       ` Ferruh Yigit
2016-11-25 19:38         ` Aws Ismail
2016-11-29 21:36           ` Aws Ismail
2016-11-29 22:16             ` Wiles, Keith
2016-12-07 19:38       ` [dpdk-dev] [PATCH v10] drivers/net:new TUN/TAP device PMD Keith Wiles
2016-12-07 20:15         ` Aws Ismail
2016-12-09 18:16         ` Ferruh Yigit
2016-12-09 19:05       ` [dpdk-dev] [PATCH v11] " Keith Wiles
2016-12-12 12:39         ` Vasily Philipov
2016-12-12 14:24       ` [dpdk-dev] [PATCH v12] net/tap: new " Keith Wiles
2016-12-12 14:38       ` Keith Wiles
2016-12-12 19:13         ` Marc
2016-12-12 21:09           ` Wiles, Keith
2016-12-13 13:54         ` Ferruh Yigit
2017-01-20 12:14           ` Ferruh Yigit
2017-01-20 14:25             ` [dpdk-dev] [PATCH] net/tap: fix IFF_MULTI_QUEUE in older kernels not found Keith Wiles
2017-01-20 14:30             ` Keith Wiles
2017-01-20 16:11               ` Ferruh Yigit
2017-01-20 17:37                 ` Thomas Monjalon
2016-09-15 14:10 ` [dpdk-dev] [PATCH 3/3] drivers/net:build support for new tap device driver Keith Wiles
2016-09-16  7:36   ` Panu Matilainen
2016-09-16 14:46     ` Wiles, Keith
2016-09-16 16:22 ` [dpdk-dev] [PATCH v2] drivers/net:new PMD using tun/tap host interface Keith Wiles
2016-09-18 13:25   ` Yuanhan Liu
2016-09-18 16:20     ` Wiles, Keith
2016-09-19  0:29       ` Yuanhan Liu
2016-09-19 15:56         ` Wiles, Keith
2016-09-20  3:54           ` Yuanhan Liu
2016-09-20  4:05   ` Yuanhan Liu
2016-09-21  1:32     ` Wiles, Keith
2016-09-21  2:13       ` Yuanhan Liu
2016-09-21  8:24         ` Thomas Monjalon
2016-09-21 23:55           ` Wiles, Keith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B27915DBBA3421428155699D51E4CFE20262C783@IRSMSX103.ger.corp.intel.com \
    --to=john.mcnamara@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=keith.wiles@intel.com \
    --cc=pmatilai@redhat.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).