summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e8a959)
raw | patch | inline | side by side (parent: 1e8a959)
author | Krzysztof Matczak <krzysztofx.matczak@intel.com> | |
Thu, 15 Dec 2016 12:23:31 +0000 (12:23 +0000) | ||
committer | Krzysztof Matczak <krzysztofx.matczak@intel.com> | |
Sat, 31 Dec 2016 16:29:53 +0000 (16:29 +0000) |
Adressed comments raised during PR review. Removed documentation
chapter related with static linking since it was outdated and
there's no single universal solution for all supported DPDK
releases. Static linking of external libraries into plugins
is not supported in collectd.
Change-Id: I35f7decb0fdacaaaad50fa2bf35f7ba6aa96c3f0
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
chapter related with static linking since it was outdated and
there's no single universal solution for all supported DPDK
releases. Static linking of external libraries into plugins
is not supported in collectd.
Change-Id: I35f7decb0fdacaaaad50fa2bf35f7ba6aa96c3f0
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
docs/BUILD.dpdkstat.md | patch | blob | history | |
src/utils_dpdk.c | patch | blob | history | |
src/utils_dpdk.h | patch | blob | history |
diff --git a/docs/BUILD.dpdkstat.md b/docs/BUILD.dpdkstat.md
index 33cd8e8ced4a5cf07ae99ced0c1a807ddbbe5efa..fe9f0e68acc292363a476ec8dc4fdc96ba038017 100644 (file)
--- a/docs/BUILD.dpdkstat.md
+++ b/docs/BUILD.dpdkstat.md
* 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:
diff --git a/src/utils_dpdk.c b/src/utils_dpdk.c
index f9636ac574d8c04c136a5d9ee7ad3ae8df211ee7..51aa91ac628d5a68e54cc29ba3b7aebc72d9b37f 100644 (file)
--- a/src/utils_dpdk.c
+++ b/src/utils_dpdk.c
-/**
+/*
* 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"
diff --git a/src/utils_dpdk.h b/src/utils_dpdk.h
index 55ce180704c297cdc0ef1a14d40f7b840ac0eb42..a4731d03e394aef556b5cc04e40fedda61839aaa 100644 (file)
--- a/src/utils_dpdk.h
+++ b/src/utils_dpdk.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