X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=docs%2FBUILD.dpdkstat.md;h=33cd8e8ced4a5cf07ae99ced0c1a807ddbbe5efa;hb=1e8a95944f39cf4d552f2afed8e26b93febd50ec;hp=b502edd2d3b462a7bdfd53db090bf27d18fe2de9;hpb=92860d61218a3da1e9b74a2fad37e9df88df8ce8;p=collectd.git diff --git a/docs/BUILD.dpdkstat.md b/docs/BUILD.dpdkstat.md index b502edd2..33cd8e8c 100644 --- a/docs/BUILD.dpdkstat.md +++ b/docs/BUILD.dpdkstat.md @@ -51,8 +51,8 @@ instruction set manually: mount -t hugetlbfs nodev /mnt/huge echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages - * To configure the DPDK build for the combined shared library modify - `config/common_base` in your DPDK as follows + * To configure the DPDK build for the combined shared library and enable autoload + of pmd drivers modify `config/common_base` in your DPDK as follows # # Compile to share library @@ -60,6 +60,10 @@ instruction set manually: -CONFIG_RTE_BUILD_SHARED_LIB=n +CONFIG_RTE_BUILD_SHARED_LIB=y + # Default driver path (or "" to disable) + -CONFIG_RTE_EAL_PMD_PATH="" + +CONFIG_RTE_EAL_PMD_PATH="/usr/lib/dpdk-pmd/" + * Prepare the configuration for the appropriate target as specified at: http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html. @@ -75,6 +79,14 @@ instruction set manually: sudo make install prefix=/usr + * Create dpdk-pmd folder + + mkdir -p /usr/lib/dpdk-pmd + + * Create symlinks to pmd drivers + + find /usr/lib -type f -name 'librte_pmd*' | while read path ; do ln -s $path /usr/lib/dpdk-pmd/`echo $path | grep -o 'librte_.*so'` ; done + **Note 1:** You must run make install as the configuration of collectd with DPDK expects DPDK to be installed somewhere. @@ -84,6 +96,9 @@ instruction set manually: **Note 3:** If you are not root then use sudo to make install DPDK to the appropriate location. + **Note 4:** You **MUST** create symlink to a NIC driver lib. This way collectd + will be able to work with device bound to dpdk. + * Check that the DPDK library has been installed in `/usr/lib` or `/lib`: ls /usr/lib | grep dpdk @@ -186,7 +201,11 @@ 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 --with-libdpdk=/usr + ./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 @@ -194,7 +213,7 @@ To configure collectd with the DPDK static library: * Run *configure* with the following CFLAGS: - ./configure --with-libdpdk=/usr CFLAGS=" -lpthread -Wl,--whole-archive -Wl,-ldpdk -Wl,-lm -Wl,-lrt -Wl,-lpcap -Wl,-ldl -Wl,--no-whole-archive" + ./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" * Make sure that dpdk and dpdkstat are enabled in the *configure* output. @@ -203,7 +222,7 @@ To configure collectd with the DPDK static library: Libraries: ... libdpdk . . . . . . . . yes - + Modules: ... dpdkstat . . . . . . .yes