vpp/extras/libmemif/docs/buildinstructions_doc.md
Jakub Grajciar 12df497bb6 libmemif: version 3.0
Add support for multi-thread connection establishment.

- control_fd_update() callback now passes private context
  associated with updated file descriptor. File descriptor
  can belong to memif socket, memif connection or timerfd.
  In case of timerfd the context is NULL.

- memif_create_socket() new API. Creates memif socket
  handle to be passed to memif_create() in memif_conn_args_t.
  This API allows to pass private context whenever the file
  descriptor is updated.

- memif_delete_socket() new API. Deletes memif socket.
  Socket must not be in use by any interface.

Type: feature

Change-Id: I7ca4e4349595d4477195f1c32403d3e3a6eb5361
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-02 14:06:46 +00:00

50 lines
1.3 KiB
Markdown

## Build Instructions {#libmemif_build_doc}
#### Install dependencies
```
# sudo apt-get install -y git cmake autoconf pkg_config libtool check
```
Libmemif is now part of VPP repository. Follow fd.io wiki to pull source code from VPP repository.
[https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Pushing_Patches](https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Pushing_Patches)
Libmemif is located under extras/libmemif. From extras/libmemif:
```
# mkdir build
# cd build
# cmake ..
# make install
```
#### Verify installation:
```
build# ./examples/icmpr-epoll
```
Use _help_ command to display build information and commands:
```
LIBMEMIF EXAMPLE APP: ICMP_Responder
==============================
libmemif version: 3.0
memif version: 512
use CTRL+C to exit
MEMIF DETAILS
==============================
interface name: memif_connection
app name: ICMP_Responder
remote interface name:
remote app name:
id: 0
secret: (null)
role: slave
mode: ethernet
socket filename: /run/vpp/memif.sock
socket filename: /run/vpp/memif.sock
rx queues:
tx queues:
link: down
```
#### Examples
Once the library is built/installed, refer to @ref libmemif_examples_doc and @ref libmemif_gettingstarted_doc for additional information on basic use cases and API usage.