1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright(c) 2018 Marvell International Ltd. 3 Copyright(c) 2018 Semihalf. 4 All rights reserved. 5 6MVNETA Poll Mode Driver 7======================= 8 9The MVNETA PMD (**librte_net_mvneta**) provides poll mode driver support 10for the Marvell NETA 1/2.5 Gbps adapter. 11 12Detailed information about SoCs that use PPv2 can be obtained here: 13 14* https://www.marvell.com/embedded-processors/armada-3700/ 15 16 17Features 18-------- 19 20Features 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 38Limitations 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 45Prerequisites 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-armada-18.09 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 79Runtime options 80--------------- 81 82The following ``devargs`` options can be enabled at runtime. They must 83be 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 97Building DPDK 98------------- 99 100Driver 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 109MUSDK will be installed to `usr/local` under current directory. 110For the detailed build instructions please consult ``doc/musdk_get_started.txt``. 111 112The path to the MUSDK installation directory needs to set in meson, shown in the 113following command: 114 115.. code-block:: console 116 117 meson -Dlib_musdk_dir=/path/to/musdk build ninja -C build 118 119 120Usage Example 121------------- 122 123MVNETA PMD requires extra out of tree kernel modules to function properly. 124`musdk_uio` and `mv_neta_uio` sources are part of the MUSDK. Please consult 125``doc/musdk_get_started.txt`` for the detailed build instructions. 126 127.. code-block:: console 128 129 insmod musdk_uio.ko 130 insmod mv_neta_uio.ko 131 132Additionally interfaces used by DPDK application need to be put up: 133 134.. code-block:: console 135 136 ip link set eth0 up 137 ip link set eth1 up 138 139In order to run testpmd example application following command can be used: 140 141.. code-block:: console 142 143 ./dpdk-testpmd --vdev=net_mvneta,iface=eth0,iface=eth1 -c 3 -- \ 144 -i --p 3 -a --txd 256 --rxd 128 --rxq=1 --txq=1 --nb-cores=1 145 146 147In order to run l2fwd example application following command can be used: 148 149.. code-block:: console 150 151 ./dpdk-l2fwd --vdev=net_mvneta,iface=eth0,iface=eth1 -c 3 -- -T 1 -p 3 152