summaryrefslogtreecommitdiffstats
path: root/extras/gomemif/README.rst
blob: 18f382893c9adea7665436644717a3f856b04e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.. _gomemif_doc:

Gomemif library
=======================

Memif library implemented in Go. The package contains 3 examples: Bridge and ICMP responder in interrupt and polling mode.

setup and run
-------------
To Build all examples

::

   bazel build //...

To Run ICMP responder in interrupt mode:

::

   DBGvpp# create interface memif id 0 master no-zero-copy
   DBGvpp# set int ip addr memif0/0 192.168.1.2/24
   DBGvpp# set int state memif0/0 up

   bazel-bin/examples/linux_amd64_stripped/icmp_responder_cb
   gomemif# start

   DBGvpp# ping 192.168.1.1

To Run ICMP responder in polling mode:

::

   DBGvpp# create interface memif id 0 master no-zero-copy
   DBGvpp# set int ip addr memif0/0 192.168.1.2/24
   DBGvpp# set int state memif0/0 up

   bazel-bin/examples/linux_amd64_stripped/icmp_responder_poll
   gomemif# start

   DBGvpp# ping 192.168.1.1

To Run Bridge:

::

  bazel-bin/examples/linux_amd64_stripped/bridge
  gomemif# start