From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0045.outbound.protection.outlook.com [104.47.36.45]) by dpdk.org (Postfix) with ESMTP id 3E5AB2BE1 for ; Sat, 1 Apr 2017 17:05:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1j1Jx2gROqloRQeJnFRvOjefoew5gwizQMySgXsa02o=; b=jGwiTLxrQgUkDEBmomz0y+QDuDAGaYObfvSjnEsXBtMaqm8ZE7rKxftUigF66xmlNijlxiQviWUvRvgpbAEmKnl6n0hQlj3BD/whIYXAHjc0C5/SoEkNHcicdjtNaGsTL3Dsx1SdCs2uwUn4hn7NwezKjv2oTJsdcxkLDQWS1D4= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by BN4PR07MB2274.namprd07.prod.outlook.com (10.164.63.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Sat, 1 Apr 2017 15:05:38 +0000 From: Shijith Thotton To: dev@dpdk.org Cc: Ferruh Yigit Date: Sat, 1 Apr 2017 20:33:59 +0530 Message-Id: <1491059040-20647-2-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1491059040-20647-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1491059040-20647-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0052.INDPRD01.PROD.OUTLOOK.COM (10.163.199.24) To BN4PR07MB2274.namprd07.prod.outlook.com (10.164.63.156) X-MS-Office365-Filtering-Correlation-Id: b1f4fbeb-2271-4a0f-08fe-08d479108ef8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BN4PR07MB2274; X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2274; 3:ODv9JhwivQmYbi+3yONqe87bktfTEuicR3c4akVmG2IufLjtiPJQg/dJUJWpAGR9m8CuNFxlgv0TFLnivbbwRFAOB/AhxJcucAwyDI1Jdvuan96a7W+zX1Py431+nLMjv/P7R3If0uPCros+dSBTed32n5f7pGJuLL1hpa/3MfZbWV08Mon9Y2yBxN2UaPOTKZpVaar5AoCuEMjVKEKJf52xFi9POBo/NOdedhyW/Ld4Lfq53noaGYlG7GlZkQE0smszImWphSIWQpXkPsHRyksC2rdTBroGjh04mz7Nf5lgvOcOBuGXoxq+RrkuwoK36LLApoAkh0g/ZIn+nAL4nQ==; 25:s1UyzZwsHJ74Z9HBvx1iIBRkfAN3CwSUj2uMTXbwApSV9/ic7GOA5yl11HlV1OaIyk2tPguJO2iqa+egCD0I9QrN1NqYkNKiTM83MnAjQI5pni8m6f+G3Xzl2wnpdFhfuwdMXk9n6Un+ez6t9HJ2MjqcrXnWL0h0QQTKp9JBOkfpVma4WwlqawYKZq8t1L0s6Azg1WBkr5+RIqY8fm71XxtMY3+ITh1S4Pgj8cCofV7HHSyNcFfDgIB9nty8j16kF8mmYz6RKbfkcvzZpgee5eC8SfhRKZ7gn1FtGSIoIgmGHylBpOjYuG55yIi59WjE7CIcwvGeCU9mOR1TWVyqqMa9jIqJXbpee/AZC2hdA/mnIVVdzhPXCTo+umOEpYMVRhEu5pzkFu4BUwihb/SpkppYzYqVHLYLxDiDHMV9Eb9/3tA1/6qsBYD1ONQauO2vRHNG+REsVdRGr3R4AchvRw== X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2274; 31:Gzx2U+N/SpdbOSQ+kc42JHNEZE0geprKV2rHjEUfeocqhNrc57641R7akKWoDY1+f9e3qmrLmWcC1W8hhvtdQzKr9XvlO74I3lRzh51gEle/tP3j8I1qt1AWKjWZ86Fzry6YLi3u6d4O4+AwRAvWCBvRD6SXFPOZsvXhg63J3cZdiqSczDxyC/Z7ydS8AljaXSvddp8oufZCg8C/aG/uzX5GvPpHIleQHqR0M5j4iFJNPzDKtt6JfLdGKJnC92M1Wz1HORWHs6g7URhfAmJFxg==; 20:wrgYE2ZBFMiJE+4YPw3QZQtO3V3ImXKE5go7+oT3LgrtB13fUTqRnMIiLNMKGr/dHWHYEDeHC3m6RjWc5aUaAgOwYgX6/wR33NBJrUXA3eENEMfyDpkH4Rz1QBNW+4oL9TrtNNybFfY66MIC/4CYHjYVOZakRIY1g4qler0TJqYZLovxlEawdFHYQQBKeq2MkK96canDpGNJwJTL7KQ/7FpSn5qkpawFI3am2PvoDEQXljuYUVM4gPs2ubD6UXzvne5FhtcXXwSm8jAQyXjAY890O89mHlfHIdOsuYVqHSG/50GwR/9/8Z2gM3GjLB+R+E3pm5Q6QuGDzApo0UKjuXtjcl68g491829Vl2AcS70cdyl1MyL6YX0HYhHgwqQQajBc+/mpzp4qTiSEOJ0VIKnVt8a0lXzcEDR6rheeV5pjr9c6Co12uETXSkB8JLKyjvTMIwSjXqDgvL2JeXTvqnfKSZ8bhC5x49YUrBYkhiaQj0QvMLmuAt6MiVpSyWZ1bxSLlcqRH325j0D/bzUaPHmzyMi/ehc+hiqYx+dCxLT6epwpEG55ySHBs8/bVz6iBL+q0ZSOgtg0PJwEzrali/uxByciavRc3CckWuBdWjs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(6041248)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:BN4PR07MB2274; BCL:0; PCL:0; RULEID:; SRVR:BN4PR07MB2274; X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2274; 4:Ed6emeiM5BFdPAAr8woGNwu0aYW4+OVUEndmWi9/18s9UKfON2kZSe/yp0gPHUb7m/7g8LHHD4bh/B9Wwtg/r+1mOfiBxiu7A75efDeBVleVxOZ39YD0q27ljOtACQs+qTPGG7he/5bIlTtKX2q1WFTQkYeVxIVZ2VkZo2Egap7LYu+OGj3KaQJlapaXkHXfweWQB1gBPDJYnn4Pm61AqGGQSAg5TirD2U2bSavUfKnR1IMmnv5b0/vtIGZsb3VntsgWddCwHb4xZOQPdQykFGoT69VgRpWgyXRJPFyHJvlJzYP1Pid9VqTviTXmYKWHQdK422etN1djtR7CCgHBbeNAwCHY6tpf/P0ceB6lOLWTZijKiC6CdygSag6w4WEQTxrNIhrxgyz13rhXSOmMSz4wce7Bzmx8b9nnHfQTp0nGUtL6sGCA9fjcEqFHXGCdvyIGwLMHQNmL+p8ONYdzSOXJu/0m5461HkKknc6AnbolF19ZNwmqqKmmbw43ZjZ3+aa6sc8b12qL9Yj71O0DnTCTch6xewyheUf/gn17TfQhwk/etydL89gINf50BtkLwsJvPFg1M1ACj5NkevWo+uoJV9BzHMSXTXHGzuaLkdb9r953o9kMsTQVo0o912MBmjl5MdU6TdfR5VNTqf5w3/L3ae7jFzLAsxOp6/WpN+zsAZxFAqk3w3kommiR7o8rvWmKfqAtBNhCbsC31cHGTKuO2uoTCFUDH+mbbsc+lJ5vXBzuC8KAhBx83+V91vkz X-Forefront-PRVS: 0264FEA5C3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(5660300001)(7736002)(5009440100003)(33646002)(47776003)(50466002)(189998001)(4720700003)(6512007)(48376002)(5003940100001)(6666003)(50986999)(6486002)(76176999)(6916009)(42882006)(305945005)(36756003)(6506006)(2950100002)(50226002)(2361001)(81166006)(66066001)(8676002)(2351001)(2906002)(38730400002)(110136004)(42186005)(4326008)(53936002)(6116002)(3846002)(25786009)(110426004)(129583001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN4PR07MB2274; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN4PR07MB2274; 23:XG8VEs92gjEUmK20CuieLBe1XzdUgMSlZHqJ0i6ts?= =?us-ascii?Q?rqma3h/nsDA8e4tzzFCJ5iNZkPGgi+9eKHOOPejMVTBQB6Ij0LRym2LHYXM0?= =?us-ascii?Q?8CMD4a9NISrv18pkRO6UDD9On4t2nQT0aIoRn6OnNsnHPci2ErxR3zmXbCJJ?= =?us-ascii?Q?v8sRRTqI2JxHZFtVXNbIV0HKZwV8Nd0VFFvGanlVY8Owyj/cyFtaDA6+MWff?= =?us-ascii?Q?pMgSValz8XTWFSlh4kzKwF9IcD5ILar4m/0Lew7IJcO8hX9jQ/bZpMofCHcR?= =?us-ascii?Q?CBpogPZqawzB4MgiFM3i7XziOG+Eeo5nGfJLZI8wd5yt/Ik4bQYkU9/OBhPI?= =?us-ascii?Q?7MkurDXfRTZS7BeNENDmvS9l2+w0zajjU5saQzwNurxr1DEWt+1ONEosIR80?= =?us-ascii?Q?kufiPrgLMYhat0J/tzbsFmb2xa66fUEsmKSXhSfCgZPrzyCgQH6fFbH43C5R?= =?us-ascii?Q?svtU1r9vdkRUXjlhc32/+Kwh9qGQJwBj9MoHkkGxBl0e6fyiT3ah0eg6DyMp?= =?us-ascii?Q?k/M13OVZD922H0HV/kw6BGJsZ+8fWKVIWg1XO6Dew+YhlfliYkAh0i8ihXvf?= =?us-ascii?Q?XsRAs0ykStOcOJ9oroMJxFMc1hQaClQQ+HpCATA1UY5OuLs2EFs3RC4otQ5s?= =?us-ascii?Q?NGK1AdW1eeo1u+7jsoMF1jUXTlYuvXVterrsXj1cti4urizHmB8RrnJMIqAR?= =?us-ascii?Q?VAHT0JLVPH2VQeJCD+5YhAwDNea3zyB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p2d0S9RmqPZk58pLGIsLmL1FxpB7KE7bUNgKlXHw==; 24:9co6uG0SNrbo0mhIPvYsupJQuy0lR6UM8LJZ4vgw0OG+mn1os0oyPoJW7iVhuI1ltY8YJy1+BgdaEVw785fhVHiY23/oB7+CKjB4Is375Qo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN4PR07MB2274; 7:VK7LjcBqmtSZpQ0/gUektXEKzLtaV8+FhCFUAjuOAOijfzBvwI4oDACS+8plzzCGU/IDp7eIIlr+/75v1Byy0Pw9rDSEKZ217Wtc+W6pI28MqmR9KT82v6Q6yUcn4L0c1z09li990MXysX2kxiODx6cVRqwkA8QTK2bK5EP/VmmZg7yTrFS2Tf/Bf9QvWpRKaSsGRtsJ5q7Y6MyUxDh408hZIBJksBnKLtXDr68QipM4xqTy7I8wIkwdUIuzMfZEEgLms0tQAv58lCE7/51w1zAIERuTROTwG3tx3J+kZgtB8/54fvW51jDNyXRnMWtq+ktEloF225fjB7A2Cujntg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2017 15:05:38.1764 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2274 Subject: [dpdk-dev] [RFC 1/2] doc: add doc with steps to build PMD and run testpmd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 15:05:42 -0000 Add a new document with steps to build PMDs and launch a sample test application, "testpmd". It can be included in other PMD documentations or be referred. Suggested-by: Ferruh Yigit Signed-off-by: Shijith Thotton --- doc/guides/nics/build_and_run.inc | 110 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 doc/guides/nics/build_and_run.inc diff --git a/doc/guides/nics/build_and_run.inc b/doc/guides/nics/build_and_run.inc new file mode 100644 index 0000000..7d59c6c --- /dev/null +++ b/doc/guides/nics/build_and_run.inc @@ -0,0 +1,110 @@ +.. BSD LICENSE + Copyright(c) 2017 Cavium, Inc.. 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 Cavium, Inc. 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 FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER(S) 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 ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +.. _pmd_build_and_run: + +Driver Compilation +------------------ + +To compile PMD for Linux x86_64 gcc target, run the following "make" command: + +.. code-block:: console + + cd + make install T=x86_64-native-linuxapp-gcc + +FreeBSD targets should use "gmake" command instead of "make". + +For more information, refer :ref:`Getting Started Guide for Linux ` or +:ref:`Getting Started Guide for FreeBSD ` depending on your platform. + + + +Running testpmd in Linux +------------------------ + +This section demonstrates how to launch ``testpmd`` in Linux. + +#. Mount huge pages: + + .. code-block:: console + + mkdir /mnt/huge + mount -t hugetlbfs nodev /mnt/huge + +#. Request huge pages: + + .. code-block:: console + + echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages + +#. Load ``igb_uio`` or ``vfio-pci`` driver: + + .. code-block:: console + + modprobe uio + insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko + + or + + .. code-block:: console + + modprobe vfio-pci + +#. Setup VFIO permissions for regular users before binding to ``vfio-pci``: + + .. code-block:: console + + sudo chmod a+x /dev/vfio + + sudo chmod 0666 /dev/vfio/* + +#. Bind the adapters to ``igb_uio`` or ``vfio-pci`` loaded in the previous step: + + .. code-block:: console + + ./usertools/dpdk-devbind.py --bind igb_uio DEVICE1 DEVICE2 + + Or setup VFIO permissions for regular users and then bind to ``vfio-pci``: + + .. code-block:: console + + ./usertools/dpdk-devbind.py --bind vfio-pci DEVICE1 DEVICE2 + + .. note:: + + DEVICE1, DEVICE2 are specified via PCI "domain:bus:slot.func" syntax + or "bus:slot.func" syntax. + +#. Start ``testpmd`` with basic parameters: + + .. code-block:: console + + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -- -i -- 1.8.3.1