From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0071.outbound.protection.outlook.com [104.47.33.71]) by dpdk.org (Postfix) with ESMTP id 3855E69F7 for ; Tue, 11 Apr 2017 20:59:59 +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=rEXnuOxx2UqnXLu8Py3yHxJpasbDUUx5ddMqbY+/Ens=; b=iUJ8S4CTK2uYJgMkiGfYIMMYRpk88Bg1Oxe8EvR/D4V9qbRKfCHnaQS1m0kC5n86kGGfPBkcqs5oomFfRrZOgDrT76TU3QTW3SjQJa5L7uHefCjxpOZ+NTBiIyDldm7kAvWw/TtVC5Gu4LrkYnYRNKZI2pkJOIyoffNG2SeuD3o= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by DM3PR07MB2284.namprd07.prod.outlook.com (10.164.33.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Tue, 11 Apr 2017 18:59:56 +0000 From: Shijith Thotton To: Ferruh Yigit , John McNamara , Alejandro Lucero Cc: dev@dpdk.org Date: Wed, 12 Apr 2017 00:26:48 +0530 Message-Id: <1491937010-16553-9-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1491937010-16553-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1491465117-11252-1-git-send-email-shijith.thotton@caviumnetworks.com> <1491937010-16553-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: MAXPR01CA0027.INDPRD01.PROD.OUTLOOK.COM (10.164.147.34) To DM3PR07MB2284.namprd07.prod.outlook.com (10.164.33.158) X-MS-Office365-Filtering-Correlation-Id: 95874394-4e30-46ad-76b9-08d4810cf2b2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DM3PR07MB2284; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 3:3PdNMqGtQGxG8LZaMKF/cWYAhrd73SPNpDmio135y8BFdY4hKD5k2cwDM6RxumAMZgr2erNWVSLGdYpOHoGBta3TtUOpd1w22zTkSD9T2c3Kmkec5ul7QSpSnZ5E2/S1IRTNt+tpyTk3swoKmcwrSsTDcljYBs4azPSSNz1H2g45+FfE6kY2nhRsxlNXwMvf/IQUmIOqBJO5wgELvLP8/uePHAb5gOTkyCzZEHKNeJeQG9ve/7SHW6BOAEB4FqDRNWmnfu2gx3cYYk89vpAGbPCCztLjRFY6F8j/MJlsLDipRcPUvNHp8HcZgnOx+O3H/9Gj1NnStujkSlPiAmnQ0g==; 25:dybQrPMnlxsu+t7ssmnXhS5eTTmbCaFBzfqMjIKPSX+ucXMjy2FcTAIarwaayTdG698q4WBHdbBwquTpD1nvcQg1UjZ+QAZePllo4hrdLdyKvz9VeSDhmWmOe4aR0kMQ9AtmY6OgY1dEAatPcQqJzdFosewDgMZCvZPkAzVIU1l7xAZmtLueT0jyOTPownpTrFhX6dLETT1IHcKJ1cywnmlI4g8W7LrJI5XwJLrqv4w50EmzeQKxuYBB0aui80hTjjFDxqRA03tsZxMEn/D52aCbtVjvxWYjZgUlI5/7BA+gPyL/Y47EWbjsaNy5FmLb2xPbo3JCUYNXIuUNVCrzqQ8eL4OEv+s9KOioOM8xMXR11pSVIG76GF/vj5XvWY3qRogsx+rx8fWXlfgkUMGte+Cp3a0qlHMajUoqz7XCDJ6WHYTrKi2T0jnFZiuN+7hrFM4gd32d6EKC5+g4PG1O7Q== X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 31:IVbF18KnCY2DT4lDuN8PO1kcPIzwNTeW/BMnPPQKdSs6JoKEZfxHj9DNFyxD4B4ZqD2Oc7wQYxQcsBbHZ0ry9PiPRld1Ldv6AM8sliQ3SxWKqtkMGA8tSmGlikP6FYFDSc3KPSEMhjqsG2+HM31LKKf7g3D5mOnPOu/zEAxj1WbgRUiVImSXBaZQhQ0AgpR1GLuVvE4/qdqQQSMue3TZo9Gx9Jj76aKFDWLfHdAa1zoChvwaHRx6X07KIS+d1Lk39j2+RvR4BDBLFvmeQqOdJQ==; 20:CCLrzBTKJfi51b3NC8xqM7GlOaGg8HDxQv8kb269eq8zsyzOGfAQ6kdUio2wVT/zrDWTJNrRgKP3y/p84AMNgR9x/O9O/M0/uKCvFxqDuDk93wggOX8qHqdHLkRCluka0gDIvcCoW3T+uztvpJEPWvVyphw+wwemkYoehsgKofCxVWvonEeMWweJnhS95+syHFUMEDn5o+qInKyKSTzbKX58gtSXLZmcJdCmQYjDuiQua4DRvDpjw87B26X4gnrQn7/QDqXTDsgNmtm5/48Lev9jBps/3MYCMu3V15SHnwZcoxO1lGraJZaQXXzEAbRJswZF7Vyvdf1bKgmaz7bykDk52A80Zpszlhu4h0pJfYIVYeg+HoPvMiTyj2xYUOgAFQYwCDKEPmQ6c95YDfuY79+tHd8cO2JtUjfCFLx4dXKEXqbvnlXdiMj0+pLtYzE44vZcUjozpulL9qbW5bV/N4xPuFhNhJyhGHP2PT+0v3Jzy9f6bNkzBnfrcBK7OyJhgpiPvXNkYzlR7lToRjnK+c0sIAjCvTOMW5fSIAP41NzQPtdQVg84escEN9Zq02jD5xWZ+3wubbmMCTz2RQUZBifkYevPGwbsKn8wkSDzaKk= 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)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123564025)(6072148); SRVR:DM3PR07MB2284; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2284; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 4:dkb0V3jdMeHRr92dDUpdcy7aCEqd5qqQyJJyhCjztAqTXZKPtn9UcMpjj4cM/c2MLBi5NQrtAlE8FJop6pQyXapyTp7cVRDknm/rMne5oxnHkKTa4YEnIScaeuiB97lCSf42wcVe8YQNJ8Rszpkco0M/zJrfBr5K549ILCkXrFjU4pi/fxODc9TfSv4h562FzJ+cm4EYMouaG4SIBO+OpZ7YYhWlhMsmFJrM81HISmckkwpCTLTgJmKK/BGmYxay6kQtQtElDo5PfyflGrqxg7nT+PfrRUtEfewk+uxUXGam4VbAjHWDDtd9fB1JiWeIfgCm2NuzD1rzIuzzcFizud8tzROz/FQW4oAZKydxPkVW32KIq6ltiGIA+1EdjytBS4urvYOBsoA7Y5paWssJ7FSmFXhKBltpBa4pyPwPYuJqbOI/m2YFU7R1y4+WRb//auTNj6y3B29WLvrz3WwYvZphnPQRo/xHJOcbUXgCld2WdW9YB8xl7t3eZRocFoBjMPC89WSmnLYpD6OEBZyRSXE1Bl+xvuDdZkTc54SNqwvTV+C+zLpowJBERESZ5gq2BxO20DE6c4zdV6RbZVkc+QUX2+TIsMmq43krC3Qr0ptK8QT3PZUIVExO1vohYGWW7UFwI2pfHxh1KXuGhhcG9wL/dVByXQ2sL7+XQ+yym5BVhDtmrXj1AXmI7sNcfZyNxKq0RshanpoEvytYfa2gapt/peTsrcoDTWPXxIxo9ITqUoGGvSMukk1VKHLWt1Me X-Forefront-PRVS: 0274272F87 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39850400002)(39400400002)(5660300001)(5890100001)(6506006)(5003940100001)(66066001)(2950100002)(25786009)(42186005)(3846002)(6116002)(47776003)(6486002)(4720700003)(42882006)(6666003)(33646002)(5009440100003)(189998001)(305945005)(50466002)(81166006)(8676002)(36756003)(2906002)(6512007)(53936002)(4326008)(7736002)(38730400002)(48376002)(50226002)(76176999)(50986999)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2284; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2284; 23:axqKWPYni37RLcND49ypFhd0Rm+oY9cbeZ14iy6ly?= =?us-ascii?Q?HwqjIDwq7hiuIQLGRoZ0AicetuQcXDxR4ohujtPv7fc3dkcBjzqFKY4qwNek?= =?us-ascii?Q?YynBpCAmE0uXnwjc207OX4UiyYjbkIs9fNkh9XcSo18gEl32z/SlW8NZFe5L?= =?us-ascii?Q?cyUj1ISC7lz/tXipAiZNZdvt0hWliT3vRwsXWRvNLKp+ZCdY4+u4RjbgB/VJ?= =?us-ascii?Q?jkcWa72qM9/lDwmbF2ZeNlUoQMZmYUoCq+km+EfMrcbNG4JlaBwzbi+GHE0O?= =?us-ascii?Q?R2qqqPk0o3Wt6d8V8eq6rfmGPGq0AZ1V9YQi3CVvrdnkn5IymTSikJt+RhYG?= =?us-ascii?Q?R5dei2Zeir2KXwBfLIJHJ5gcCkxAcEygjVZUN7PPhChc8j//FIe8pRIax5MI?= =?us-ascii?Q?KIYd6nSFSS903WRtwkeegsjPxKo+GbYKbJqlWTaxmdnY+ncSgyoTL/sfcFD/?= =?us-ascii?Q?E6H/LvrwnjMCWvH7Z0qdoXe3UyLpXwDLwgUTeaiC3Aq//o013J1GBL4KygE9?= =?us-ascii?Q?ZuKXrCufI5C3zvYfN+qvW2hWh9Mm3HMFq3tSPIoReTKuOp69tqWmlLhFvCtk?= =?us-ascii?Q?gDE0NL4Vf8XfK2ompGA0VG+tLzeabMQH1RoWP30urZ8kqjWvxuWgQa7In08W?= =?us-ascii?Q?/++5Wfu1PpIplbfg8Sj7pgHvbtVlRjtP9iZFGSARqa+VecdkXWA9gD36tw2K?= =?us-ascii?Q?uPaQO2e+lwgK1XGuVoDPzjSvcjrFqkGjYj6hKhoLCUtpipj7hv1dLFnK2ajK?= =?us-ascii?Q?tJwyinEhRex2psxb7431efBuilsa6WfBSNrDUPCS1GHJe1wZZU70TMjwwz7J?= =?us-ascii?Q?RHg6LSSSBDYThu3phAlyeGfxycRzVt6wOvmLkDsBtYxWn/mv5AYr19AkFV3e?= =?us-ascii?Q?aNU4J8/jeEJ1qcThy60njSGiyKqHxL3OUDVFtHaFgPtlHuRdJU7nTVowVc44?= =?us-ascii?Q?+72Y35v3UX+p89z/v0/4c8MHcvOsheDwyUFET0R02S0qbjcbnHIZpZU7o3sX?= =?us-ascii?Q?imsYGfwAz0y5fTtrVWKT68JwDg6LfT3CNKDv6+v8Dk3qnob9czRBxgS4uc2C?= =?us-ascii?Q?P9qWimNxVq/qsen2BI/i2REerKP?= X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 6:UOvZlBlxKfo5gDZIPnvE0n837/L/pS5U5Qzt5/EhnqcXJ5IUowSeVdDdwtkSGO2q4SU/qs40+N3a1828BKYMTxAig17B/IAXTkqb82/Az27WTvpe2V1ks9NRUWqM6ageTf0885voq/5MfUwTXlFY7K27Qp95epW39dS44snfHLL23pUb3nKrmJgIf8xeNqwBNj5G9NylxNdkIh9uiqQUidd8RKju4ZJ5CexPRY9J1kofyFaZfp4i2+kzK5ueC4WkCpncTElQCtAABBk0SssYjyAVRtzR6we+6pk43FGGsBzCUIXQkL4WyTQgaIwf/BCX2wa/jQLQ+Ze0ByPDCBcyqrK2DcRIGiruXB3elizBMKU7UEmHbw/TZJKUILu1AgKQwGfzRp/n5pHh/CYrIStmoGR2QkJBnwcamrMxvsIZlHGDXTWsIZMB1KAHZ8nX+7scUDJbaRV27zd5Y9WTWMwE9A==; 5:de1RsIMsYpOsAxSBCe5guPvj/rSTaU/WY3Mlsb5JhgO7giWDXig5Jg5QmeppAaBmydpyOHdo294KWyU1O0u7uhsZxVy/WVZysEOCfH9nodU4jLOUKqcM1hsnMeRCGYVg3zi91xF9kYh/AFC5Gvf3uQ==; 24:p72itIL9sbFUkySCL5Dkc5D+gtJ5nN6wHilUqis7/OavmwL4w32X65G+rYPQrzOs7w/okUSN7ePfE53xBGfFy15Ndvfq3wWg17y7bm6RfMg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 7:swKNHGN07DJMARthuYJFtaAAYVrBWV5ww6WjWdsgZ1mSZaRus8S5nKtZpLLy0W6vVpzPFkWtRNWWnXZDa4e6+EZoEE/AdrwN7z7hTG2hsBmVwzAdCuncVpwx2/Ar4xBMApWoseRHiUKSJ2VUCnPp6TYBngfm0zxFGkyJGFiWxt1Cbb9+cbT8T9TSDvVg9Wb9Mcfet2yH+GSbDe0sZ7XM+uQP5Z0yaORqNsaZPWwPyyBfCKyzAh6u3eBCICGZty1QZOhFFb+lXavAHKy8sXsC1YvcWs4enYwhhiVPDylh3I2OzXs6hKQ1R+qkprmNs/aB41sfof1OuMjxqNUx+EKeRA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2017 18:59:56.2082 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2284 Subject: [dpdk-dev] [PATCH v2 08/10] doc: refer PMD compile and test section from nfp doc 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: Tue, 11 Apr 2017 18:59:59 -0000 Refer the section which explains driver compilation and running of testpmd in Linux, instead of describing it in driver documentation. Signed-off-by: Shijith Thotton Acked-by: John McNamara --- doc/guides/nics/nfp.rst | 141 +++--------------------------------------------- 1 file changed, 6 insertions(+), 135 deletions(-) diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst index b643e5b..c732fb1 100644 --- a/doc/guides/nics/nfp.rst +++ b/doc/guides/nics/nfp.rst @@ -81,85 +81,15 @@ Once DPDK is built all the DPDK apps and examples include support for the NFP PMD. -System configuration --------------------- - -Using the NFP PMD is not different to using other PMDs. Usual steps are: - -#. **Configure hugepages:** All major Linux distributions have the hugepages - functionality enabled by default. By default this allows the system uses for - working with transparent hugepages. But in this case some hugepages need to - be created/reserved for use with the DPDK through the hugetlbfs file system. - First the virtual file system need to be mounted: - - .. code-block:: console - - mount -t hugetlbfs none /mnt/hugetlbfs - - The command uses the common mount point for this file system and it needs to - be created if necessary. - - Configuring hugepages is performed via sysfs: - - .. code-block:: console - - /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - - This sysfs file is used to specify the number of hugepages to reserve. - For example: - - .. code-block:: console - - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - - This will reserve 2GB of memory using 1024 2MB hugepages. The file may be - read to see if the operation was performed correctly: - - .. code-block:: console - - cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages - - The number of unused hugepages may also be inspected. - - Before executing the DPDK app it should match the value of nr_hugepages. - - .. code-block:: console - - cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages - - The hugepages reservation should be performed at system initialization and - it is usual to use a kernel parameter for configuration. If the reservation - is attempted on a busy system it will likely fail. Reserving memory for - hugepages may be done adding the following to the grub kernel command line: - - .. code-block:: console - - default_hugepagesz=1M hugepagesz=2M hugepages=1024 - - This will reserve 2GBytes of memory using 2Mbytes huge pages. - - Finally, for a NUMA system the allocation needs to be made on the correct - NUMA node. In a DPDK app there is a master core which will (usually) perform - memory allocation. It is important that some of the hugepages are reserved - on the NUMA memory node where the network device is attached. This is because - of a restriction in DPDK by which TX and RX descriptors rings must be created - on the master code. - - Per-node allocation of hugepages may be inspected and controlled using sysfs. - For example: - - .. code-block:: console +Driver compilation and testing +------------------------------ - cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages +Refer to the document :ref:`compiling and testing a PMD for a NIC ` +for details. - For a NUMA system there will be a specific hugepage directory per node - allowing control of hugepage reservation. A common problem may occur when - hugepages reservation is performed after the system has been working for - some time. Configuration using the global sysfs hugepage interface will - succeed but the per-node allocations may be unsatisfactory. - The number of hugepages that need to be reserved depends on how the app uses - TX and RX descriptors, and packets mbufs. +System configuration +-------------------- #. **Enable SR-IOV on the NFP-6xxx device:** The current NFP PMD works with Virtual Functions (VFs) on a NFP device. Make sure that one of the Physical @@ -191,62 +121,3 @@ Using the NFP PMD is not different to using other PMDs. Usual steps are: -k option shows the device driver, if any, that devices are bound to. Depending on the modules loaded at this point the new PCI devices may be bound to nfp_netvf driver. - -#. **To install the uio kernel module (manually):** All major Linux - distributions have support for this kernel module so it is straightforward - to install it: - - .. code-block:: console - - modprobe uio - - The module should now be listed by the lsmod command. - -#. **To install the igb_uio kernel module (manually):** This module is part - of DPDK sources and configured by default (CONFIG_RTE_EAL_IGB_UIO=y). - - .. code-block:: console - - modprobe igb_uio.ko - - The module should now be listed by the lsmod command. - - Depending on which NFP modules are loaded, it could be necessary to - detach NFP devices from the nfp_netvf module. If this is the case the - device needs to be unbound, for example: - - .. code-block:: console - - echo 0000:03:08.0 > /sys/bus/pci/devices/0000:03:08.0/driver/unbind - - lspci -d19ee: -k - - The output of lspci should now show that 0000:03:08.0 is not bound to - any driver. - - The next step is to add the NFP PCI ID to the IGB UIO driver: - - .. code-block:: console - - echo 19ee 6003 > /sys/bus/pci/drivers/igb_uio/new_id - - And then to bind the device to the igb_uio driver: - - .. code-block:: console - - echo 0000:03:08.0 > /sys/bus/pci/drivers/igb_uio/bind - - lspci -d19ee: -k - - lspci should show that device bound to igb_uio driver. - -#. **Using scripts to install and bind modules:** DPDK provides scripts which are - useful for installing the UIO modules and for binding the right device to those - modules avoiding doing so manually: - - * **dpdk-setup.sh** - * **dpdk-devbind.py** - - Configuration may be performed by running dpdk-setup.sh which invokes - dpdk-devbind.py as needed. Executing dpdk-setup.sh will display a menu of - configuration options. -- 1.8.3.1