aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/marvell/README.rst
blob: 19cf1c49d0e5ba482277ee348e64f2b030612b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Marvell device plugin
=====================

Overview
--------

This plugins provides native device support for Marvell PP2 network
device, by use of Marvell Usermode SDK
(`MUSDK <https://github.com/MarvellEmbeddedProcessors/musdk-marvell>`__).
Code is developed and tested on
`MACCHIATObin <http://macchiatobin.net>`__ board.

Prerequisites
-------------

Plugins depends on installed MUSDK and Marvell provided linux
`kernel <https://github.com/MarvellEmbeddedProcessors/linux-marvell>`__
with MUSDK provided kernel patches (see ``patches/linux`` in musdk repo
and relevant documentation. Kernel version used: **4.14.22
armada-18.09.3** MUSDK version used: **armada-18.09.3** Following kernel
modules from MUSDK must be loaded for plugin to work: \*
``musdk_cma.ko`` \* ``mv_pp_uio.ko``

Musdk 18.09.3 compilation steps
-------------------------------

::

   ./bootstrap
   ./configure --prefix=/opt/vpp/external/aarch64/ CFLAGS="-Wno-error=unused-result -g -fPIC" --enable-shared=no
   sed -i -e  's/marvell,mv-pp-uio/generic-uio/' modules/pp2/mv_pp_uio.c
   sed -i -e  's/O_CREAT/O_CREAT, S_IRUSR | S_IWUSR/' src/lib/file_utils.c
   make
   sudo make install

Usage
-----

Interface Creation
~~~~~~~~~~~~~~~~~~

Interfaces are dynamically created with following CLI:

::

   create interface marvell pp2 name eth0
   set interface state mv-ppio-0/0 up

Where ``eth0`` is linux interface name and ``mv-ppio-X/Y`` is VPP
interface name where X is PP2 device ID and Y is PPIO ID Interface needs
to be assigned to MUSDK in FDT configuration and linux interface state
must be up.

Interface Deletion
~~~~~~~~~~~~~~~~~~

Interface can be deleted with following CLI:

::

   delete interface marvell pp2 <interface name>

Interface Statistics
~~~~~~~~~~~~~~~~~~~~

Interface statistics can be displayed with
``sh hardware-interface mv-ppio0/0`` command.

Interaction with DPDK plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This plugin doesn’t have any dependency on DPDK or DPDK plugin but it
can work with DPDK plugin enabled or disabled. It is observed that
performance is better around 30% when DPDK plugin is disabled, as DPDK
plugin registers own buffer manager, which needs to deal with additional
metadata in each packet.

DPKD plugin can be disabled by adding following config to the
startup.conf.

::

   plugins {
     dpdk_plugin.so { disable }
   }