1 Shared Memory Packet Interface (memif) Library
2 ==============================================
5 Shared memory packet interface (memif) provides high performance packet transmit and receive between user application and Vector Packet Processing (VPP) or multiple user applications. Using libmemif, user application can create shared memory interface in master or slave mode and connect to VPP or another application using libmemif. Once the connection is established, user application can receive or transmit packets using libmemif API.
7 ![Architecture](docs/architecture.png)
12 - [x] Connect to VPP over memif
13 - [x] ICMP responder example app
14 - [x] Transmit/receive packets
15 - [x] Interrupt mode support
16 - [x] File descriptor event polling in libmemif (optional)
17 - [x] Simplify file descriptor event polling (one handler for control and interrupt channel)
18 - [x] Multiple connections
20 - [x] Multi-thread support
22 - [ ] Multiple regions (TODO)
23 - [ ] Performance testing (TODO)
27 This setup will run libmemif ICMP responder example app in container. Install [docker](https://docs.docker.com/engine/installation) engine.
28 Useful link: [Docker documentation](https://docs.docker.com/get-started).
32 # docker pull ligato/libmemif-sample-service
35 Now you should be able to see ligato/libmemif-sample-service image on your local machine (IMAGE ID in this README may be outdated):
38 REPOSITORY TAG IMAGE ID CREATED SIZE
39 ligato/libmemif-sample-service latest 32ecc2f9d013 About a minute ago 468MB
45 # docker run -it --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
47 Example application will start in debug mode. Output should look like this:
49 ICMP_Responder:add_epoll_fd:204: fd 0 added to epoll
50 MEMIF_DEBUG:src/main.c:memif_init:383: app name: ICMP_Responder
51 ICMP_Responder:add_epoll_fd:204: fd 4 added to epoll
52 LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
53 ==============================
54 libmemif version: 1.0 (debug)
57 help - prints this help
59 conn <index> - create memif (slave-mode)
60 del <index> - delete memif
61 show - show connection details
62 ip-set <index> <ip-addr> - set interface ip address
63 rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
66 Continue with [Example setup](examples/ExampleSetup.md) which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
70 - [Build instructions](docs/BuildInstructions.md) Instructions on how to build/install libmemif.
71 - [Examples](examples/README.md) More example apps presenting different features.
72 - [Getting started](docs/GettingStarted.md) Introduction to libmemif API. Explaining library usage in custom app.