From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 0018858CB for ; Thu, 15 Sep 2016 16:15:02 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 15 Sep 2016 07:14:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,339,1470726000"; d="scan'208";a="168644362" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 15 Sep 2016 07:14:09 -0700 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 15 Sep 2016 07:13:28 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.162]) by FMSMSX151.amr.corp.intel.com ([169.254.7.194]) with mapi id 14.03.0248.002; Thu, 15 Sep 2016 07:13:28 -0700 From: "Wiles, Keith" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] docs:tun/tap PMD information Thread-Index: AQHSD1sXcqzOgGM8EUeXuvcnde6aLKB7DUkA Date: Thu, 15 Sep 2016 14:13:27 +0000 Message-ID: References: <1473948649-14169-1-git-send-email-keith.wiles@intel.com> <1473948649-14169-2-git-send-email-keith.wiles@intel.com> In-Reply-To: <1473948649-14169-2-git-send-email-keith.wiles@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.36.168] Content-Type: text/plain; charset="us-ascii" Content-ID: <67AE062AF3FE5E49873FCFA5F6CACC33@intel.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/3] docs:tun/tap PMD information X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2016 14:15:03 -0000 self Nak - just noticed the copyright notices are wrong.=20 Regards, Keith > On Sep 15, 2016, at 9:10 AM, Keith Wiles wrote: >=20 > Signed-off-by: Keith Wiles > --- > doc/guides/nics/tap.rst | 84 ++++++++++++++++++++++++++++++++++++++++++++= +++++ > 1 file changed, 84 insertions(+) > create mode 100644 doc/guides/nics/tap.rst >=20 > diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst > new file mode 100644 > index 0000000..072def8 > --- /dev/null > +++ b/doc/guides/nics/tap.rst > @@ -0,0 +1,84 @@ > +.. BSD LICENSE > + Copyright(c) 2016 Intel Corporation. All rights reserved. > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + * Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + * Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + * Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FO= R > + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL= , > + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE= , > + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON AN= Y > + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE US= E > + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > + > +Tun/Tap Poll Mode Driver > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +The rte_eth_tap.c PMD creates a device using TUN/TAP interfaces on the l= ocal > +host. The PMD allows for DPDK and the host to communicate using a raw de= vice > +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 loc= al 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. T= he > +commands can be used to assign and query the virtual like device. > + > +These TAP interfaces can be used with wireshark or tcpdump or Pktgen-DPD= K along > +with being able to be used as a network connection to the DPDK applicati= on. The > +method enable one or more interfaces is to use the --vdev=3Deth_tap opti= on on the > +DPDK application command line. Each --vdev=3Deth_tap option give will c= reate an > +interface named dtap0, dtap1, ... and so forth. > + > +.. code-block:: console > + > + The interfaced name can be changed by adding the iface=3Dfoo0 > + e.g. --vedv=3Deth_tap,iface=3Dfoo0 --vdev=3Deth_tap,iface=3Dfoo1, ... > + > +.. code-block:: console > + > + Also the speed of the interface can be changed from 10G to whatever n= umber > + needed, but the interface does not enforce that speed. > + e.g. --vdev=3Deth_tap,iface=3Dfoo0,speed=3D25000 > + > +After the DPDK application is started you can send and receive packets o= n the > +interface using the standard rx_burst/tx_burst APIs in DPDK. From the ho= st point > +of view you can use any host tool like tcpdump, wireshark, ping, Pktgen = and > +others to communicate with the DPDK application. The DPDK application ma= y not > +understand network protocols like IPv4/6, UDP or TCP unless the applicat= ion has > +been written to understand these protocols. > + > +If you need the interface as a real network interface meaning running an= d has > +a valid IP address then you can do this with the following commands: > + > +.. code-block:: console > + > + sudo ip link set dtap0 up; sudo ip addr add 192.168.0.250/24 dev dtap= 0 > + sudo ip link set dtap1 up; sudo ip addr add 192.168.1.250/24 dev dtap= 1 > + > +Please change the IP addresses as you see fit. > + > +If routing is enabled on the host you can also communicate with the DPDK= App > +over the internet via a standard socket layer application as long as you= account > +for the protocol handing in the application. > + > +If you have a Network Stack in your DPDK application or something like i= t you > +can utilize that stack to handle the network protocols. Plus you would b= e able > +to address the interface using an IP address assigned to the internal in= terface. > --=20 > 2.8.0.GIT >=20