aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog43
-rw-r--r--debian/control23
-rw-r--r--debian/dpdk-doc.README.Debian14
-rw-r--r--debian/dpdk-igb-uio-dkms.dkms2
-rw-r--r--debian/dpdk-rte-kni-dkms.dkms2
-rw-r--r--debian/patches/dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch39
-rw-r--r--debian/patches/dpdk-dev-kni-fix-build-with-kernel-4.9.patch89
-rw-r--r--debian/patches/fix-vhost-user-socket-permission.patch16
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules65
-rw-r--r--debian/tests/control4
-rw-r--r--debian/tests/test-autotest58
12 files changed, 327 insertions, 30 deletions
diff --git a/debian/changelog b/debian/changelog
index 2eba6a80..fc474edd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,46 @@
+dpdk (16.07-2~git1) UNRELEASED; urgency=medium
+
+ * Team upload.
+
+ [ Christian Ehrhardt ]
+ * Fix d/p/fix-vhost-user-socket-permission.patch for dpdk 16.07
+ 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
+ available for auto-probing devices.
+ * d/rules support DEB_BUILD_OPTIONS parallel
+ * d/rules bundle autotest as it is ready after build into dpdk-dev
+ to make it available for autopkgtest and likewise developers.
+ * enable dpdk autotests
+ - d/t/test-autotest enable autotests as dep8 test. These fail in many
+ build environments, so put them in an adt where required characteristics
+ can be specified
+
+ [ Gowrishankar Muthukrishnan ]
+ * d/p/dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch to make
+ ip_pipeline work properly with -d eal parameter
+ * Update to d/p/dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch
+ fixing dl_open issues.
+
+ [ Santiago R.R. ]
+ * debian/rules: Only export hardening related building HOST_/EXTRA flags
+ when dpkg-dev < 1.18.11. On newer dpkg-dev versions, dpkg-buildflags
+ handle them directly and are injected by gcc (6.x). Closes: #843685.
+
+ [ Luca Boccassi ]
+ * Fix DKMS build to use the requested kernel version rather than the running
+ one. (Closes: #843864)
+ * Fix kernel modules build failures due to the new -fPIE default by passing
+ -fno-PIE.
+ * Backport dpdk-dev-kni-fix-build-with-kernel-4.9.patch to fix kernel modules
+ build failures on Linux 4.9.
+ * Mark dpdk-doc as Multi-Arch: foreign
+
+ -- Santiago Ruano Rincón <santiagorr@riseup.net> Wed, 09 Nov 2016 16:04:15 +0100
+
dpdk (16.07-1) unstable; urgency=medium
[ Christian Ehrhardt ]
diff --git a/debian/control b/debian/control
index 408fd261..5a7e68d2 100644
--- a/debian/control
+++ b/debian/control
@@ -31,10 +31,30 @@ Section: admin
Architecture: amd64 arm64 i386 ppc64el
Depends: lsb-base (>= 3.2-14),
pciutils,
+ python-pyelftools,
+ hwdata,
${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
@@ -56,6 +76,7 @@ Description: Data Plane Development Kit (development files)
Package: dpdk-doc
Section: doc
Architecture: all
+Multi-Arch: foreign
Homepage: http://dpdk.org/doc/guides/index.html
Depends: libjs-jquery, libjs-underscore, ${misc:Depends}, ${python:Depends}
Recommends: python, ${python:Recommends}
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/dpdk-igb-uio-dkms.dkms b/debian/dpdk-igb-uio-dkms.dkms
index 10dfecc7..5141ff61 100644
--- a/debian/dpdk-igb-uio-dkms.dkms
+++ b/debian/dpdk-igb-uio-dkms.dkms
@@ -1,7 +1,7 @@
PACKAGE_NAME="dpdk-igb-uio"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_NAME[0]="igb_uio"
-MAKE="source /usr/share/dpdk/dpdk-sdk-env.sh; make MODULE_CFLAGS='-I/usr/include/dpdk -include /usr/include/dpdk/rte_config.h'"
+MAKE="source /usr/share/dpdk/dpdk-sdk-env.sh; make MODULE_CFLAGS='-I/usr/include/dpdk -include /usr/include/dpdk/rte_config.h -fno-PIE' RTE_KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="source /usr/share/dpdk/dpdk-sdk-env.sh; make clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
diff --git a/debian/dpdk-rte-kni-dkms.dkms b/debian/dpdk-rte-kni-dkms.dkms
index efccf1fb..26de0ee3 100644
--- a/debian/dpdk-rte-kni-dkms.dkms
+++ b/debian/dpdk-rte-kni-dkms.dkms
@@ -1,7 +1,7 @@
PACKAGE_NAME="dpdk-rte-kni"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_NAME[0]="rte_kni"
-MAKE="source /usr/share/dpdk/dpdk-sdk-env.sh; make MODULE_CFLAGS='-I/usr/include/dpdk -include /usr/include/dpdk/rte_config.h -I$source_tree/dpdk-rte-kni-#MODULE_VERSION#/ethtool/ixgbe -I$source_tree/dpdk-rte-kni-#MODULE_VERSION#/ethtool/igb'"
+MAKE="source /usr/share/dpdk/dpdk-sdk-env.sh; make MODULE_CFLAGS='-I/usr/include/dpdk -include /usr/include/dpdk/rte_config.h -I$source_tree/dpdk-rte-kni-#MODULE_VERSION#/ethtool/ixgbe -I$source_tree/dpdk-rte-kni-#MODULE_VERSION#/ethtool/igb -fno-PIE' RTE_KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="source /usr/share/dpdk/dpdk-sdk-env.sh; make clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
diff --git a/debian/patches/dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch b/debian/patches/dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch
new file mode 100644
index 00000000..6ee2a7ef
--- /dev/null
+++ b/debian/patches/dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch
@@ -0,0 +1,39 @@
+From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
+Date: Wed, 21 Sep 2016 13:56:31 +0530
+Subject: [PATCH] examples: fix ip_pipeline to load PMD driver correctly
+
+There is typo in init.c of ip_pipeline example due to which,
+invalid file path is added to -d option of EAL i.e path starting
+with =.
+
+*Update*
+There was an issue identified in http://dpdk.org/dev/patchwork/patch/16363/
+which is folded in here to stay at just one patch.
+
+Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
+Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
+
+Origin: Upstream, http://dpdk.org/dev/patchwork/patch/15995/
+Author: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
+Last-update: 2016-10-04
+
+---
+ examples/ip_pipeline/init.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
+index cd167f6..27b0aa7 100644
+--- a/examples/ip_pipeline/init.c
++++ b/examples/ip_pipeline/init.c
+@@ -236,7 +236,7 @@ app_init_eal(struct app_params *app)
+ }
+
+ if (p->add_driver) {
+- snprintf(buffer, sizeof(buffer), "-d=%s", p->add_driver);
++ snprintf(buffer, sizeof(buffer), "-d%s", p->add_driver);
+ app->eal_argv[n_args++] = strdup(buffer);
+ }
+
+--
+1.9.1
+
diff --git a/debian/patches/dpdk-dev-kni-fix-build-with-kernel-4.9.patch b/debian/patches/dpdk-dev-kni-fix-build-with-kernel-4.9.patch
new file mode 100644
index 00000000..931965c3
--- /dev/null
+++ b/debian/patches/dpdk-dev-kni-fix-build-with-kernel-4.9.patch
@@ -0,0 +1,89 @@
+Description: compile error:
+ CC [M] .../lib/librte_eal/linuxapp/kni/igb_main.o
+.../lib/librte_eal/linuxapp/kni/igb_main.c:2317:21:
+error: initialization from incompatible pointer type
+ [-Werror=incompatible-pointer-types]
+ .ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
+ ^~~~~~~~~~~~~~~~~~~
+
+Linux kernel 4.9 updates API for ndo_set_vf_vlan:
+Linux: 79aab093a0b5 ("net: Update API for VF vlan protocol 802.1ad support")
+
+Use new API for Linux kernels >= 4.9
+
+Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
+Tested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
+
+Origin: Upstream, http://dpdk.org/dev/patchwork/patch/16651/
+Author: Luca Boccassi <luca.boccassi@gmail.com>
+Last-Update: 2016-10-17
+---
+ lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 19 +++++++++++++++++++
+ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++
+ 2 files changed, 23 insertions(+)
+
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+@@ -195,7 +195,11 @@ static void igb_process_mdd_event(struct
+ #ifdef IFLA_VF_MAX
+ static int igb_ndo_set_vf_mac( struct net_device *netdev, int vf, u8 *mac);
+ static int igb_ndo_set_vf_vlan(struct net_device *netdev,
++#ifdef HAVE_VF_VLAN_PROTO
++ int vf, u16 vlan, u8 qos, __be16 vlan_proto);
++#else
+ int vf, u16 vlan, u8 qos);
++#endif
+ #ifdef HAVE_VF_SPOOFCHK_CONFIGURE
+ static int igb_ndo_set_vf_spoofchk(struct net_device *netdev, int vf,
+ bool setting);
+@@ -6411,7 +6415,11 @@ static void igb_set_vmvir(struct igb_ada
+ }
+
+ static int igb_ndo_set_vf_vlan(struct net_device *netdev,
++#ifdef HAVE_VF_VLAN_PROTO
++ int vf, u16 vlan, u8 qos, __be16 vlan_proto)
++#else
+ int vf, u16 vlan, u8 qos)
++#endif
+ {
+ int err = 0;
+ struct igb_adapter *adapter = netdev_priv(netdev);
+@@ -6419,6 +6427,12 @@ static int igb_ndo_set_vf_vlan(struct ne
+ /* VLAN IDs accepted range 0-4094 */
+ if ((vf >= adapter->vfs_allocated_count) || (vlan > VLAN_VID_MASK-1) || (qos > 7))
+ return -EINVAL;
++
++#ifdef HAVE_VF_VLAN_PROTO
++ if (vlan_proto != htons(ETH_P_8021Q))
++ return -EPROTONOSUPPORT;
++#endif
++
+ if (vlan || qos) {
+ err = igb_vlvf_set(adapter, vlan, !!vlan, vf);
+ if (err)
+@@ -6579,7 +6593,12 @@ static inline void igb_vf_reset(struct i
+ if (adapter->vf_data[vf].pf_vlan)
+ igb_ndo_set_vf_vlan(adapter->netdev, vf,
+ adapter->vf_data[vf].pf_vlan,
++#ifdef HAVE_VF_VLAN_PROTO
++ adapter->vf_data[vf].pf_qos,
++ htons(ETH_P_8021Q));
++#else
+ adapter->vf_data[vf].pf_qos);
++#endif
+ else
+ igb_clear_vf_vfta(adapter, vf);
+ #endif
+--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+@@ -3906,6 +3906,10 @@ skb_set_hash(struct sk_buff *skb, __u32
+ #endif /* !RHEL 7.2 */
+ #endif /* 4.0.0 */
+
++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) )
++#define HAVE_VF_VLAN_PROTO
++#endif /* >= 4.9.0 */
++
+ #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) )
+ /* ndo_bridge_getlink adds new nlflags parameter */
+ #define HAVE_NDO_BRIDGE_GETLINK_NLFLAGS
diff --git a/debian/patches/fix-vhost-user-socket-permission.patch b/debian/patches/fix-vhost-user-socket-permission.patch
index ab3d6322..e75cbc25 100644
--- a/debian/patches/fix-vhost-user-socket-permission.patch
+++ b/debian/patches/fix-vhost-user-socket-permission.patch
@@ -27,7 +27,7 @@ Fixes LP: #1546565
Forwarded: yes
Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
-Last-Update: 2016-07-25
+Last-Update: 2016-09-28
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 7712bd2..28776b9 100644
@@ -361,11 +361,11 @@ index b35594d..dbdb8ad 100644
#define MAX_VIRTIO_BACKLOG 128
static void vhost_user_server_new_connection(int fd, void *data, int *remove);
-@@ -682,6 +684,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
- if (!vsocket)
- goto out;
- memset(vsocket, 0, sizeof(struct vhost_user_socket));
+@@ -699,6 +701,7 @@
+ vsocket->is_server = true;
+ ret = vhost_user_create_server(vsocket);
+ }
+ rte_eal_set_socket_permissions(path);
- vsocket->path = strdup(path);
- vsocket->connfd = -1;
-
+ if (ret < 0) {
+ free(vsocket->path);
+ free(vsocket);
diff --git a/debian/patches/series b/debian/patches/series
index 5c0a2991..0d8fd299 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,4 +18,6 @@ dpdk-dev-ppc-enable-4-7-sched-enable-on-ppc64le.patch
dpdk-dev-ppc-enable-5-7-table-fix-verification-on-hash-bucket-header-alignme.patch
dpdk-dev-ppc-enable-6-7-config-enable-packet-framework-on-ppc64le.patch
dpdk-dev-ppc-enable-7-7-examples-ip_pipeline-fix-lcore-mapping-for-ppc64.patch
+dpdk-dev-examples-ip_pipeline-fix-pmd-driver-parameter.patch
+dpdk-dev-kni-fix-build-with-kernel-4.9.patch
diff --git a/debian/rules b/debian/rules
index 064ffc3b..7a494468 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,20 +15,26 @@ DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
# see ENVIRONMENT in dpkg-buildflags(1)
-# package maintainers to append CFLAGS
-export DEB_CFLAGS_MAINT_APPEND = -fPIC
-# package maintainers to append LDFLAGS
-#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-
+DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
-export EXTRA_CFLAGS=$(CFLAGS)
-export EXTRA_CPPFLAGS=$(CPPFLAGS)
-export HOST_EXTRA_CFLAGS=$(CFLAGS)
-export HOST_EXTRA_CPPFLAGS=$(CPPFLAGS)
-# need to be stripped as DPDK build system adds them and it would be -Wl,-Wl,opt
-export EXTRA_LDFLAGS=$(shell echo $(LDFLAGS) | sed 's/-Wl,//g')
-# HOST_CC build system does not add -Wl ...
-export EXTRA_HOST_LDFLAGS=$(LDFLAGS)
+
+# Support backporting to jessie
+dpkg_version_lt = $(shell dpkg --compare-versions $$(dpkg --status dpkg-dev | grep Version | cut -d' ' -f2) lt-nl "1.18.11" && echo yes)
+ifeq (yes, $(dpkg_version_lt))
+ # package maintainers to append CFLAGS
+ # For Debian, dpkg-dev >= 1.18.11 and gcc 6.x, dpkg-buildflags and gcc
+ # handle -fPIC and related flags relying on specs files
+ # (/usr/share/dpkg/*specs)
+ export DEB_CFLAGS_MAINT_APPEND = -fPIC
+ export EXTRA_CFLAGS=$(CFLAGS)
+ export EXTRA_CPPFLAGS=$(CPPFLAGS)
+ export HOST_EXTRA_CFLAGS=$(CFLAGS)
+ export HOST_EXTRA_CPPFLAGS=$(CPPFLAGS)
+ # need to be stripped as DPDK build system adds them and it would be -Wl,-Wl,opt
+ export EXTRA_LDFLAGS=$(shell echo $(LDFLAGS) | sed 's/-Wl,//g')
+ # HOST_CC build system does not add -Wl ...
+ export EXTRA_HOST_LDFLAGS=$(LDFLAGS)
+endif
export RTE_DEVEL_BUILD=n
@@ -62,6 +68,13 @@ endif
DPDK_STATIC_DIR = "debian/build/static-root"
DPDK_SHARED_DIR = "debian/build/shared-root"
+# now stable with parallel comilation, so support -j
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+ PAR := "1"
+endif
+
# kernel_modules can be passed via DEB_BUILD_OPTIONS to enable building the
# optional binary kernel modules package. By default it will be built against
# the current kernel, or ksrc can be passed with a path to the target kernel
@@ -78,6 +91,7 @@ endif
KVERS := $(shell perl debian/kernel-version $(KSRC))
export KVERS
+export MODULE_CFLAGS=-fno-PIE
DPDK_CONFIG_BUILD_KMOD=y
@@ -129,6 +143,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))
@@ -138,7 +153,7 @@ endif
dh_auto_configure
override_dh_auto_build-indep:
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html \
+ $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html \
doc-guides-man
override_dh_auto_install-indep:
@@ -148,7 +163,7 @@ override_dh_auto_install-indep:
DESTDIR=debian/dpdk-doc install-doc
override_dh_auto_build-arch:
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build
+ $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build
# Unfortunately the decision about having static or shared libraries is
# made for the whole build, which then produces only .a or .so files
# (but not both).
@@ -161,7 +176,7 @@ override_dh_auto_build-arch:
cp -a $(DPDK_STATIC_DIR) $(DPDK_SHARED_DIR)
sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' \
$(DPDK_SHARED_DIR)/.config
- $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build
+ $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build
override_dh_auto_install-arch: LIBDIR=usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
override_dh_auto_install-arch:
@@ -182,6 +197,10 @@ override_dh_auto_install-arch:
cp $(DPDK_SHARED_DIR)/.config debian/dpdk-dev/usr/share/dpdk/config
sed -e 's/SDK_TARGET/$(RTE_TARGET)/' debian/dpdk-sdk-env.sh.in > \
debian/dpdk-dev/usr/share/dpdk/dpdk-sdk-env.sh
+ # include the bundled autotest suite to be usable from the dpdk-dev package
+ mkdir -p debian/dpdk-dev/usr/share/dpdk/test
+ cp -a app/test/autotest* debian/dpdk-dev/usr/share/dpdk/test
+ cp $(DPDK_SHARED_DIR)/app/test debian/dpdk-dev/usr/share/dpdk/test/
# Package: libdpdk-dev (bare headers, static devel libs and linker
# script)
mkdir -p debian/libdpdk-dev/$(LIBDIR)
@@ -206,9 +225,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
diff --git a/debian/tests/control b/debian/tests/control
index 4eb71038..7d624212 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -11,3 +11,7 @@ Tests: test-dkms
Restrictions: allow-stderr, isolation-machine, needs-root
Depends: kmod, dpdk-igb-uio-dkms [amd64 arm64 i386 ppc64el],
dpdk-rte-kni-dkms [amd64 arm64 i386 ppc64el]
+
+Tests: test-autotest
+Restrictions: allow-stderr, isolation-machine, needs-root
+Depends: dpdk-dev, python, python-pexpect
diff --git a/debian/tests/test-autotest b/debian/tests/test-autotest
new file mode 100644
index 00000000..b18ad2a3
--- /dev/null
+++ b/debian/tests/test-autotest
@@ -0,0 +1,58 @@
+#!/bin/bash
+set -eu
+
+basedir=$(dirname "$0")
+. "${basedir}"/check-dpdk-supported-arch.sh
+
+# since these tests really execute dpdk code they have to check for the
+# required minimum cpu features
+ARCH=$(dpkg --print-architecture)
+echo "Check required features on arch: ${ARCH}"
+case "${ARCH}" in
+ amd64)
+ if ! grep -q '^flags.*sse3' /proc/cpuinfo; then
+ echo "Missing sse3 on ${ARCH} - not supported, SKIP test"
+ exit 0
+ fi
+ ;;
+ *)
+ echo "DPDK autotest not supported on ${ARCH}, SKIP test"
+ exit 0
+ ;;
+esac
+echo "no known missing feature on ${ARCH}, continue test"
+
+echo "Get required 1G huge pages"
+echo 512 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
+sleep 5s
+realhp=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
+if [[ "$realhp" != "512" ]]; then
+ echo "Unable to allocate the huge pages required for the test, SKIP test"
+ exit 0
+fi
+
+# fetch build config
+. /usr/share/dpdk/dpdk-sdk-env.sh
+
+# Reasons for not being an dh_autotest
+# - needs root and hugepages
+# - build environment capabilities too unpredictable
+# - certain workarounds needed to get running, needing root for some which is
+# not available in the build environment
+
+# blacklist reasons:
+# known upstream: http://www.dpdk.org/ml/archives/dev/2016-May/038849.html
+# - KNI: we deliver via dkms but test doesn't match
+# - power_acpi_cpufreq: in many environments blocked by other cpufreq
+# - power_kvm_vm_autotest: no avail in all environments, only for virt power management e.g. /dev/virtio-ports/virtio.serial.port.poweragent.0
+# - IVSHMEM fails in virtual environment
+# - eal_flags needs at least 8 cpus for lcores test not to fail
+# - pci doesn't initialize in all virt env causing command not found issues
+# - rather slow performance tests not suited for regular build associated tests: ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf
+
+python "${RTE_SDK}/test/autotest.py" \
+ "${RTE_SDK}/test/test" \
+ "${RTE_TARGET}" \
+ "-KNI,power_acpi_cpufreq,power_kvm_vm,IVSHMEM,eal_flags,pci,ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf" \
+
+echo "OK"