net/ena: switch memcpy to optimized version
[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_net_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
17 Features
18 --------
19
20 Features of the MVNETA PMD are:
21
22 - Start/stop
23 - tx/rx_queue_setup
24 - tx/rx_burst
25 - Speed capabilities
26 - Jumbo frame
27 - MTU update
28 - Promiscuous mode
29 - Unicast MAC filter
30 - Link status
31 - CRC offload
32 - L3 checksum offload
33 - L4 checksum offload
34 - Packet type parsing
35 - Basic stats
36
37
38 Limitations
39 -----------
40
41 - Flushing vlans added for filtering is not possible due to MUSDK missing
42   functionality. Current workaround is to reset board so that NETA has a
43   chance to start in a sane state.
44
45 Prerequisites
46 -------------
47
48 - Custom Linux Kernel sources
49
50   .. code-block:: console
51
52      git clone https://github.com/MarvellEmbeddedProcessors/linux-marvell.git -b linux-4.4.120-armada-18.09
53
54
55 - MUSDK (Marvell User-Space SDK) sources
56
57   .. code-block:: console
58
59      git clone https://github.com/MarvellEmbeddedProcessors/musdk-marvell.git -b musdk-release-SDK-10.3.5.0-PR2
60
61   MUSDK is a light-weight library that provides direct access to Marvell's
62   NETA. Alternatively prebuilt MUSDK library can be
63   requested from `Marvell Extranet <https://extranet.marvell.com>`_. Once
64   approval has been granted, library can be found by typing ``musdk`` in
65   the search box.
66
67   MUSDK must be configured with the following features:
68
69   .. code-block:: console
70
71      --enable-pp2=no --enable-neta
72
73 - DPDK environment
74
75   Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup
76   DPDK environment.
77
78
79 Runtime options
80 ---------------
81
82 The following ``devargs`` options can be enabled at runtime. They must
83 be passed as part of EAL arguments.
84
85 - ``iface`` (mandatory, with no default value)
86
87   The name of port (owned by MUSDK) that should be enabled in DPDK.
88   This options can be repeated resulting in a list of ports to be
89   enabled.  For instance below will enable ``eth0`` and ``eth1`` ports.
90
91 .. code-block:: console
92
93    ./dpdk-testpmd --vdev=net_mvneta,iface=eth0,iface=eth1 \
94     -c 3 -- -i --p 3 -a
95
96
97 Building MUSDK
98 --------------
99
100 Driver needs precompiled MUSDK library during compilation.
101
102 .. code-block:: console
103
104    export CROSS_COMPILE=<toolchain>/bin/aarch64-linux-gnu-
105    ./bootstrap
106    ./configure --host=aarch64-linux-gnu --enable-pp2=no --enable-neta
107    make install
108
109 MUSDK will be installed to `usr/local` under current directory.
110 For the detailed build instructions please consult ``doc/musdk_get_started.txt``.
111
112 Building DPDK
113 -------------
114
115 Add path to libmusdk.pc in PKG_CONFIG_PATH environment variable.
116
117 .. code-block:: console
118
119    export PKG_CONFIG_PATH=$<musdk_install_dir>/lib/pkgconfig/:$PKG_CONFIG_PATH
120    meson build --cross-file config/arm/arm64_armada_linux_gcc
121    ninja -C build
122
123
124 Usage Example
125 -------------
126
127 MVNETA PMD requires extra out of tree kernel modules to function properly.
128 `musdk_uio` and `mv_neta_uio` sources are part of the MUSDK. Please consult
129 ``doc/musdk_get_started.txt`` for the detailed build instructions.
130
131 .. code-block:: console
132
133    insmod musdk_uio.ko
134    insmod mv_neta_uio.ko
135
136 Additionally interfaces used by DPDK application need to be put up:
137
138 .. code-block:: console
139
140    ip link set eth0 up
141    ip link set eth1 up
142
143 In order to run testpmd example application following command can be used:
144
145 .. code-block:: console
146
147    ./dpdk-testpmd --vdev=net_mvneta,iface=eth0,iface=eth1 -c 3 -- \
148      -i --p 3 -a --txd 256 --rxd 128 --rxq=1 --txq=1  --nb-cores=1
149
150
151 In order to run l2fwd example application following command can be used:
152
153 .. code-block:: console
154
155    ./dpdk-l2fwd --vdev=net_mvneta,iface=eth0,iface=eth1 -c 3 -- -T 1 -p 3