blob: 18f382893c9adea7665436644717a3f856b04e3e [file] [log] [blame]
Daniel Béreš82ec9082022-07-27 12:22:39 +00001.. _gomemif_doc:
2
3Gomemif library
4=======================
5
6Memif library implemented in Go. The package contains 3 examples: Bridge and ICMP responder in interrupt and polling mode.
7
8setup and run
9-------------
10To Build all examples
11
12::
13
14 bazel build //...
15
16To 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
29To 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
42To Run Bridge:
43
44::
45
46 bazel-bin/examples/linux_amd64_stripped/bridge
47 gomemif# start
48
49
50