net/mvneta: support setting MTU
[dpdk.git] / doc / guides / nics / mvneta.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2018 Marvell International Ltd.
3     Copyright(c) 2018 Semihalf.
4     All rights reserved.
5
6 MVNETA Poll Mode Driver
7 =======================
8
9 The MVNETA PMD (librte_pmd_mvneta) provides poll mode driver support
10 for the Marvell NETA 1/2.5 Gbps adapter.
11
12 Detailed information about SoCs that use PPv2 can be obtained here:
13
14 * https://www.marvell.com/embedded-processors/armada-3700/
15
16 .. Note::
17
18    Due to external dependencies, this driver is disabled by default. It must
19    be enabled manually by setting relevant configuration option manually.
20    Please refer to `Config File Options`_ section for further details.
21
22
23 Features
24 --------
25
26 Features of the MVNETA PMD are:
27
28 - Start/stop
29 - tx/rx_queue_setup
30 - tx/rx_burst
31 - Speed capabilities
32 - Jumbo frame
33 - MTU update
34 - CRC offload
35 - L3 checksum offload
36 - L4 checksum offload
37 - Packet type parsing
38
39
40 Limitations
41 -----------
42
43 - Flushing vlans added for filtering is not possible due to MUSDK missing
44   functionality. Current workaround is to reset board so that NETA has a
45   chance to start in a sane state.
46
47 Prerequisites
48 -------------
49
50 - Custom Linux Kernel sources
51
52   .. code-block:: console
53
54      git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell.git -b linux-4.4.120-armada-18.09
55
56
57 - MUSDK (Marvell User-Space SDK) sources
58
59   .. code-block:: console
60
61      git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-armada-18.09
62
63   MUSDK is a light-weight library that provides direct access to Marvell's
64   NETA. Alternatively prebuilt MUSDK library can be
65   requested from `Marvell Extranet <https://extranet.marvell.com>`_. Once
66   approval has been granted, library can be found by typing ``musdk`` in
67   the search box.
68
69   MUSDK must be configured with the following features:
70
71   .. code-block:: console
72
73      --enable-pp2=no --enable-neta
74
75 - DPDK environment
76
77   Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup
78   DPDK environment.
79
80 Pre-Installation Configuration
81 ------------------------------
82
83 Config File Options
84 ~~~~~~~~~~~~~~~~~~~
85
86 The following options can be modified in the ``config`` file.
87
88 - ``CONFIG_RTE_LIBRTE_MVNETA_PMD`` (default ``n``)
89
90     Toggle compilation of the librte_pmd_mvneta driver.
91
92 Runtime options
93 ~~~~~~~~~~~~~~~
94
95 The following ``devargs`` options can be enabled at runtime. They must
96 be passed as part of EAL arguments.
97
98 - ``iface`` (mandatory, with no default value)
99
100   The name of port (owned by MUSDK) that should be enabled in DPDK.
101   This options can be repeated resulting in a list of ports to be
102   enabled.  For instance below will enable ``eth0`` and ``eth1`` ports.
103
104 .. code-block:: console
105
106    ./testpmd --vdev=net_mvneta,iface=eth0,iface=eth1 \
107     -c 3 -- -i --p 3 -a
108
109
110 Building DPDK
111 -------------
112
113 Driver needs precompiled MUSDK library during compilation.
114
115 .. code-block:: console
116
117    export CROSS_COMPILE=<toolchain>/bin/aarch64-linux-gnu-
118    ./bootstrap
119    ./configure --host=aarch64-linux-gnu --enable-pp2=no --enable-neta
120    make install
121
122 MUSDK will be installed to `usr/local` under current directory.
123 For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
124
125 Before the DPDK build process the environmental variable ``LIBMUSDK_PATH`` with
126 the path to the MUSDK installation directory needs to be exported.
127
128 .. code-block:: console
129
130    export LIBMUSDK_PATH=<musdk>/usr/local
131    export CROSS=aarch64-linux-gnu-
132    make config T=arm64-armv8a-linuxapp-gcc
133    sed -ri 's,(MVNETA_PMD=)n,\1y,' build/.config
134    make
135
136 Usage Example
137 -------------
138
139 MVNETA PMD requires extra out of tree kernel modules to function properly.
140 `musdk_uio` and `mv_neta_uio` sources are part of the MUSDK. Please consult
141 ``doc/musdk_get_started.txt`` for the detailed build instructions.
142
143 .. code-block:: console
144
145    insmod musdk_uio.ko
146    insmod mv_neta_uio.ko
147
148 Additionally interfaces used by DPDK application need to be put up:
149
150 .. code-block:: console
151
152    ip link set eth0 up
153    ip link set eth1 up
154
155 In order to run testpmd example application following command can be used:
156
157 .. code-block:: console
158
159    ./testpmd --vdev=net_mvneta,iface=eth0,iface=eth1 -c 3 -- \
160      -i --p 3 -a --txd 256 --rxd 128 --rxq=1 --txq=1  --nb-cores=1
161
162
163 In order to run l2fwd example application following command can be used:
164
165 .. code-block:: console
166
167    ./l2fwd --vdev=net_mvneta,iface=eth0,iface=eth1 -c 3 -- -T 1 -p 3