acl-plugin: fix acl plugin test failing sporadically (VPP-898)
[vpp.git] / dpdk / Makefile
index 0f75a58..06ba127 100644 (file)
@@ -26,7 +26,7 @@ DPDK_MLX5_PMD         ?= n
 B := $(DPDK_BUILD_DIR)
 I := $(DPDK_INSTALL_DIR)
 DPDK_VERSION ?= 17.05
-PKG_SUFFIX ?= vpp2
+PKG_SUFFIX ?= vpp5
 DPDK_BASE_URL ?= http://fast.dpdk.org/rel
 DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
 DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
@@ -77,7 +77,13 @@ else
 $(error unknown platform)
 endif
 
-JOBS := $(shell grep processor /proc/cpuinfo | wc -l)
+# /proc/cpuinfo does not exist on platforms without a /proc and on some
+# platforms, notably inside containers, it has no content. In those cases
+# we assume there's 1 processor; we use 2*ncpu for the -j option.
+# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
+# for file presence and content; for now this will have to do.
+JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
+       $(shell expr 2 '*' $$(grep -c ^processor /proc/cpuinfo)), 2)
 
 # compiler/linker custom arguments
 DPDK_CPU_CFLAGS := -pie -fPIC
@@ -125,7 +131,6 @@ $(B)/custom-config: $(B)/.patch.ok Makefile
        $(call set,RTE_PKTMBUF_HEADROOM,$(DPDK_PKTMBUF_HEADROOM))
        $(call set,RTE_LIBEAL_USE_HPET,y)
        $(call set,RTE_BUILD_COMBINE_LIBS,y)
-       $(call set,RTE_LIBRTE_I40E_16BYTE_RX_DESC,y)
        $(call set,RTE_PCI_CONFIG,y)
        $(call set,RTE_PCI_EXTENDED_TAG,"on")
        $(call set,RTE_PCI_MAX_READ_REQUEST_SIZE,4096)