diff options
author | Kamil Wiatrowski <kamilx.wiatrowski@intel.com> | 2018-11-22 18:07:46 +0100 |
---|---|---|
committer | Kamil Wiatrowski <kamilx.wiatrowski@intel.com> | 2018-11-22 18:08:45 +0100 |
commit | b8d251f58b285c216be86bae01b1b18b24221360 (patch) | |
tree | dee22d411a02265f9ef609d5992f33343c2803f3 /src | |
parent | 8e53f9532b51c175c6a31a02650d64bda4b5f728 (diff) |
barometer-collectd: Add support for DPDK in container
Build dpdk plugins in collectd container.
Change-Id: Ifdca827a419d6d3d4d9c6070d3a581372df8a2f9
Signed-off-by: Kamil Wiatrowski <kamilx.wiatrowski@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/collectd/Makefile | 3 | ||||
-rw-r--r-- | src/dpdk/Makefile | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/collectd/Makefile b/src/collectd/Makefile index 13121700..f6766439 100644 --- a/src/collectd/Makefile +++ b/src/collectd/Makefile @@ -56,6 +56,9 @@ CONFIG_CMD += --enable-write_redis CONFIG_CMD += --disable-perl CONFIG_CMD += --with-librdkafka=/usr CONFIG_CMD += --disable-lvm +ifdef WITH_DPDK +CONFIG_CMD += LIBDPDK_CFLAGS='-mssse3' +endif .PHONY: install force_install config force_make diff --git a/src/dpdk/Makefile b/src/dpdk/Makefile index f13449c8..40fa4820 100644 --- a/src/dpdk/Makefile +++ b/src/dpdk/Makefile @@ -77,6 +77,11 @@ else $(AT)sed -i -e 's/CONFIG_RTE_EAL_PMD_PATH=.*/CONFIG_RTE_EAL_PMD_PATH=\"\/usr\/lib\/dpdk-pmd\/\"/g' $(CONFIG_FILE_LINUXAPP) $(AT)sed -i -e 's/CONFIG_RTE_BUILD_COMBINE_LIBS=./CONFIG_RTE_BUILD_COMBINE_LIBS=y/g' $(CONFIG_FILE_LINUXAPP) endif +# do not build kernel module under docker +ifdef DOCKER + $(AT)sed -i -e 's/CONFIG_RTE_EAL_IGB_UIO=y/CONFIG_RTE_EAL_IGB_UIO=n/' $(CONFIG_FILE_LINUXAPP) + $(AT)sed -i -e 's/CONFIG_RTE_KNI_KMOD=y/CONFIG_RTE_KNI_KMOD=n/' $(CONFIG_FILE_LINUXAPP) +endif # CentOS 7.3 specific config changes to compile ifeq ($(ID),"centos") ifeq ($(VERSION_ID),"7") @@ -98,7 +103,10 @@ install: $(INSTALL_TARGET) $(AT)cd $(WORK_DIR); sudo make -j install prefix=/usr; cd - $(AT)sudo mkdir -p /usr/lib/dpdk-pmd $(AT)find /usr/lib -type f -name 'librte_pmd*' | while read path; do sudo ln -fs $$path /usr/lib/dpdk-pmd/$$(echo $$path | grep -o 'librte_.*so'); done +# under docker there won't be kernel module available +ifndef DOCKER $(AT)sudo cp -a $(WORK_DIR)/build/kmod $(INSTALL_DIR)/lib/modules/$(KERNEL_VERSION) +endif @echo "install done" # hard way to clean and clobber |