From: Korynkevych, RomanX Date: Wed, 13 Jul 2016 09:30:49 +0000 (+0100) Subject: dpdkstat: README instructions for DPDK static lib X-Git-Tag: collectd-5.7.0~73^2~7 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c290e77c172908fc592b40499e0992e6fcc452f6;p=collectd.git dpdkstat: README instructions for DPDK static lib Updated README with instructions on how to build and link to the static DPDK library for dpdk plugins. Change-Id: I580cccc8af648c270c5a35689dc536a283f1689a Signed-off-by: Korynkevych, RomanX Signed-off-by: Maryam Tahhan --- diff --git a/README b/README index ab6f44dd..98d230d0 100644 --- a/README +++ b/README @@ -1071,6 +1071,23 @@ Build DPDK for use with collectd: booted at system startup time. - Run ldconfig to update the shared library cache. + Build static DPDK library for use with collectd: + - To configure DPDK to build the combined static library libdpdk.a + ensure that CONFIG_RTE_BUILD_SHARED_LIB is set to n in + config/common_base in your DPDK as follows: + # + # Compile to share library + # + CONFIG_RTE_BUILD_SHARED_LIB=n + - Prepare the configuration for the appropriate target as specified at: + http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html. + For example: + $ make config T=x86_64-native-linuxapp-gcc + - Build the target using -fPIC: + $ make EXTRA_CFLAGS=-fPIC -j + - Install DPDK to /usr + $ sudo make install prefix=/usr + Configure collectd with DPDK: NOTE: The Address-Space Layout Randomization (ASLR) security feature in Linux should be disabled, in order for the same hugepage memory mappings to be present in all @@ -1082,8 +1099,11 @@ NOTE: The Address-Space Layout Randomization (ASLR) security feature in Linux sh See http://dpdk.org/doc/guides/prog_guide/multi_proc_support.html - Generate the build script as specified below. (i.e. run `build.sh'). - - Configure collectd with the DPDK library: + - Configure collectd with the DPDK shared library: ./configure --with-libdpdk=/usr + NOTE: To configure collectd with the DPDK static library: + ./configure --with-libdpdk=/usr CFLAGS=" -lpthread -Wl,--whole-archive + -Wl,-ldpdk -Wl,-lm -Wl,-lrt -Wl,-lpcap -Wl,-ldl -Wl,--no-whole-archive" Libraries: ...