aboutsummaryrefslogtreecommitdiffstats
path: root/extras/libmemif/libmemif_doc.rst
blob: a6478cfa89e0e275668606a4ab0b4b3c2e8d8da8 (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
.. _libmemif_doc:

Shared Memory Packet Interface (memif) Library
==============================================

Features
--------

-  ✅ Slave mode

   -  ✅ Connect to VPP over memif
   -  ✅ ICMP responder example app

-  ✅ Transmit/receive packets
-  ✅ Interrupt mode support
-  ✅ File descriptor event polling in libmemif (optional)

   -  ✅ Simplify file descriptor event polling (one handler for control
      and interrupt channel)

-  ✅ Multiple connections
-  ✅ Multiple queues

   -  ✅ Multi-thread support

-  ✅ Master mode

   -  ✅ Multiple regions

-  ✅ Loopback

Quickstart
----------

This setup will run libmemif ICMP responder example app in container.
Install `docker <https://docs.docker.com/engine/installation>`__ engine.
Useful link: `Docker
documentation <https://docs.docker.com/get-started>`__.

Build the docker image:

::

   # docker build . -t libmemif

Now you should be able to see libmemif image on your local machine:

::

   # docker images
   REPOSITORY                       TAG                 IMAGE ID            CREATED              SIZE
   libmemif                         latest              32ecc2f9d013        About a minute ago   468MB
   ...

Run container:

::

   # docker run -it --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" libmemif

The interface will by default connect to a master interface listening on
``/run/vpp/master.sock``. The example will handle ARP requests and
respond to ICMPv4 requests to ``192.168.1.1``.

Continue with :ref:`libmemif_example_setup_doc` which contains instructions on
how to set up connection between icmpr-epoll example app and VPP-memif.