From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0FA37A0613 for ; Fri, 30 Aug 2019 10:05:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 010871E886; Fri, 30 Aug 2019 10:05:29 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E5CCF1E886 for ; Fri, 30 Aug 2019 10:05:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2019 01:05:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,446,1559545200"; d="scan'208";a="381051270" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.4]) ([10.237.221.4]) by fmsmga005.fm.intel.com with ESMTP; 30 Aug 2019 01:05:26 -0700 To: Yasufumi Ogawa , "Mcloughlin, Aideen" , "web@dpdk.org" References: <20190719134250.19920-1-aideen.mcloughlin@intel.com> <04A40BE47A76AC49A9B2BC6F269E4F1C42D11733@irsmsx105.ger.corp.intel.com> <5dca1ce7-9ef1-5e15-0139-0721071014f6@gmail.com> From: Ferruh Yigit Openpgp: preference=signencrypt Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+vLBD6I61kVrZ45Vjo3r+pPOByUBXOUlxp9 GWEKKIrJ4eogqkVNS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o2psca1PUQ61SZJZOMl6VwNxpdvEaolVdrpnSxUF31kPEvR0Igy8HysQ11pj8AcgH0a9FrvU /8k2Roccd2ZIdpNLkirGFZR7LtRw41Kt1Jg+lafI0efkiHKMT/6D/P1EUp1RxOBNtWGV2hrd 0Yg9ds+VMphHHU69fDH02SwgpvXwG8Qm14Zi5WQ66R4CtTkHuYtA63sS17vMl8fDuTCtvfPF HzvdJLIhDYN3Mm1oMjKLlq4PUdYh68Fiwm+boJoBUFGuregJFlO3hM7uHBDhSEnXQr5mqpPM 6R/7Q5BjAxrwVBisH0yQGjsWlnysRWNfExAE2sRePSl0or9q19ddkRYltl6X4FDUXy2DTXa9 a+Fw4e1EvmcF3PjmTYs9IE3Vc64CRQXkhujcN4ZZh5lvOpU8WgyDxFq7bavFnSS6kx7Tk29/ wNJBp+cf9qsQxLbqhW5kfORuZGecus0TLcmpZEFKKjTJBK9gELRBB/zoN3j41hlEl7uTUXTI JQFLhpsFlEdKLujyvT/aCwP3XWT+B2uZDKrMAElF6ltpTxI53JYi22WO7NH7MR16Fhi4R6vh FHNBOkiAhUpoXRZXaCR6+X4qwA8CwHGqHRBfYFSU/Ulq1ZLR+S3hNj2mbnSx0lBs1eEqe2vh cA== Message-ID: <3e700e3a-9d3b-501f-d520-4a58b0901a4b@intel.com> Date: Fri, 30 Aug 2019 09:05:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5dca1ce7-9ef1-5e15-0139-0721071014f6@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-web] [PATCH] update quick start guide X-BeenThere: web@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK website maintenance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: web-bounces@dpdk.org Sender: "web" On 8/30/2019 6:07 AM, Yasufumi Ogawa wrote: > Hi Aideen, > >> If anyone has a chance to look over this that'd be great- It's been sitting on the mailing list for a while >> >> -----Original Message----- >> From: Mcloughlin, Aideen >> Sent: Friday, July 19, 2019 2:43 PM >> To: web@dpdk.org >> Cc: Mcloughlin, Aideen >> Subject: [PATCH] update quick start guide >> >> The Quick Start Guide was unclear. This patch updates the Quick Start Guide so that it can be more helpful to new users of DPDK. This patch changes the use of physical ports to null ports as not all new users will have easily usable ports. >> >> These null ports simulate packets to avoid the process of setting up and running a packet generator. >> >> The previous version of the quick start guide was only compatible with multi socket platforms, this patch makes it compatible with single socket platforms. >> >> Signed-off-by: A.McLoughlin >> --- >> content/doc/quick-start.md | 118 ++++++++++++++++++++++--------------- >> 1 file changed, 69 insertions(+), 49 deletions(-) >> >> diff --git a/content/doc/quick-start.md b/content/doc/quick-start.md index fdffa98..d85bcb6 100644 >> --- a/content/doc/quick-start.md >> +++ b/content/doc/quick-start.md >> @@ -4,74 +4,94 @@ title = "Quick Start Guide" >> >> {{% alert theme="info" %}}
A simple forwarding test with pcap PMD which works with any NIC (with performance penalties)
{{% /alert %}} >> >> -Extract sources >> - >> +## Download DPDK {#download} >> +--- >> +Download a DPDK package from [this page](/download/). It is best to download the latest stable version. >> +If you want to have DPDK on a remote server or board, you must transfer >> +the downloaded file to the board/server. You can do this with programs >> +such as [WinSCP](https://winscp.net/eng/index.php) or >> +[MobaXterm](https://mobaxterm.mobatek.net/download.html) >> + >> +## Extract source files from downloaded file {#extract} >> +--- >> +Ensure the downloaded file is in the directory in which you want DPDK, and that you are in that same directory. >> +To extract the DPDK files from the downloaded file into a new >> +directory, run the command below (if you downloaded dpdk-19.05.tar.xz , >> +the commands should reflect that eg. tar xf dpdk-19.05.tar.xz) >> ``` >> tar xf dpdk.tar.gz >> +``` >> +Enter the newly created directory with the cd command as below ``` >> cd dpdk >> ``` >> - >> -Enable pcap (libpcap headers are required). >> - >> +## Build DPDK {#build} >> +--- >> +To make any necessary config changes to the environment before DPDK is >> +built, run the command below >> ``` >> - make config T=x86_64-native-linuxapp-gcc >> - sed -ri 's,(PMD_PCAP=).*,\1y,' build/.config >> + make defconfig >> ``` >> - >> -Build libraries and test application (Linux headers may be needed with default config). >> - >> +The command below builds a usable version of DPDK from the DPDK folder. You must be within the new DPDK folder for this command to run. >> +It may take a while for the command to fully run as there are a lot of elements to build in DPDK. >> ``` >> - make >> + make -j >> ``` >> +'make' is the standard command to build an application, and '-j' tells >> +the make command to use all the cores when building, which should speed >> +up the building process >> >> -Reserve huge pages memory. >> - >> +## Reserve memory for Hugepages {#hugepages} >> +--- >> +Hugepages increase application performance as the performance cost of swapping between pages is much less than if only small pages were used. >> +First make subdirectory huge in directory mnt >> ``` >> mkdir -p /mnt/huge >> +``` >> +Then make the filesystem 'hugelbfs nodev' accessible to directory structure /mnt/huge for the proper storage of the hugepages which will be created. > Here is a misc typo. 'hugetlbfs nodev' correctly. > >> +``` >> mount -t hugetlbfs nodev /mnt/huge >> - echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages >> ``` >> - >> -Run poll-mode driver test (with a cable between ports). >> - >> +Then allocate 1024 hugepages with the command below ``` >> + sysctl -w vm.nr_hugepages=1024 >> ``` >> - build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0 --vdev=net_pcap1,iface=eth1 -- >> - -i --nb-cores=2 --nb-ports=2 --total-num-mbufs=2048 >> - >> - testpmd> show port stats all >> - >> - ######################## NIC statistics for port 0 ######################## >> - RX-packets: 0 RX-errors: 0 RX-bytes: 0 >> - TX-packets: 0 TX-errors: 0 TX-bytes: 0 >> - ############################################################################ >> - >> - ######################## NIC statistics for port 1 ######################## >> - RX-packets: 0 RX-errors: 0 RX-bytes: 0 >> - TX-packets: 0 TX-errors: 0 TX-bytes: 0 >> - ############################################################################ >> >> - testpmd> start tx_first >> +## Run poll-mode packet forwarding test {#run} >> +--- >> +Run the command below to start a packet sending and receiving program >> +``` >> + build/app/testpmd --vdev=net_null0 --vdev=net_null1 -- -i ``` > I am not sure it is good for using nullpmd as an example here because > there is no description for this pmd in the recent documents. I think > using tap pmd described in [1] is also simple and more reasonable than > null pmd. What do you think? > > build/app/testpmd --vdev=net_tap0 --vdev=net_tap1 -- -i > > sudo ip link set dtap0 up; sudo ip addr add 192.168.0.250/24 dev dtap0 > sudo ip link set dtap1 up; sudo ip addr add 192.168.1.250/24 dev dtap1 > sudo socat interface:dtap0 interface:dtap1 > > [1] http://doc.dpdk.org/guides/nics/tap.html#example null PMD is easy to use, it doesn't have any hw and platform dependency or any configuration requirement, it looks like good fit for Quick Start Guide. But I agree on your concern that null PMD has no documentation, perhaps we should fix this by adding some documentation for it. > > Thanks, > Yasufumi > >> >> +You may have a lot of errors like the one shown below. This is because >> +we do not give specific device addresses to use, and so the system >> +checks every available device to use before running. In this case, you >> +can ignore those error messages ``` >> + EAL: PCI device 0000:83:00.1 on NUMA socket -1 >> + EAL: Invalid NUMA socket, default to 0 >> + EAL: probe driver: 8086:10fb net_ixgbe >> +``` >> +Within the program, type 'start' to start transmission of packets. That will print out information on how the packets are being transmitted, and will keep transmitting until you stop transmission. >> +``` >> + testpmd> start >> +``` >> +Type 'stop' to both stop transmission and display stats on the >> +transmission, as shown below ``` >> testpmd> stop >> - >> + Telling cores to stop... >> + Waiting for lcores to finish... >> ---------------------- Forward statistics for port 0 ---------------------- >> - RX-packets: 2377688 RX-dropped: 0 RX-total: 2377688 >> - TX-packets: 2007009 TX-dropped: 0 TX-total: 2007009 >> - ---------------------------------------------------------------------------- >> - >> + RX-packets: 105326272 RX-dropped: 0 RX-total: 105326272 >> + TX-packets: 105326272 TX-dropped: 0 TX-total: 105326272 >> + >> + ---------------------------------------------------------------------- >> + ------ >> ---------------------- Forward statistics for port 1 ---------------------- >> - RX-packets: 2006977 RX-dropped: 0 RX-total: 2006977 >> - TX-packets: 2377720 TX-dropped: 0 TX-total: 2377720 >> - ---------------------------------------------------------------------------- >> - >> - +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ >> - RX-packets: 4384665 RX-dropped: 0 RX-total: 4384665 >> - TX-packets: 4384729 TX-dropped: 0 TX-total: 4384729 >> - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> + RX-packets: 105326272 RX-dropped: 0 RX-total: 105326272 >> + TX-packets: 105326272 TX-dropped: 0 TX-total: 105326272 >> + >> + ---------------------------------------------------------------------- >> + ------ +++++++++++++++ Accumulated forward statistics for all >> + ports+++++++++ >> + RX-packets: 210652544 RX-dropped: 0 RX-total: 210652544 >> + TX-packets: 210652544 TX-dropped: 0 TX-total: 210652544 >> + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> + Done. >> ``` >> +To exit the program, type 'quit' >> >> -Some sample applications can be tested after building them. >> +You have now run testpmd, a DPDK packet forwarding application. To continue learning about how to use DPDK, go to the [DPDK guide website](https://doc.dpdk.org/guides/index.html). >> + >> +Testpmd is a forwarding application and not a packet generator. We can see packets being sent and received in this example as the null devices (net_null0, net_null1) simulate packets. >> + >> +The next step in understanding and setting up DPDK is binding ports. >> +This will allow you to send actual packets, instead of simulated packets For an explanation on how to bind ports to DPDK follow [these instructions](https://doc.dpdk.org/guides/linux_gsg/linux_drivers.html) from the DPDK guide website. >> >> -``` >> - make -C examples RTE_SDK=$(pwd) RTE_TARGET=build O=$(pwd)/build/examples -``` >> -- >> 2.17.1 >>