0b5378e9b489783cbc1fea4c7608f35ef7070356
[vpp.git] / extras / vcl-ldpreload / README.md
1 # vcl-ldpreload a LD_PRELOAD library that uses the VPP Communications Library (VCL).
2
3 User can LD_PRELOAD any application that uses POSIX socket API.
4 This library internally uses libvppcom.so library from VPP project.
5
6
7 ## HowTo
8
9 If VPP is not installed, but rather built in a separate directory, you can use the VPP_DIR 'configure' argument.
10 ```bash
11 # 1. Set environment variables for source
12 cd vpp/extras/vcl-ldpreload
13 source ./env.sh
14
15 # 2. Change to VPP source directory and build
16 - Change director and modify uri.am to enable socket_test program
17
18 cd $VPP_DIR
19 perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/uri.am
20
21 - Build VPP release 
22
23 make install-dep wipe-release bootstrap dpdk-install-dev build-release
24
25 # 2. Build LD_PRELOAD library against VPP build above
26 ## This does not install the LD_PRELOAD library in your system.
27 ## Instead it will be referenced from the build directory set in VCL_LDPRELOAD_LIB
28
29 cd $LDP_DIR/vcl-ldpreload/src
30 autoreconf -i -f
31 ./configure VPP_DIR=$VPP_DIR
32 make
33 ```bash
34
35
36 # 3. Running the demo
37 ## Run test script without parameters to see help menu:
38
39 cd $VPP_DIR/test/scripts
40 ./socket_test.sh
41
42 # 4. Docker iPerf examples.
43 ## 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)'
44
45
46 ## Docker iPerf using default Linux Bridge
47
48 ./socket_test.sh -bi docker-kernel
49
50 ## Docker iPerf using VPP
51 ./socket_test.sh -bi docker-preload
52