aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2016-09-29 18:18:37 +0000
committerGerrit Code Review <gerrit@fd.io>2016-09-29 18:18:37 +0000
commitb6a44972963051e04cbdc00a7810c9d900be004e (patch)
tree71673c1db653c444b5bfe482462fad554b6aeae0
parentf1196bae2634ee36dd5bbc2dcc6aad5238faa7e9 (diff)
parentfe79dd192a7d47562967c72d748eb9d872633f48 (diff)
Merge changes from topic 'fix-autoloader' into deb_dpdk_16.07
* changes: changelog: add PMDs as recommend for dpdk runtime add PMDs as recommend for dpdk runtime. add empty RTE_EAL_PMD_PATH dir to librte_eal changelog: utilize RTE_EAL_PMD_PATH document pmd autoloading utilize RTE_EAL_PMD_PATH
-rw-r--r--debian/changelog4
-rw-r--r--debian/control20
-rw-r--r--debian/dpdk-doc.README.Debian14
-rwxr-xr-xdebian/rules15
4 files changed, 49 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index dbe36170..b5a00513 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,10 @@ dpdk (16.07-0~git1) UNRELEASED; urgency=medium
server/client sockets.
* d/control add python-elftools and hwdata dependencies to dpdk for the tool
dpdk-pmdinfo.
+ * d/rules utilize RTE_EAL_PMD_PATH to autoload pmd drivers
+ - d/dpdk-doc.README.Debian document usage of RTE_EAL_PMD_PATH
+ - d/control let the runtime of dpdk recommend the pmd drivers to make them
+ avail for auto-proping devices.
[ Anders Roxell ]
* debian/control: add pciutils to the dpdk depends list, since lspci is used
diff --git a/debian/control b/debian/control
index 5807c065..348e15f5 100644
--- a/debian/control
+++ b/debian/control
@@ -36,7 +36,25 @@ Depends: lsb-base (>= 3.2-14),
${misc:Depends},
${python:Depends},
${shlibs:Depends}
-Recommends: dpdk-igb-uio-dkms (= ${binary:Version}) [arm64], dpdk-rte-kni-dkms (= ${binary:Version}) [arm64]
+Recommends: dpdk-igb-uio-dkms (= ${binary:Version}) [arm64], dpdk-rte-kni-dkms (= ${binary:Version}) [arm64],
+ librte-pmd-af-packet1 (= ${binary:Version}),
+ librte-pmd-bnxt1 (= ${binary:Version}),
+ librte-pmd-bond1 (= ${binary:Version}),
+ librte-pmd-cxgbe1 (= ${binary:Version}),
+ librte-pmd-e1000-1 (= ${binary:Version}),
+ librte-pmd-ena1 (= ${binary:Version}),
+ librte-pmd-enic1 (= ${binary:Version}) [amd64 arm64 i386],
+ librte-pmd-fm10k1 (= ${binary:Version}) [amd64 i386],
+ librte-pmd-i40e1 (= ${binary:Version}) [amd64 i386],
+ librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386],
+ librte-pmd-null-crypto1 (= ${binary:Version}),
+ librte-pmd-null1 (= ${binary:Version}),
+ librte-pmd-pcap1 (= ${binary:Version}),
+ librte-pmd-ring2 (= ${binary:Version}),
+ librte-pmd-vhost1 (= ${binary:Version}),
+ librte-pmd-virtio1 (= ${binary:Version}),
+ librte-pmd-vmxnet3-uio1 (= ${binary:Version}) [amd64 arm64 i386],
+ librte-pmd-xenvirt1 (= ${binary:Version}) [amd64 arm64 i386],
Suggests: linux-image-generic, dpdk-igb-uio-dkms (= ${binary:Version}), dpdk-rte-kni-dkms (= ${binary:Version})
Description: Data Plane Development Kit (runtime)
DPDK is a set of libraries for fast packet processing. Applications run
diff --git a/debian/dpdk-doc.README.Debian b/debian/dpdk-doc.README.Debian
index 774a08cd..0e3866a9 100644
--- a/debian/dpdk-doc.README.Debian
+++ b/debian/dpdk-doc.README.Debian
@@ -49,4 +49,16 @@ against dpdk-dev that file will be adjusted for you.
Alternatively /usr/include/dpdk/rte_config.h has to be pre-included:
CFLAGS += -I/usr/include/dpdk -irte_config.h
- -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 04 Feb 2016 09:16:11 +0100
+librte-pmd-* and DPDK PMD autoloading:
+
+PMD driver autoloading. DPDK since its split into several libraries does not
+have all PMD drivers available by default. One always can use EAL argument -d
+to provide a path to an extra .so file.
+TO ease daily usage RTE_EAL_PMD_PATH is set to
+/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/dpdk-pmds/.
+Each librte-pmd-* package will place a symlink in there which makes DPDK load
+and register it as PMD on startup.
+This can also be used to globally enable extra PMD drivers as you can link
+self-provided .so files in there to be considered.
+
+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 29 Sep 2016 13:04:47 +0200
diff --git a/debian/rules b/debian/rules
index 064ffc3b..ccd61406 100755
--- a/debian/rules
+++ b/debian/rules
@@ -129,6 +129,7 @@ ifeq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS)))
-e 's,(CONFIG_RTE_KNI_KMOD=).*,\1$(DPDK_CONFIG_BUILD_KMOD),' \
-e 's,(LIBRTE_PMD_PCAP=).*,\1y,' \
-e 's,(LIBRTE_PMD_XENVIRT=).*,\1y,' \
+ -e 's,(CONFIG_RTE_EAL_PMD_PATH=).*,\1"/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/dpdk-pmds/",' \
$(DPDK_STATIC_DIR)/.config
# xen not available on ppc64el
ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el))
@@ -206,9 +207,19 @@ override_dh_auto_install-arch:
else \
PKG=$${LN}$${VER}; \
fi; \
+ LIBF="$$(basename $${lib})"; \
+ LIBD="debian/$${PKG}/$(LIBDIR)"; \
echo "moving $${lib} for library $${PKG}"; \
- mkdir -p debian/$${PKG}/$(LIBDIR); \
- mv $${lib} debian/$${PKG}/$(LIBDIR); \
+ 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}; \
+ fi; \
+ if [ "$${LIBF#librte_eal}x" != "$${LIBF}x" ]; then \
+ mkdir -p $${LIBD}/dpdk-pmds; \
+ fi; \
done
# pkg-config
mkdir -p debian/libdpdk-dev/$(LIBDIR)/pkgconfig