4327e4eaccd3d782dccdb07b6127198ed573d964
[dpdk.git] / doc / guides / nics / szedata2.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright 2015 - 2016 CESNET
3
4 SZEDATA2 poll mode driver library
5 =================================
6
7 The SZEDATA2 poll mode driver library implements support for the Netcope
8 FPGA Boards (**NFB-***), FPGA-based programmable NICs.
9 The SZEDATA2 PMD uses interface provided by the libsze2 library to communicate
10 with the NFB cards over the sze2 layer.
11
12 More information about the
13 `NFB cards <http://www.netcope.com/en/products/fpga-boards>`_
14 and used technology
15 (`Netcope Development Kit <http://www.netcope.com/en/products/fpga-development-kit>`_)
16 can be found on the `Netcope Technologies website <http://www.netcope.com/>`_.
17
18 .. note::
19
20    This driver has external dependencies.
21    Therefore it is disabled in default configuration files.
22    It can be enabled by setting ``CONFIG_RTE_LIBRTE_PMD_SZEDATA2=y``
23    and recompiling.
24
25 .. note::
26
27    Currently the driver is supported only on x86_64 architectures.
28    Only x86_64 versions of the external libraries are provided.
29
30 Prerequisites
31 -------------
32
33 This PMD requires kernel modules which are responsible for initialization and
34 allocation of resources needed for sze2 layer function.
35 Communication between PMD and kernel modules is mediated by libsze2 library.
36 These kernel modules and library are not part of DPDK and must be installed
37 separately:
38
39 *  **libsze2 library**
40
41    The library provides API for initialization of sze2 transfers, receiving and
42    transmitting data segments.
43
44 *  **Kernel modules**
45
46    * combov3
47    * szedata2_cv3
48
49    Kernel modules manage initialization of hardware, allocation and
50    sharing of resources for user space applications.
51
52 Information about getting the dependencies can be found `here
53 <http://www.netcope.com/en/company/community-support/dpdk-libsze2>`_.
54
55 Configuration
56 -------------
57
58 These configuration options can be modified before compilation in the
59 ``.config`` file:
60
61 *  ``CONFIG_RTE_LIBRTE_PMD_SZEDATA2`` default value: **n**
62
63    Value **y** enables compilation of szedata2 PMD.
64
65 *  ``CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS`` default value: **0**
66
67    This option defines type of firmware address space and must be set
68    according to the used card and mode.
69    Currently supported values are:
70
71    * **0** - for cards (modes):
72
73       * NFB-100G1 (100G1)
74
75    * **1** - for cards (modes):
76
77       * NFB-100G2Q (100G1)
78
79    * **2** - for cards (modes):
80
81       * NFB-40G2 (40G2)
82       * NFB-100G2C (100G2)
83       * NFB-100G2Q (40G2)
84
85    * **3** - for cards (modes):
86
87       * NFB-40G2 (10G8)
88       * NFB-100G2Q (10G8)
89
90    * **4** - for cards (modes):
91
92       * NFB-100G1 (10G10)
93
94    * **5** - for experimental firmwares and future use
95
96 Using the SZEDATA2 PMD
97 ----------------------
98
99 From DPDK version 16.04 the type of SZEDATA2 PMD is changed to PMD_PDEV.
100 SZEDATA2 device is automatically recognized during EAL initialization.
101 No special command line options are needed.
102
103 Kernel modules have to be loaded before running the DPDK application.
104
105 Example of usage
106 ----------------
107
108 Read packets from 0. and 1. receive channel and write them to 0. and 1.
109 transmit channel:
110
111 .. code-block:: console
112
113    $RTE_TARGET/app/testpmd -l 0-3 -n 2 \
114    -- --port-topology=chained --rxq=2 --txq=2 --nb-cores=2 -i -a
115
116 Example output:
117
118 .. code-block:: console
119
120    [...]
121    EAL: PCI device 0000:06:00.0 on NUMA socket -1
122    EAL:   probe driver: 1b26:c1c1 rte_szedata2_pmd
123    PMD: Initializing szedata2 device (0000:06:00.0)
124    PMD: SZEDATA2 path: /dev/szedataII0
125    PMD: Available DMA channels RX: 8 TX: 8
126    PMD: resource0 phys_addr = 0xe8000000 len = 134217728 virt addr = 7f48f8000000
127    PMD: szedata2 device (0000:06:00.0) successfully initialized
128    Interactive-mode selected
129    Auto-start selected
130    Configuring Port 0 (socket 0)
131    Port 0: 00:11:17:00:00:00
132    Checking link statuses...
133    Port 0 Link Up - speed 10000 Mbps - full-duplex
134    Done
135    Start automatic packet forwarding
136      io packet forwarding - CRC stripping disabled - packets/burst=32
137      nb forwarding cores=2 - nb forwarding ports=1
138      RX queues=2 - RX desc=128 - RX free threshold=0
139      RX threshold registers: pthresh=0 hthresh=0 wthresh=0
140      TX queues=2 - TX desc=512 - TX free threshold=0
141      TX threshold registers: pthresh=0 hthresh=0 wthresh=0
142      TX RS bit threshold=0 - TXQ flags=0x0
143    testpmd>