aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Burns (alagalah) <alagalah@gmail.com>2017-08-30 14:11:20 -0700
committerKeith Burns (alagalah) <alagalah@gmail.com>2017-08-30 14:47:20 -0700
commit4cf3180c5a7cdd4e6a733ea2712ff2788c2e83ad (patch)
treefc2a7a9817f70ad0949b8b9fca59580b314aba30
parent11cc5a98f182e1c8fe1c3746a65565e40fb254a6 (diff)
Update vcl-preload instructions
Change-Id: I2aab07d379a804b5b007db31abf0838b5b0798f4 Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
-rw-r--r--vcl-ldpreload/README.md67
-rw-r--r--vcl-ldpreload/env.sh5
2 files changed, 57 insertions, 15 deletions
diff --git a/vcl-ldpreload/README.md b/vcl-ldpreload/README.md
index d1ec58a..fd413a3 100644
--- a/vcl-ldpreload/README.md
+++ b/vcl-ldpreload/README.md
@@ -1,36 +1,73 @@
-# vcl-ldpreload a LD_PRELOAD library that uses VCL library for data transport
+# vcl-ldpreload a LD_PRELOAD library that uses the VPP Communications Library (VCL).
-libvcl_ldpreload.so library is to be used as a LD_PRELOAD library.
User can LD_PRELOAD any application that uses POSIX socket API.
This library internally uses libvppcom.so library from VPP project.
## HowTo
+If VPP is not installed, but rather built in a separate directory, you can use the VPP_DIR 'configure' argument.
+```bash
+# 1. Edit vppsb/vcl-ldpreload/env.sh
+## set base for directory above vpp and vppsb source
+
+source ./env.sh
+
+# 2. Change to VPP source directory and build
+
+cd $VPP_DIR
+
+# Modify uri.am to enable socket_test program
+
+perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/uri.am
+
+# Build VPP release
+
+make install-dep wipe-release bootstrap dpdk-install-dev build-release
+
+# 2. Build LD_PRELOAD library against VPP build above
+## This does not install the LD_PRELOAD library in your system.
+## Instead it will be referenced from the build directory set in VCL_LDPRELOAD_LIB
+
+cd $LDP_DIR/vcl-ldpreload/src
+autoreconf -i -f
+./configure VPP_DIR=$VPP_DIR
+make
+```bash
+
+
+# 3. Running the demo
+## Run test script without parameters to see help menu:
+
+cd $VPP_DIR/test/scripts
+./socket_test.sh
+
+# 4. Docker iPerf examples.
+## 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)'
+
+
+## Docker iPerf using default Linux Bridge
+
+./socket_test.sh -bi docker-kernel
+
+## Docker iPerf using VPP
+./socket_test.sh -bi docker-preload
+
+
+
+
The library can be compiled by running the following commands from the vppsb/vcl-ldpreload/src directory:
If VPP is installed, then
```bash
libtoolize
aclocal
autoconf
-automake
+automake --add-missing
./configure
make
sudo make install
```
-If VPP is not installed, but rather built in a separate directory, you can use the VPP_DIR 'configure' argument.
-```bash
-autoreconf -i -f
-./configure VPP_DIR=<absolute/path/to/vpp>
-make
-sudo make install
-```bash
-Useful test script can be found in VPP project:
-.../vpp/test/scripts/socket_test.sh
-
-Running socket_test.sh without parameters will give the help menu.
-
## Administrative
### Current status
diff --git a/vcl-ldpreload/env.sh b/vcl-ldpreload/env.sh
new file mode 100644
index 0000000..dcb0a06
--- /dev/null
+++ b/vcl-ldpreload/env.sh
@@ -0,0 +1,5 @@
+export VCL_BASE=/home/alagalah/git/work/fdio
+export VPP_DIR=$VCL_BASE/vpp
+export LDP_DIR=$VCL_BASE/vppsb
+export WS_ROOT=$VCL_BASE/vpp
+export VCL_LDPRELOAD_LIB=$VCL_BASE/vppsb/vcl-ldpreload/src/.libs