README.md revision 4cf3180c
1# vcl-ldpreload a LD_PRELOAD library that uses the VPP Communications Library (VCL).
2
3User can LD_PRELOAD any application that uses POSIX socket API.
4This library internally uses libvppcom.so library from VPP project.
5
6
7## HowTo
8
9If VPP is not installed, but rather built in a separate directory, you can use the VPP_DIR 'configure' argument.
10```bash
11# 1. Edit vppsb/vcl-ldpreload/env.sh
12## set base for directory above vpp and vppsb source
13
14source ./env.sh
15
16# 2. Change to VPP source directory and build
17
18cd $VPP_DIR
19
20# Modify uri.am to enable socket_test program
21
22perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/uri.am
23
24# Build VPP release 
25
26make install-dep wipe-release bootstrap dpdk-install-dev build-release
27
28# 2. Build LD_PRELOAD library against VPP build above
29## This does not install the LD_PRELOAD library in your system.
30## Instead it will be referenced from the build directory set in VCL_LDPRELOAD_LIB
31
32cd $LDP_DIR/vcl-ldpreload/src
33autoreconf -i -f
34./configure VPP_DIR=$VPP_DIR
35make
36```bash
37
38
39# 3. Running the demo
40## Run test script without parameters to see help menu:
41
42cd $VPP_DIR/test/scripts
43./socket_test.sh
44
45# 4. Docker iPerf examples.
46## These launch xterms. To quit, close xterms and run following docker kill cmd (WARNING: This will kill all docker containers!) 'docker kill $(docker ps -q)'
47
48
49## Docker iPerf using default Linux Bridge
50
51./socket_test.sh -bi docker-kernel
52
53## Docker iPerf using VPP
54./socket_test.sh -bi docker-preload
55
56
57 
58
59The library can be compiled by running the following commands from the vppsb/vcl-ldpreload/src directory:
60If VPP is installed, then 
61```bash
62libtoolize
63aclocal
64autoconf
65automake --add-missing
66./configure
67make
68sudo make install
69```
70
71## Administrative
72
73### Current status
74
75This library is currently under active enhancement.
76
77### Objective
78
79This effort intends to be a building block for a better integration of POSIX socket applications with VPP.
80It will evolve depending on the needs of the VPP community while focusing on 
81LD_PRELOADing applications that use POSIX socket APIs.
82
83### Main contributors
84
85Shrinivasan Ganapathy - LF-ID:shganapa
86
87
88
89