summaryrefslogtreecommitdiffstats
path: root/extras/libmemif/libmemif_doc.md
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2021-01-04 11:36:44 +0100
committerDave Wallace <dwallacelf@gmail.com>2021-10-13 15:26:34 +0000
commit87e90830b8931b4c55526bf7cb5a148a10df061f (patch)
treea6241383357b1ca2a61358e2f0df03467d8e203f /extras/libmemif/libmemif_doc.md
parent3d3dc2966debd902d1388d3a9733bfa360d01a96 (diff)
libmemif: update documentation
Type: refactor Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I0094ea8627cd8bcd5ea119c2fd48f077c8e2e4bb
Diffstat (limited to 'extras/libmemif/libmemif_doc.md')
-rw-r--r--extras/libmemif/libmemif_doc.md37
1 files changed, 9 insertions, 28 deletions
diff --git a/extras/libmemif/libmemif_doc.md b/extras/libmemif/libmemif_doc.md
index 1260d9c60ac..ac3d6dadcfb 100644
--- a/extras/libmemif/libmemif_doc.md
+++ b/extras/libmemif/libmemif_doc.md
@@ -20,52 +20,34 @@ Shared memory packet interface (memif) provides high performance packet transmit
- [x] Multiple queues
- [x] Multi-thread support
- [x] Master mode
- - [ ] Multiple regions (TODO)
-- [ ] Performance testing (TODO)
+ - [x] Multiple regions
+- [x] 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).
-Pull image:
+Build the docker image:
```
-# docker pull ligato/libmemif-sample-service
+# docker build . -t libmemif
```
-Now you should be able to see ligato/libmemif-sample-service image on your local machine (IMAGE ID in this README may be outdated):
+Now you should be able to see libmemif image on your local machine:
```
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
-ligato/libmemif-sample-service latest 32ecc2f9d013 About a minute ago 468MB
+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/" ligato/libmemif-sample-service
-```
-Example application will start in debug mode. Output should look like this:
-```
-ICMP_Responder:add_epoll_fd:233: fd 0 added to epoll
-ICMP_Responder:add_epoll_fd:233: fd 5 added to epoll
-LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
-==============================
-libmemif version: 2.0 (debug)
-memif version: 512
-commands:
- help - prints this help
- exit - exit app
- conn <index> <mode> [<interrupt-desc>] - create memif. index is also used as interface id, mode 0 = slave 1 = master, interrupt-desc none = default 0 = if ring is full wait 1 = handle only ARP requests
- del <index> - delete memif
- show - show connection details
- ip-set <index> <ip-addr> - set interface ip address
- rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
- sh-count - print counters
- cl-count - clear counters
- send <index> <tx> <ip> <mac> - send icmp
+# 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 which contains instructions on how to set up connection between icmpr-epoll example app and VPP-memif.
#### Next steps
@@ -74,4 +56,3 @@ Continue with @ref libmemif_example_setup which contains instructions on how to
- @subpage libmemif_examples_doc
- @subpage libmemif_example_setup_doc
- @subpage libmemif_gettingstarted_doc
-- @subpage libmemif_devperftest_doc