Nathan Skrzypczak | 8acc5ee | 2021-10-12 14:00:25 +0200 | [diff] [blame] | 1 | .. _libmemif_doc: |
| 2 | |
| 3 | Shared Memory Packet Interface (memif) Library |
| 4 | ============================================== |
| 5 | |
| 6 | Features |
| 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 | |
| 32 | Quickstart |
| 33 | ---------- |
| 34 | |
| 35 | This setup will run libmemif ICMP responder example app in container. |
| 36 | Install `docker <https://docs.docker.com/engine/installation>`__ engine. |
| 37 | Useful link: `Docker |
| 38 | documentation <https://docs.docker.com/get-started>`__. |
| 39 | |
| 40 | Build the docker image: |
| 41 | |
| 42 | :: |
| 43 | |
| 44 | # docker build . -t libmemif |
| 45 | |
| 46 | Now 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 | |
| 55 | Run container: |
| 56 | |
| 57 | :: |
| 58 | |
| 59 | # docker run -it --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" libmemif |
| 60 | |
| 61 | The interface will by default connect to a master interface listening on |
| 62 | ``/run/vpp/master.sock``. The example will handle ARP requests and |
| 63 | respond to ICMPv4 requests to ``192.168.1.1``. |
| 64 | |
Jakub Grajciar | e74c04f | 2021-01-04 11:28:33 +0100 | [diff] [blame^] | 65 | Continue with :ref:`libmemif_examples_doc` which contains instructions on |
| 66 | how to set up connection between icmp_responder example app and VPP-memif. |