blob: a6478cfa89e0e275668606a4ab0b4b3c2e8d8da8 [file] [log] [blame]
Nathan Skrzypczak8acc5ee2021-10-12 14:00:25 +02001.. _libmemif_doc:
2
3Shared Memory Packet Interface (memif) Library
4==============================================
5
6Features
7--------
8
9- Slave mode
10
11 - Connect to VPP over memif
12 - ICMP responder example app
13
14- Transmit/receive packets
15- Interrupt mode support
16- File descriptor event polling in libmemif (optional)
17
18 - Simplify file descriptor event polling (one handler for control
19 and interrupt channel)
20
21- Multiple connections
22- Multiple queues
23
24 - Multi-thread support
25
26- Master mode
27
28 - Multiple regions
29
30- Loopback
31
32Quickstart
33----------
34
35This setup will run libmemif ICMP responder example app in container.
36Install `docker <https://docs.docker.com/engine/installation>`__ engine.
37Useful link: `Docker
38documentation <https://docs.docker.com/get-started>`__.
39
40Build the docker image:
41
42::
43
44 # docker build . -t libmemif
45
46Now you should be able to see libmemif image on your local machine:
47
48::
49
50 # docker images
51 REPOSITORY TAG IMAGE ID CREATED SIZE
52 libmemif latest 32ecc2f9d013 About a minute ago 468MB
53 ...
54
55Run container:
56
57::
58
59 # docker run -it --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" libmemif
60
61The interface will by default connect to a master interface listening on
62``/run/vpp/master.sock``. The example will handle ARP requests and
63respond to ICMPv4 requests to ``192.168.1.1``.
64
65Continue with :ref:`libmemif_example_setup_doc` which contains instructions on
66how to set up connection between icmpr-epoll example app and VPP-memif.
67