Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7699/?format=api
https://patches.dpdk.org/api/patches/7699/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1444992324-5504-4-git-send-email-alejandro.lucero@netronome.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1444992324-5504-4-git-send-email-alejandro.lucero@netronome.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1444992324-5504-4-git-send-email-alejandro.lucero@netronome.com", "date": "2015-10-16T10:45:23", "name": "[dpdk-dev,v3,3/4] doc: add netronome nfp6000 guide", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6f0457e6cc20c781596c083417f5210dd84020f5", "submitter": { "id": 270, "url": "https://patches.dpdk.org/api/people/270/?format=api", "name": "Alejandro Lucero", "email": "alejandro.lucero@netronome.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1444992324-5504-4-git-send-email-alejandro.lucero@netronome.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7699/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7699/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 46886592B;\n\tFri, 16 Oct 2015 12:45:13 +0200 (CEST)", "from ubuntu (host217-39-174-19.in-addr.btopenworld.com\n\t[217.39.174.19]) by dpdk.org (Postfix) with SMTP id 00DFE5699\n\tfor <dev@dpdk.org>; Fri, 16 Oct 2015 12:45:11 +0200 (CEST)", "by ubuntu (Postfix, from userid 5466)\n\tid 9F800E92E5; Fri, 16 Oct 2015 11:45:24 +0100 (BST)" ], "From": "\"Alejandro.Lucero\" <alejandro.lucero@netronome.com>", "To": "dev@dpdk.org", "Date": "Fri, 16 Oct 2015 11:45:23 +0100", "Message-Id": "<1444992324-5504-4-git-send-email-alejandro.lucero@netronome.com>", "X-Mailer": "git-send-email 1.7.9.5", "In-Reply-To": "<1444992324-5504-1-git-send-email-alejandro.lucero@netronome.com>", "References": "<1444992324-5504-1-git-send-email-alejandro.lucero@netronome.com>", "Subject": "[dpdk-dev] [PATCH v3 3/4] doc: add netronome nfp6000 guide", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: \"Alejandro.Lucero\" <alejandro.lucero@netronome.com>\n\nSigned-off-by: Alejandro.Lucero <alejandro.lucero@netronome.com>\nSigned-off-by: Rolf.Neugebauer <rolf.neugebauer@netronome.com>\n---\n doc/guides/nics/index.rst | 1 +\n doc/guides/nics/nfp.rst | 270 +++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 271 insertions(+)\n create mode 100644 doc/guides/nics/nfp.rst", "diff": "diff --git a/doc/guides/nics/index.rst b/doc/guides/nics/index.rst\nindex d1a92f8..596ff88 100644\n--- a/doc/guides/nics/index.rst\n+++ b/doc/guides/nics/index.rst\n@@ -48,6 +48,7 @@ Network Interface Controller Drivers\n virtio\n vmxnet3\n pcap_ring\n+ nfp\n \n **Figures**\n \ndiff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst\nnew file mode 100644\nindex 0000000..57b34c6\n--- /dev/null\n+++ b/doc/guides/nics/nfp.rst\n@@ -0,0 +1,270 @@\n+.. BSD LICENSE\n+ Copyright(c) 2015 Netronome Systems, Inc. All rights reserved.\n+ All rights reserved.\n+\n+ Redistribution and use in source and binary forms, with or without\n+ modification, are permitted provided that the following conditions\n+ are met:\n+\n+ * Redistributions of source code must retain the above copyright\n+ notice, this list of conditions and the following disclaimer.\n+ * Redistributions in binary form must reproduce the above copyright\n+ notice, this list of conditions and the following disclaimer in\n+ the documentation and/or other materials provided with the\n+ distribution.\n+ * Neither the name of Intel Corporation nor the names of its\n+ contributors may be used to endorse or promote products derived\n+ from this software without specific prior written permission.\n+\n+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+NFP poll mode driver library\n+============================\n+\n+Netronome's sixth generation of flow processors pack 216 programmable\n+cores and over 100 hardware accelerators that uniquely combine packet,\n+flow, security and content processing in a single device that scales\n+up to 400 Gbps.\n+\n+This document explains how to use DPDK with the Netronome Poll Mode\n+Driver (PMD) supporting Netronome's Network Flow Processor 6xxx\n+(NFP-6xxx).\n+\n+Currently the driver supports virtual functions (VFs) only.\n+\n+Dependencies\n+------------\n+\n+Before using the Netronome's DPDK PMD some NFP-6xxx configuration,\n+which is not related to DPDK, is required. The system requires\n+installation of **Netronome's BSP (Board Support Package)** which includes\n+Linux drivers, programs and libraries.\n+\n+If you have a NFP-6xxx device you should already have the code and\n+documentation for doing this configuration. Contact\n+**support@netronome.com** to obtain the latest available firmware.\n+\n+The NFP Linux kernel drivers (including the required PF driver for the\n+NFP) are available on Github at\n+**https://github.com/Netronome/nfp-drv-kmods** along with build\n+instructions.\n+\n+DPDK runs in userspace and PMDs uses the Linux kernel UIO interface to\n+allow access to physical devices from userspace. The NFP PMD requires\n+a separate UIO driver, **nfp_uio**, to perform correct\n+initialization. This driver is part of the DPDK source tree and is\n+equivalent to Intel's igb_uio driver.\n+\n+Building the software\n+---------------------\n+\n+Netronome's PMD code is provided in the **drivers/net/nfp** directory and\n+nfp_uio is present in the **lib/librte_eal/linuxapp/nfp_uio** directory. Both\n+are part of the DPDK build if the **common_linuxapp configuration** file is\n+used. If you use another configuration file and want to have NFP support\n+just add:\n+\n+- **CONFIG_RTE_EAL_NFP_UIO=y**\n+\n+- **CONFIG_RTE_LIBRTE_NFP_PMD=y**\n+\n+Once DPDK is built all the DPDK apps and examples include support for\n+the NFP PMD. The nfp_uio.ko module will be at build/kmods directory or\n+at the directory specified when building DPDK.\n+\n+\n+System configuration\n+--------------------\n+\n+Using the NFP PMD is not different to using other PMDs. Usual steps are:\n+\n+#. **Configure hugepages:** All major Linux distributions have the hugepages\n+ functionality enabled by default. By default this allows the system uses for\n+ working with transparent hugepages. But in this case some hugepages need to\n+ be created/reserved for use with the DPDK through the hugetlbfs file system.\n+ First the virtual file system need to be mounted:\n+\n+ .. code-block:: console\n+\n+ mount -t hugetlbfs none /mnt/hugetlbfs\n+\n+ The command uses the common mount point for this file system and it needs to\n+ be created if necessary.\n+\n+ Configuring hugepages is performed via sysfs:\n+\n+ .. code-block:: console\n+\n+ /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages\n+\n+ This sysfs file is used to specify the number of hugepages to reserve.\n+ For example:\n+\n+ .. code-block:: console\n+\n+ echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages\n+\n+ This will reserve 2GB of memory using 1024 2MB hugepages. The file may be\n+ read to see if the operation was performed correctly:\n+\n+ .. code-block:: console\n+\n+ cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages\n+\n+ The number of unused hugepages may also be inspected.\n+\n+ Before executing the DPDK app it should match the value of nr_hugepages.\n+\n+ .. code-block:: console\n+\n+ cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages\n+\n+ The hugepages reservation should be performed at system initialisation and\n+ it is usual to use a kernel parameter for configuration. If the reservation\n+ is attempted on a busy system it will likely fail. Reserving memory for\n+ hugepages may be done adding the following to the grub kernel command line:\n+\n+ .. code-block:: console\n+\n+ default_hugepagesz=1M hugepagesz=2M hugepages=1024\n+\n+ This will reserve 2GBytes of memory using 2Mbytes huge pages.\n+\n+ Finally, for a NUMA system the allocation needs to be made on the correct\n+ NUMA node. In a DPDK app there is a master core which will (usually) perform\n+ memory allocation. It is important that some of the hugepages are reserved\n+ on the NUMA memory node where the network device is attached. This is because\n+ of a restriction in DPDK by which TX and RX descriptors rings must be created\n+ on the master code.\n+\n+ Per-node allocation of hugepages may be inspected and controlled using sysfs.\n+ For example:\n+\n+ .. code-block:: console\n+\n+ cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages\n+\n+ For a NUMA system there will be a specific hugepage directory per node\n+ allowing control of hugepage reservation. A common problem may occur when\n+ hugepages reservation is performed after the system has been working for\n+ some time. Configuration using the global sysfs hugepage interface will\n+ succeed but the per-node allocations may be unsatisfactory.\n+\n+ The number of hugepages that need to be reserved depends on how the app uses\n+ TX and RX descriptors, and packets mbufs.\n+\n+#. **Enable SR-IOV on the NFP-6xxx device:** The current NFP PMD works with\n+ Virtual Functions (VFs) on a NFP device. Make sure that one of the Physical\n+ Function (PF) drivers from the above Github repository is installed and\n+ loaded.\n+\n+ Virtual Functions need to be enabled before they can be used with the PMD.\n+ Before enabling the VFs it is useful to obtain information about the\n+ current NFP PCI device detected by the system:\n+\n+ .. code-block:: console\n+\n+ lspci -d19ee:\n+\n+ Now, for example, configure two virtual functions on a NFP-6xxx device\n+ whose PCI system identity is \"0000:03:00.0\":\n+\n+ .. code-block:: console\n+\n+ echo 2 > /sys/bus/pci/devices/0000:03:00.0/sriov_numvfs\n+\n+ The result of this command may be shown using lspci again:\n+\n+ .. code-block:: console\n+\n+ lspci -d19ee: -k\n+\n+ Two new PCI devices should appear in the output of the above command. The\n+ -k option shows the device driver, if any, that devices are bound to.\n+ Depending on the modules loaded at this point the new PCI devices may be\n+ bound to nfp_netvf driver.\n+\n+#. **To install the uio kernel module (manually):** All major Linux\n+ distributions have support for this kernel module so it is straightforward\n+ to install it:\n+\n+ .. code-block:: console\n+\n+ modprobe uio\n+\n+ The module should now be listed by the lsmod command.\n+\n+#. **To install the nfp_uio kernel module (manually):** This module supports\n+ NFP-6xxx devices through the UIO interface.\n+\n+ After compilation the module should be in the build kmod directory or\n+ wherever the build directory is configured.\n+\n+ .. code-block:: console\n+\n+ cd build/kmod\n+ insmod ./nfp_uio.ko\n+\n+ The module should now be listed by the lsmod command.\n+\n+ Depending on which NFP modules are loaded, nfp_uio may be automatically\n+ bound to the NFP PCI devices by the system. Otherwise the binding needs\n+ to be done explicitly. This is the case when nfp_netvf, the Linux kernel\n+ driver for NFP VFs, was loaded when VFs were created. As described later\n+ in this document this configuration may also be performed using scripts\n+ provided by DPDK.\n+\n+ First the device needs to be unbound, for example from the nfp_netvf\n+ driver:\n+\n+ .. code-block:: console\n+\n+ echo 0000:03:08.0 > /sys/bus/pci/devices/0000:03:08.0/driver/unbind\n+\n+ lspci -d19ee: -k\n+\n+ The output of lspci should now show that 0000:03:08.0 is not bound to\n+ any driver.\n+\n+ The next step is to add the NFP PCI ID to the NFP UIO driver:\n+\n+ .. code-block:: console\n+\n+ echo 19ee 6003 > /sys/bus/pci/drivers/nfp_uio/new_id\n+\n+ And then to bind the device to the nfp_uio driver:\n+\n+ .. code-block:: console\n+\n+ echo 0000:03:08.0 > /sys/bus/pci/drivers/nfp_uio/bind\n+\n+ lspci -d19ee: -k\n+\n+ lspci should show that device bound to nfp_uio driver.\n+\n+#. **Using tools from DPDK source to install and bind modules:** DPDK provides\n+ scripts which are useful for installing the UIO modules and for binding the\n+ right device to those modules avoiding doing so manually.\n+\n+ In the tools directory of the DPDK source there are two scripts:\n+\n+ * **setup.sh**\n+ * **dpdk_nic_bind.py**\n+\n+ Configuration may be performed by running setup.sh which invokes\n+ dpdk_nic_bind.py as needed. Executing setup.sh will display a menu of\n+ configuration options.\n+\n+\n+\n+\n", "prefixes": [ "dpdk-dev", "v3", "3/4" ] }{ "id": 7699, "url": "