* Run `ldconfig` to update the shared library cache.
-### Static library
-
-To 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
-
## Build collectd with DPDK
**Note:** DPDK 16.04 is the minimum version and currently supported version of
See also: 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 shared library:
-
- ./configure LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" LIBDPDK_LDFLAGS="-L/usr/lib"
-
-**Note:** Modify these flags according to specific environment setup.
-LIBDPDK_CPPFLAGS should contain path to dpdk headers and LIBDPDK_LDFLAGS should
-point out to dpdk libraries location.
-
-### Build with the static DPDK library
+ * Configure collectd with the DPDK shared library. If DPDK is installed in
+ custom installation path you can specify headers include path using
+ LIBDPDK_CPPFLAGS variable and libraries path with LIBDPDK_LDFLAGS.
+ Example:
-To configure collectd with the DPDK static library:
+ ./configure
- * Run *configure* with the following CFLAGS:
+ or for custom DPKD installation:
- ./configure LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" LIBDPDK_LDFLAGS="-L/usr/lib" CFLAGS=" -lpthread -Wl,--whole-archive -Wl,-ldpdk -Wl,-lm -Wl,-lrt -Wl,-lpcap -Wl,-ldl -Wl,--no-whole-archive"
+ ./configure LIBDPDK_CPPFLAGS="-I/home/joe/include/dpdk" LIBDPDK_LDFLAGS="-L/home/joe/usr/lib"
- * Make sure that dpdk and dpdkstat are enabled in the *configure* output.
+ * Make sure that libdpdk and dpdkstat are enabled in the *configure* output.
Expected output:
* Build collectd:
- make -j && make -j install.
+ make -j && make -j install
**Note:** As mentioned above, if you are building on Ubuntu 14.04 with
GCC <= 4.8.X, you need to use:
-/**
+/*
* collectd - src/utils_dpdk.c
* MIT License
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
*
* Authors:
* Maryam Tahhan <maryam.tahhan@intel.com>
* Harry van Haaren <harry.van.haaren@intel.com>
+ * Taras Chornyi <tarasx.chornyi@intel.com>
* Serhiy Pshyk <serhiyx.pshyk@intel.com>
- **/
+ * Krzysztof Matczak <krzysztofx.matczak@intel.com>
+ */
#include "collectd.h"
-/**
+/*
* collectd - src/utils_dpdk.h
* MIT License
*
* Copyright(c) 2016 Intel Corporation. All rights reserved.
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
*
* Authors:
* Maryam Tahhan <maryam.tahhan@intel.com>
* Harry van Haaren <harry.van.haaren@intel.com>
+ * Taras Chornyi <tarasx.chornyi@intel.com>
* Serhiy Pshyk <serhiyx.pshyk@intel.com>
- **/
+ * Krzysztof Matczak <krzysztofx.matczak@intel.com>
+ */
#ifndef UTILS_DPDK_H
#define UTILS_DPDK_H