aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Runge <mrunge@redhat.com>2018-11-23 10:36:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-23 10:36:48 +0000
commite955b0d0ac1d500f6c5ed952c7ad42dac7c4a8f8 (patch)
tree36912bd539d875ed60271dc8bb34f37b95fd03f5
parent892bdcf241acf056395097fa278da22e9c9c013b (diff)
parentb8d251f58b285c216be86bae01b1b18b24221360 (diff)
Merge "barometer-collectd: Add support for DPDK in container"
-rw-r--r--docker/barometer-collectd-master/Dockerfile1
-rw-r--r--docker/barometer-collectd/Dockerfile1
-rw-r--r--src/collectd/Makefile3
-rw-r--r--src/dpdk/Makefile8
-rwxr-xr-xsystems/centos/7/build_base_machine.sh1
5 files changed, 14 insertions, 0 deletions
diff --git a/docker/barometer-collectd-master/Dockerfile b/docker/barometer-collectd-master/Dockerfile
index a1c957f3..0f890d08 100644
--- a/docker/barometer-collectd-master/Dockerfile
+++ b/docker/barometer-collectd-master/Dockerfile
@@ -6,6 +6,7 @@ RUN yum update -y && \
ENV DOCKER y
ENV COLLECTD_USE_MASTER y
+ENV WITH_DPDK y
ENV repos_dir /src
ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
diff --git a/docker/barometer-collectd/Dockerfile b/docker/barometer-collectd/Dockerfile
index 41ccad0b..a7a8a077 100644
--- a/docker/barometer-collectd/Dockerfile
+++ b/docker/barometer-collectd/Dockerfile
@@ -5,6 +5,7 @@ RUN yum update -y && \
git config --global http.sslVerify false
ENV DOCKER y
+ENV WITH_DPDK y
ENV repos_dir /src
ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
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
diff --git a/systems/centos/7/build_base_machine.sh b/systems/centos/7/build_base_machine.sh
index 7e1cf2da..35e65e6d 100755
--- a/systems/centos/7/build_base_machine.sh
+++ b/systems/centos/7/build_base_machine.sh
@@ -60,4 +60,5 @@ hiredis-devel
epel-release
libvirt-python
python2-pip
+numactl-devel
" | grep -v ^#)