Daniel Béreš | 82ec908 | 2022-07-27 12:22:39 +0000 | [diff] [blame] | 1 | .. _gomemif_doc: |
| 2 | |
| 3 | Gomemif library |
| 4 | ======================= |
| 5 | |
| 6 | Memif library implemented in Go. The package contains 3 examples: Bridge and ICMP responder in interrupt and polling mode. |
| 7 | |
| 8 | setup and run |
| 9 | ------------- |
| 10 | To Build all examples |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | bazel build //... |
| 15 | |
| 16 | To Run ICMP responder in interrupt mode: |
| 17 | |
| 18 | :: |
| 19 | |
| 20 | DBGvpp# create interface memif id 0 master no-zero-copy |
| 21 | DBGvpp# set int ip addr memif0/0 192.168.1.2/24 |
| 22 | DBGvpp# set int state memif0/0 up |
| 23 | |
| 24 | bazel-bin/examples/linux_amd64_stripped/icmp_responder_cb |
| 25 | gomemif# start |
| 26 | |
| 27 | DBGvpp# ping 192.168.1.1 |
| 28 | |
| 29 | To Run ICMP responder in polling mode: |
| 30 | |
| 31 | :: |
| 32 | |
| 33 | DBGvpp# create interface memif id 0 master no-zero-copy |
| 34 | DBGvpp# set int ip addr memif0/0 192.168.1.2/24 |
| 35 | DBGvpp# set int state memif0/0 up |
| 36 | |
| 37 | bazel-bin/examples/linux_amd64_stripped/icmp_responder_poll |
| 38 | gomemif# start |
| 39 | |
| 40 | DBGvpp# ping 192.168.1.1 |
| 41 | |
| 42 | To Run Bridge: |
| 43 | |
| 44 | :: |
| 45 | |
| 46 | bazel-bin/examples/linux_amd64_stripped/bridge |
| 47 | gomemif# start |
| 48 | |
| 49 | |
| 50 | |