szedata2: add new poll mode driver
[dpdk.git] / doc / guides / nics / szedata2.rst
1 ..  BSD LICENSE
2     Copyright 2015 CESNET
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 CESNET 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 SZEDATA2 poll mode driver library
32 =================================
33
34 The SZEDATA2 poll mode driver library implements support for cards from COMBO
35 family (**COMBO-80G**, **COMBO-100G**).
36 The SZEDATA2 PMD is virtual PMD which uses interface provided by libsze2
37 library to communicate with COMBO cards over sze2 layer.
38
39 More information about family of
40 `COMBO cards <https://www.liberouter.org/technologies/cards/>`_
41 and used technology
42 (`NetCOPE platform <https://www.liberouter.org/technologies/netcope/>`_) can be
43 found on the `Liberouter website <https://www.liberouter.org/>`_.
44
45 .. note::
46
47    This driver has external dependencies.
48    Therefore it is disabled in default configuration files.
49    It can be enabled by setting ``CONFIG_RTE_LIBRTE_PMD_SZEDATA2=y``
50    and recompiling.
51
52 Prerequisities
53 --------------
54
55 This PMD requires kernel modules which are responsible for initialization and
56 allocation of resources needed for sze2 layer function.
57 Communication between PMD and kernel modules is mediated by libsze2 library.
58 These kernel modules and library are not part of DPDK and must be installed
59 separately:
60
61 *  **libsze2 library**
62
63    The library provides API for initialization of sze2 transfers, receiving and
64    transmitting data segments.
65
66 *  **Kernel modules**
67
68    * combov3
69    * szedata2_cv3
70
71    Kernel modules manage initialization of hardware, allocation and
72    sharing of resources for user space applications:
73
74 Information about getting the dependencies can be found `here
75 <https://www.liberouter.org/technologies/netcope/access-to-libsze2-library/>`_.
76
77
78 Using the SZEDATA2 PMD
79 ----------------------
80
81 SZEDATA2 PMD can be created by passing ``--vdev=`` option to EAL in the
82 following format:
83
84 .. code-block:: console
85
86    --vdev 'DEVICE,dev_path=PATH,rx_ifaces=RX_MASK,tx_ifaces=TX_MASK'
87
88 ``DEVICE`` and options ``dev_path``, ``rx_ifaces``, ``tx_ifaces`` are mandatory
89 and must be separated by commas.
90
91 *  ``DEVICE``: contains prefix ``eth_szedata2`` followed by numbers or letters,
92    must be unique for each virtual device
93
94 *  ``dev_path``: Defines path to szedata2 device.
95    Value is valid path to szedata2 device. Example:
96
97    .. code-block:: console
98
99       dev_path=/dev/szedataII0
100
101 *  ``rx_ifaces``: Defines which receive channels will be used.
102    For each channel is created one queue. Value is mask for selecting which
103    receive channels are required. Example:
104
105    .. code-block:: console
106
107       rx_ifaces=0x3
108
109 *  ``tx_ifaces``: Defines which transmit channels will be used.
110    For each channel is created one queue. Value is mask for selecting which
111    transmit channels are required. Example:
112
113    .. code-block:: console
114
115       tx_ifaces=0x3
116
117 Example of usage
118 ----------------
119
120 Read packets from 0. and 1. receive channel and write them to 0. and 1.
121 transmit channel:
122
123 .. code-block:: console
124
125    $RTE_TARGET/app/testpmd -c 0xf -n 2 \
126    --vdev 'eth_szedata20,dev_path=/dev/szedataII0,rx_ifaces=0x3,tx_ifaces=0x3' \
127    -- --port-topology=chained --rxq=2 --txq=2 --nb-cores=2