From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0051.outbound.protection.outlook.com [104.47.34.51]) by dpdk.org (Postfix) with ESMTP id AF7EBD22E for ; Thu, 6 Apr 2017 09:54:52 +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=xxqk/ujfu0i61v1eFglCWnSeER3gz/3mSOU0B97/BvQ=; b=S0fTSs3UxuPsEwGEH3BpG1fLsdNsoiONlEnoTjdSCjwl5PuvhvKWRP+eJr+XIPqj9HenIf37uGMSyifP602Y1iWoHgZGCktySzdxOea7KsYFtuXLKdGfm0InNVHKC8XwFAYV3mEW091jNBwPXhriDNddu1SFmXYb9eAZhqUVCdA= 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.1005.10; Thu, 6 Apr 2017 07:54:49 +0000 From: Shijith Thotton To: John Mcnamara , Ferruh Yigit , Alejandro Lucero Cc: dev@dpdk.org Date: Thu, 6 Apr 2017 13:21:56 +0530 Message-Id: <1491465117-11252-8-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1491465117-11252-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1491059040-20647-1-git-send-email-shijith.thotton@caviumnetworks.com> <1491465117-11252-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: BM1PR01CA0027.INDPRD01.PROD.OUTLOOK.COM (10.163.198.162) To DM3PR07MB2284.namprd07.prod.outlook.com (10.164.33.158) X-MS-Office365-Filtering-Correlation-Id: d661d924-60e6-4be2-14fb-08d47cc2341b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DM3PR07MB2284; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 3:9SHwmnh/lNbjsveTsWSxrc6gQHgG0xrSNFfveCHCIeqUX3dHByxy5JMvNHSBOakFXwrUQsGSbY1IIb2NJYVp2dGBs8Ot1JegRndnSrus9wDBjtsXXuq7xp8oi5v6dlpi2/MZCRjAFYLSFZjp5fjRTSicsnp+oyHHDnE9/HvFDIyeZH66wRL2h1SE8GDgX/R41oVeMDa6nHwRcRi0fVxHoZoLqIyCIi8TFtdljMNkakU66hS+Umj0832B1x8kYCvl0ti3dzH/scLNX+IMlF/OviVIooIfUwKrMDjY/a4Ly0hYNhEecHFFU9YQfzPlQO2aQJDjQPgxC0zpJzxZ8hN7vQ==; 25:wnf3rACT5cCz1Ku1l5soqOYXNOknS1BGwwhWGgXJmEjbdsp6sA8rQdkjXDuB+52eZ7loJlsE0T4M9QQultwmv4ADeMtw6W55FJEIsAK8Z26WH50/Z3nd1PeaXQZU22kk40GF3dpiTfBBOxtLDXTaRveraqAxHhtxOicIg6X+OYcps7WVr+TJODlkNnGF/BlUX5pGS9ox5mxyXHdrlyGRoo/RgCXGbHJO3deEstZB/El7pyRNMLqKyUH61QT9LL4wsIvT13vsrzNqjeQULzYJn814QSH2HsqsvcpgmWjEWg+76ePMgjMXqSF2U36aoSnQgsMiwgqdJhFZwzihDWqDQaOgP1JfBbngcjHuXZpVJtPPj1IHXE9qm5AKv4wmDJeDrahCGhusAkCKAHrX1/F5xdU1Po2cefuligkQ0fKNby2oHc8l9vTJ3lOPnY0LwYJ3777SBzeKHmpCIiAWSzCdIw== X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 31:6gCMvO4pyuYATzCKa2Af+a2xR4xf+Qdd2EkjstuIs8i+MikrqH/9CDBS25LwoFObdrbs4mn8tur2ebLFVBecheeZllX5/i/eX+25e+MMu31UV8zHZEhKakfYM+yxThorXU+goIPV1Jsd0+y6uJnwh6HnI1ErkAiHFcQQi30qOEfjsFeR3azFrPKrfz4UP3VURaaaTsQZDG4XahghD0yitnT6BNDn1+GiIzvScOOoiiZ0A+KU5EVOJPdGQk7+o/6Hqp+VCjm5rRXkY+0Ydl/mhg==; 20:FL2p6NHJkI73rhyx+niqMXDDCY05+0h4XMheSufWl7V7MY3Uac3vVV/3v1WAVEOGnk0wm8Yx6xIVISYUTlRa6wXgSnNVcAuuJpxnN6GO5gvmNRBjFXjfydlmWrN60HOEEtl63x68lUULllQ+0DtFKy2ryv1/Qfcttg6j3C0ySYWMOBygQ64id5D4z82N4ffblOqjJ/Beu5jRgvLgI4hr6vB2xXfQvp1UzIo8zhL8E2NNg2W790mE/yWxLcmB3fPvBniBRDmHvKautCRhkJpd9WFYkxolzS1wl9U3IUtDlAbjvPQty0/DNRULElOiwt3/VhyHuQzL27VddIUAzhYQADBv20SF5O8fRRB1t7/8W5JKqxZ01KumDeJaXyZxtlMO+KLaksoOGs3Pca9atyVueCWKDlPPcX3OEy3vFtjzL8rUuMvZkkqItVZfBseDx0Pni0YhZiWMLFZSlTs9Z+EiEMnuuN6Cm/bIpeZi3OiZ0ucD3FkfMcayHfbUhWJRV7QluX32SIqnWZDS66AqDiUXkl8Qnu/95tXLGPo+a3MGt3nqhembZ4/Y17rvo6jMUVVBQEWjILczaSD3segaB1bo61rUjDBQesAC9j3vRzVUCi4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3002001)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:DM3PR07MB2284; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2284; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 4:h0zL0fvVmgzvODgZ7HBMzwvWMfZwcRtvIDbsnnI8YQ7Dym90ZkTKPchwncpssUZoN9B5eNQ2qwvvWguKuno/RNw10Ofjxly4wA9By1swC9iA5RnH6fgfj9C7IDDr/ejoSRgE+4hR6++moVuQMEh2+nryS95wp3NHZrwg469K7pVTjXHHmK3qm/DZgwZs4dr3JyGj6SqDarosNFDwiAluYEPIUJ0wf/HwogP2kngjlgxYrzujScWlHYvQ/issfkcTAgJ2427/cEOiJboJjw4iWoASLMzm64zknxV18h9Ih6TIrJWte1i7JiKd5WiCICjdhMBsBwGm89FAJLdOU9BJuDW1lVsl9mtKL233f70Q+av2BT7oO1zhPyFtzFfjzI1ZtSSojpBl6MgTjd359xP4IbVgnR3DHLsCJPqrhtcwVMUrrIZO8z42rO/UXAdrR+Es2v1oulEEVjLWIiUB7UQCQdTUATS0xuC4sZzFHo4/u1khcBX8QVbru4Dc+qk7YbkF+oh2SOg9zdJBGBdn2s9n0DdIkz0JL3loczxdywUTC1VKFzuTU/aVbBYa6aZVu48qp+EUqk6WEaBCrxDiBqOOJmNaRG9X0mcvzu3eeZmmOaGf7aAfK+RIwC9yppuif1PiNOx1DlahCgVnrklgJRbhb6UpkAvUOo4eGbA/cxLw7YblOXpM++Zb+yQmbjnCUzq4 X-Forefront-PRVS: 02698DF457 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39450400003)(39400400002)(39850400002)(39410400002)(50986999)(76176999)(5890100001)(36756003)(50226002)(48376002)(6506006)(6512007)(4326008)(47776003)(53936002)(6666003)(25786009)(66066001)(50466002)(42882006)(2950100002)(4720700003)(38730400002)(6486002)(6116002)(5660300001)(3846002)(33646002)(5003940100001)(2906002)(7736002)(305945005)(5009440100003)(8676002)(189998001)(81166006)(42186005)(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:sMcspKqx+KWcVhHdEXVIXRhwlNBEgGvVukJeRRHtT?= =?us-ascii?Q?nzrEcYbf1AVUsWIcudYqhYIjOO/JCk0EFaWlTywJ0Ggp1uC3p0VvhUVl2iPm?= =?us-ascii?Q?VZeB1BT4ERLaVLInyX7yDrvY8Nr5CsP3HQWoJkWifh4ShV6r/y3m72PRGwzj?= =?us-ascii?Q?BVf99fjzof76Mf9sEqhiQ85DOOCzvKC26jQQKTvOet2pR/wqJAqOHgClHYuI?= =?us-ascii?Q?QgdhIT3K1azaKyINehjYE0K0DKD6dU7VT+MxRdv/9nSHOE0aZDCraYRxa4ss?= =?us-ascii?Q?Hb+jR/JhelGlR3+3dzVwgvgehRWCCzh4q89JyHlP1/l7WBghX3pBaXaZI0sb?= =?us-ascii?Q?zT+d0k0vq++M+yGFydCQirzOI54ULazAjk/LXvqUWLcjmz0Dii7jk8Xuh7/O?= =?us-ascii?Q?YDts0veZInVVXeM5bZ0861uFNub+LTD75/IhCnlA+uLEgAWj7IHO2ETp2SAt?= =?us-ascii?Q?VJ8aZVlOr1eWXtJsxgeplSXc2qRKlk5+sEeg9/LvdTFSittg7StajOpl8GKx?= =?us-ascii?Q?W1cjmI6/X11pnzbhltI4pdWuHI8wG+A6hZ+oxx3frY2SN4LueOAJaW9oh8Oh?= =?us-ascii?Q?wywsJdpM/8IyrTwGrb0SrlmgJHXJH3ZbWuxFRrVHBh+2mPHKTsOY+L9gnqhf?= =?us-ascii?Q?CNsZRpolhLZRYwXR8V0VVv1Mu/Jg5FXRRm8YMhgHWNQbgVKXDDyUpHhyuL0D?= =?us-ascii?Q?Ud+kuvkVqYAIj+CFe0rcgacG8tT8A7X0SK39eEy1xLcYIDaYYymJnjoKuFwF?= =?us-ascii?Q?AFX/RlsQErJwMxv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HzCg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 7:PEFeMpkbs7yVTF5g5MIS6QvuMu2OVpFybO+c+MAAmh908LqZ0oi2A2VIa0k4dGDZv85+C1HvSseQtokjO8lVhzQlOQG1dSghZUVlvdyWPnBPY0FbVBS6EnRPy80nJjRziktMXrM8rCwVy5b7Mss5bH1FslAcGcVmpZddxMMyFvFnd2a6t1WPluz3Y2fQEb0dWYA/OMHU5vRYT+7eiOS9iY2aT9IHTuA8kDX9SS3EShIOENgnkVzyLYMVieYWEgNJpz7Ac/GKNKEVh9yUsVOifMJEQGHHiEQ5e1iaxlXw4yzBK7b8BoQZwXhbHt7klKjFdMjejsTHQIE+CIRhPwo1gA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2017 07:54:49.1120 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2284 Subject: [dpdk-dev] [PATCH 7/8] 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: Thu, 06 Apr 2017 07:54:53 -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 --- 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