c732fb1f0e31455192ff516c43f9ab0b5d445261
[deb_dpdk.git] / doc / guides / nics / nfp.rst
1 ..  BSD LICENSE
2     Copyright(c) 2015 Netronome Systems, Inc. All rights reserved.
3     All rights reserved.
4
5     Redistribution and use in source and binary forms, with or without
6     modification, are permitted provided that the following conditions
7     are met:
8
9     * Redistributions of source code must retain the above copyright
10     notice, this list of conditions and the following disclaimer.
11     * Redistributions in binary form must reproduce the above copyright
12     notice, this list of conditions and the following disclaimer in
13     the documentation and/or other materials provided with the
14     distribution.
15     * Neither the name of Intel Corporation nor the names of its
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23     OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 NFP poll mode driver library
32 ============================
33
34 Netronome's sixth generation of flow processors pack 216 programmable
35 cores and over 100 hardware accelerators that uniquely combine packet,
36 flow, security and content processing in a single device that scales
37 up to 400 Gbps.
38
39 This document explains how to use DPDK with the Netronome Poll Mode
40 Driver (PMD) supporting Netronome's Network Flow Processor 6xxx
41 (NFP-6xxx).
42
43 Currently the driver supports virtual functions (VFs) only.
44
45 Dependencies
46 ------------
47
48 Before using the Netronome's DPDK PMD some NFP-6xxx configuration,
49 which is not related to DPDK, is required. The system requires
50 installation of **Netronome's BSP (Board Support Package)** which includes
51 Linux drivers, programs and libraries.
52
53 If you have a NFP-6xxx device you should already have the code and
54 documentation for doing this configuration. Contact
55 **support@netronome.com** to obtain the latest available firmware.
56
57 The NFP Linux kernel drivers (including the required PF driver for the
58 NFP) are available on Github at
59 **https://github.com/Netronome/nfp-drv-kmods** along with build
60 instructions.
61
62 DPDK runs in userspace and PMDs uses the Linux kernel UIO interface to
63 allow access to physical devices from userspace. The NFP PMD requires
64 the **igb_uio** UIO driver, available with DPDK, to perform correct
65 initialization.
66
67 Building the software
68 ---------------------
69
70 Netronome's PMD code is provided in the **drivers/net/nfp** directory.
71 Although NFP PMD has NetronomeĀ“s BSP dependencies, it is possible to
72 compile it along with other DPDK PMDs even if no BSP was installed before.
73 Of course, a DPDK app will require such a BSP installed for using the
74 NFP PMD.
75
76 Default PMD configuration is at **common_linuxapp configuration** file:
77
78 - **CONFIG_RTE_LIBRTE_NFP_PMD=y**
79
80 Once DPDK is built all the DPDK apps and examples include support for
81 the NFP PMD.
82
83
84 Driver compilation and testing
85 ------------------------------
86
87 Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
88 for details.
89
90
91 System configuration
92 --------------------
93
94 #. **Enable SR-IOV on the NFP-6xxx device:** The current NFP PMD works with
95    Virtual Functions (VFs) on a NFP device. Make sure that one of the Physical
96    Function (PF) drivers from the above Github repository is installed and
97    loaded.
98
99    Virtual Functions need to be enabled before they can be used with the PMD.
100    Before enabling the VFs it is useful to obtain information about the
101    current NFP PCI device detected by the system:
102
103    .. code-block:: console
104
105       lspci -d19ee:
106
107    Now, for example, configure two virtual functions on a NFP-6xxx device
108    whose PCI system identity is "0000:03:00.0":
109
110    .. code-block:: console
111
112       echo 2 > /sys/bus/pci/devices/0000:03:00.0/sriov_numvfs
113
114    The result of this command may be shown using lspci again:
115
116    .. code-block:: console
117
118       lspci -d19ee: -k
119
120    Two new PCI devices should appear in the output of the above command. The
121    -k option shows the device driver, if any, that devices are bound to.
122    Depending on the modules loaded at this point the new PCI devices may be
123    bound to nfp_netvf driver.