aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-01-04 13:51:27 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-01-04 14:12:50 +0100
commitcf2b2208378ed8c7e2c4759fa962ca91e6522c77 (patch)
tree7c6af3fd677d5e4378bfaae86ab305afb22987ea
parenta1f3a36e3ed05eeaf2ebe29b0ad4416729f055f3 (diff)
d/rules: make auto-loaded drivers dir versioned
The dir registered as CONFIG_RTE_EAL_PMD_PATH= will be loaded by EAL. But that is an issue if multiple versions of DPDK are co-installed. Version A of EAL might load drivers of version B or vice versa. Since this isn't the normal linker loads, but loads from a dir we must version it to avoid issues of these cross-version loads. Fixes: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1741244 Change-Id: I4e97f077f531f7fcb746a2c5b2ffec60d140a4a1 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
-rwxr-xr-xdebian/rules17
1 files changed, 9 insertions, 8 deletions
diff --git a/debian/rules b/debian/rules
index ef7af402..41eb0e09 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,6 +8,7 @@ export DH_OPTIONS=-v
include /usr/share/dpkg/default.mk
DPDK_ABI := $(shell echo $(DEB_VERSION_UPSTREAM) | cut -d '-' -f1 | cut -d '.' -f1-2 | cut -d '~' -f1)
+DPDK_DRIVER_DIR ?= dpdk-$(DPDK_ABI)-drivers
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
@@ -181,7 +182,7 @@ ifeq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
-e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1$(DPDK_CONFIG_BUILD_KMOD),' \
-e 's,(CONFIG_RTE_KNI_KMOD=).*,\1$(DPDK_CONFIG_BUILD_KMOD),' \
-e 's,(LIBRTE_PMD_PCAP=).*,\1y,' \
- -e 's,(CONFIG_RTE_EAL_PMD_PATH=).*,\1"/usr/lib/$(DEB_HOST_MULTIARCH)/dpdk-pmds/",' \
+ -e 's,(CONFIG_RTE_EAL_PMD_PATH=).*,\1"/usr/lib/$(DEB_HOST_MULTIARCH)/$(DPDK_DRIVER_DIR)/",' \
$(DPDK_STATIC_DIR)/.config
endif
echo "CONFIG_RTE_MAJOR_ABI=\"$(DPDK_ABI)\"" >> \
@@ -318,17 +319,17 @@ endif
mkdir -p $${LIBD}; \
mv $${lib} $${LIBD}; \
if [ "$${LIBF#librte_pmd_}x" != "$${LIBF}x" ]; then \
- mkdir -p $${LIBD}/dpdk-pmds; \
- echo "PMD: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/dpdk-pmds/"; \
- ln -s --relative --target-directory=$${LIBD}/dpdk-pmds/ $${LIBD}/$${LIBF}; \
+ mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
+ echo "PMD: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/$(DPDK_DRIVER_DIR)/"; \
+ ln -s --relative --target-directory=$${LIBD}/$(DPDK_DRIVER_DIR)/ $${LIBD}/$${LIBF}; \
fi; \
if [ "$${LIBF#librte_mempool_}x" != "$${LIBF}x" ]; then \
- mkdir -p $${LIBD}/dpdk-pmds; \
- echo "MEMPOOL: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/dpdk-pmds/"; \
- ln -s --relative --target-directory=$${LIBD}/dpdk-pmds/ $${LIBD}/$${LIBF}; \
+ mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
+ echo "MEMPOOL: linking $${LIBF} into RTE_EAL_PMD_PATH at $${LIBD}/$(DPDK_DRIVER_DIR)/"; \
+ ln -s --relative --target-directory=$${LIBD}/$(DPDK_DRIVER_DIR)/ $${LIBD}/$${LIBF}; \
fi; \
if [ "$${LIBF#librte_eal}x" != "$${LIBF}x" ]; then \
- mkdir -p $${LIBD}/dpdk-pmds; \
+ mkdir -p $${LIBD}/$(DPDK_DRIVER_DIR); \
fi; \
done
# pkg-config