blob: 19cf1c49d0e5ba482277ee348e64f2b030612b34 [file] [log] [blame]
Nathan Skrzypczakf47122e2021-10-08 14:05:35 +02001Marvell device plugin
2=====================
3
4Overview
5--------
6
7This plugins provides native device support for Marvell PP2 network
8device, by use of Marvell Usermode SDK
9(`MUSDK <https://github.com/MarvellEmbeddedProcessors/musdk-marvell>`__).
10Code is developed and tested on
11`MACCHIATObin <http://macchiatobin.net>`__ board.
12
13Prerequisites
14-------------
15
16Plugins depends on installed MUSDK and Marvell provided linux
17`kernel <https://github.com/MarvellEmbeddedProcessors/linux-marvell>`__
18with MUSDK provided kernel patches (see ``patches/linux`` in musdk repo
19and relevant documentation. Kernel version used: **4.14.22
20armada-18.09.3** MUSDK version used: **armada-18.09.3** Following kernel
21modules from MUSDK must be loaded for plugin to work: \*
22``musdk_cma.ko`` \* ``mv_pp_uio.ko``
23
24Musdk 18.09.3 compilation steps
25-------------------------------
26
27::
28
29 ./bootstrap
30 ./configure --prefix=/opt/vpp/external/aarch64/ CFLAGS="-Wno-error=unused-result -g -fPIC" --enable-shared=no
31 sed -i -e 's/marvell,mv-pp-uio/generic-uio/' modules/pp2/mv_pp_uio.c
32 sed -i -e 's/O_CREAT/O_CREAT, S_IRUSR | S_IWUSR/' src/lib/file_utils.c
33 make
34 sudo make install
35
36Usage
37-----
38
39Interface Creation
40~~~~~~~~~~~~~~~~~~
41
42Interfaces are dynamically created with following CLI:
43
44::
45
46 create interface marvell pp2 name eth0
47 set interface state mv-ppio-0/0 up
48
49Where ``eth0`` is linux interface name and ``mv-ppio-X/Y`` is VPP
50interface name where X is PP2 device ID and Y is PPIO ID Interface needs
51to be assigned to MUSDK in FDT configuration and linux interface state
52must be up.
53
54Interface Deletion
55~~~~~~~~~~~~~~~~~~
56
57Interface can be deleted with following CLI:
58
59::
60
61 delete interface marvell pp2 <interface name>
62
63Interface Statistics
64~~~~~~~~~~~~~~~~~~~~
65
66Interface statistics can be displayed with
67``sh hardware-interface mv-ppio0/0`` command.
68
69Interaction with DPDK plugin
70~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71
72This plugin doesnt have any dependency on DPDK or DPDK plugin but it
73can work with DPDK plugin enabled or disabled. It is observed that
74performance is better around 30% when DPDK plugin is disabled, as DPDK
75plugin registers own buffer manager, which needs to deal with additional
76metadata in each packet.
77
78DPKD plugin can be disabled by adding following config to the
79startup.conf.
80
81::
82
83 plugins {
84 dpdk_plugin.so { disable }
85 }