From 155e2da43497ec305ae7e716a0f34056ea708855 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 18 May 2017 19:21:38 +0100 Subject: Add option to disable docs build Takes some good time to build the documentation, so add a DEB_BUILD_OPTIONS nodocs variable to let users disable it. Change-Id: I8cb44d31329367784d2987ecba008143be089376 Signed-off-by: Luca Boccassi --- debian/rules | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 9e272aa6..5d2f1590 100755 --- a/debian/rules +++ b/debian/rules @@ -75,6 +75,12 @@ else PAR := "1" endif +ifneq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) +BUILD_DOCS=n +else +BUILD_DOCS=y +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 @@ -159,14 +165,18 @@ endif dh_auto_configure override_dh_auto_build-indep: +ifeq (y,$(BUILD_DOCS)) $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html \ doc-guides-man +endif override_dh_auto_install-indep: # Package: dpdk-doc # All files based on the install-doc rule (includes examples) +ifeq (y,$(BUILD_DOCS)) $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) prefix=/usr \ DESTDIR=debian/dpdk-doc install-doc +endif override_dh_auto_build-arch: $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build -- cgit 1.2.3-korg From 7c050e2c5af0b0c17a6a16ba0ce0d225f48800c6 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 18 May 2017 19:23:09 +0100 Subject: Mention nodocs in the changelog Change-Id: I783260ab87439108b96010ff3c5b1c5ea3b48555 Signed-off-by: Luca Boccassi --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7d9b322d..dfe2574d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium and Debian's multiarch dir. Thanks Jan Blunck! * Clarify that only the kni and igb_uio kernel modules are distributed exclusively under the GPL2 in debian/copyright + * Add new DEB_BUILD_OPTIONS "nodocs" to allow users to avoid + building the DPDK documentation -- Christian Ehrhardt Thu, 08 Dec 2016 16:58:37 +0100 -- cgit 1.2.3-korg From 5608358c4fb189d7991cd7f5a2e615ac8e558b36 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 18 May 2017 19:24:45 +0100 Subject: Add option to disable static libraries build Upstream's build system requires a complete rebuild to have both static and shared libraries, which takes time. Add a DEB_BUILD_OPTIONS nostatic variable to let users disable it. Change-Id: If33884e0b85f8fb00c8293bae3e1668db6c74e4c Signed-off-by: Luca Boccassi --- debian/rules | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 5d2f1590..3a4b3197 100755 --- a/debian/rules +++ b/debian/rules @@ -81,6 +81,12 @@ else BUILD_DOCS=y endif +ifneq (,$(findstring nostatic,$(DEB_BUILD_OPTIONS))) +BUILD_STATIC_LIB=n +else +BUILD_STATIC_LIB=y +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 @@ -179,7 +185,9 @@ ifeq (y,$(BUILD_DOCS)) endif override_dh_auto_build-arch: +ifeq (y,$(BUILD_STATIC_LIB)) $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build +endif # 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). @@ -197,8 +205,10 @@ override_dh_auto_build-arch: override_dh_auto_install-arch: LIBDIR=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) override_dh_auto_install-arch: # Package: dpdk (runtime) +ifeq (y,$(BUILD_STATIC_LIB)) $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) prefix=/usr libdir=$(LIBDIR) \ DESTDIR=debian/dpdk install-runtime +endif $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) prefix=/usr libdir=$(LIBDIR) \ DESTDIR=debian/dpdk install-runtime mkdir -p debian/dpdk/etc/dpdk @@ -234,7 +244,9 @@ override_dh_auto_install-arch: mkdir -p debian/libdpdk-dev/usr/include mv debian/dpdk-dev/usr/include/dpdk debian/libdpdk-dev/usr/include/ # all static libs are in the dev package +ifeq (y,$(BUILD_STATIC_LIB)) mv debian/dpdk/$(LIBDIR)/lib*.a debian/libdpdk-dev/$(LIBDIR)/ +endif # symlinks to last .so's are in the non versioned libdpdk-dev as well # this allows multiple libdpdk- at different VER concurrently # libdpdk-dev depends on all sublibs so symlinks are never broken -- cgit 1.2.3-korg From cf68ea1a942bda6d7610440eba1fea70ec8cd42e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 18 May 2017 19:26:08 +0100 Subject: Mention nostatic in the changelog Change-Id: I3547273ac7728105f52fa0465cadd7d39aa43fb2 Signed-off-by: Luca Boccassi --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index dfe2574d..826d7edc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium distributed exclusively under the GPL2 in debian/copyright * Add new DEB_BUILD_OPTIONS "nodocs" to allow users to avoid building the DPDK documentation + * Add new DEB_BUILD_OPTIONS "nostatic" to allow users to avoid + building the DPDK static libraries -- Christian Ehrhardt Thu, 08 Dec 2016 16:58:37 +0100 -- cgit 1.2.3-korg From 0339153291daecfe3da67d785f2f22495ca2a31f Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 10:42:39 +0200 Subject: sPAPR IOMMU based pci probing This fixes probing on ppc64el for vfio-pci devices Change-Id: I92fd6108e9e3cb00f9cb66ce94eee51202b925e5 Signed-off-by: Christian Ehrhardt --- ...rt-in-pci-probing-for-vfio-pci-in-ppc64le.patch | 165 +++++++++++++++++++++ debian/patches/series | 2 +- 2 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 debian/patches/dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch (limited to 'debian') diff --git a/debian/patches/dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch b/debian/patches/dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch new file mode 100644 index 00000000..14435be2 --- /dev/null +++ b/debian/patches/dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch @@ -0,0 +1,165 @@ +Description: eal: sPAPR IOMMU support in pci probing for vfio-pci in ppc64le + + From: Gowrishankar Muthukrishnan + + Below changes adds pci probing support for vfio-pci devices in power8. + + v3 - better validation for kernel not implementing few iocts called + v2 - kernel version checked and doc updated + + Signed-off-by: Gowrishankar Muthukrishnan + +Note: can be dropped >=DPDK 17.05 + +Forwarded: yes, http://dpdk.org/dev/patchwork/patch/21482/ +Original-Author: Gowrishankar Muthukrishnan +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1670689 +Author: Christian Ehrhardt +Last-Update: 2017-03-07 + +--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c ++++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c +@@ -50,12 +50,15 @@ + static struct vfio_config vfio_cfg; + + static int vfio_type1_dma_map(int); ++static int vfio_spapr_dma_map(int); + static int vfio_noiommu_dma_map(int); + + /* IOMMU types we support */ + static const struct vfio_iommu_type iommu_types[] = { + /* x86 IOMMU, otherwise known as type 1 */ + { RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map}, ++ /* ppc64 IOMMU, otherwise known as spapr */ ++ { RTE_VFIO_SPAPR, "sPAPR", &vfio_spapr_dma_map}, + /* IOMMU-less mode */ + { RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map}, + }; +@@ -537,6 +540,93 @@ + } + + return 0; ++} ++ ++static int ++vfio_spapr_dma_map(int vfio_container_fd) ++{ ++ const struct rte_memseg *ms = rte_eal_get_physmem_layout(); ++ int i, ret; ++ ++ struct vfio_iommu_spapr_register_memory reg = { ++ .argsz = sizeof(reg), ++ .flags = 0 ++ }; ++ struct vfio_iommu_spapr_tce_info info = { ++ .argsz = sizeof(info), ++ }; ++ struct vfio_iommu_spapr_tce_create create = { ++ .argsz = sizeof(create), ++ }; ++ struct vfio_iommu_spapr_tce_remove remove = { ++ .argsz = sizeof(remove), ++ }; ++ ++ /* query spapr iommu info */ ++ ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_GET_INFO, &info); ++ if (ret) { ++ RTE_LOG(ERR, EAL, " cannot get iommu info, " ++ "error %i (%s)\n", errno, strerror(errno)); ++ return -1; ++ } ++ ++ /* remove default DMA of 32 bit window */ ++ remove.start_addr = info.dma32_window_start; ++ ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_REMOVE, &remove); ++ if (ret) { ++ RTE_LOG(ERR, EAL, " cannot remove default DMA window, " ++ "error %i (%s)\n", errno, strerror(errno)); ++ return -1; ++ } ++ ++ /* calculate window size based on number of hugepages configured */ ++ create.window_size = rte_eal_get_physmem_size(); ++ create.page_shift = __builtin_ctzll(ms->hugepage_sz); ++ create.levels = 2; ++ ++ ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_CREATE, &create); ++ if (ret) { ++ RTE_LOG(ERR, EAL, " cannot create new DMA window, " ++ "error %i (%s)\n", errno, strerror(errno)); ++ return -1; ++ } ++ ++ /* map all DPDK segments for DMA. use 1:1 PA to IOVA mapping */ ++ for (i = 0; i < RTE_MAX_MEMSEG; i++) { ++ struct vfio_iommu_type1_dma_map dma_map; ++ ++ if (ms[i].addr == NULL) ++ break; ++ ++ reg.vaddr = (uintptr_t) ms[i].addr; ++ reg.size = ms[i].len; ++ ret = ioctl(vfio_container_fd, ++ VFIO_IOMMU_SPAPR_REGISTER_MEMORY, ®); ++ if (ret) { ++ RTE_LOG(ERR, EAL, " cannot register vaddr for IOMMU, " ++ "error %i (%s)\n", errno, strerror(errno)); ++ return -1; ++ } ++ ++ memset(&dma_map, 0, sizeof(dma_map)); ++ dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map); ++ dma_map.vaddr = ms[i].addr_64; ++ dma_map.size = ms[i].len; ++ dma_map.iova = ms[i].phys_addr; ++ dma_map.flags = VFIO_DMA_MAP_FLAG_READ | ++ VFIO_DMA_MAP_FLAG_WRITE; ++ ++ ret = ioctl(vfio_container_fd, VFIO_IOMMU_MAP_DMA, &dma_map); ++ ++ if (ret) { ++ RTE_LOG(ERR, EAL, " cannot set up DMA remapping, " ++ "error %i (%s)\n", errno, strerror(errno)); ++ return -1; ++ } ++ ++ } ++ ++ return 0; + } + + static int +--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h ++++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h +@@ -54,6 +54,31 @@ + + #define RTE_VFIO_TYPE1 VFIO_TYPE1_IOMMU + ++#ifndef VFIO_SPAPR_TCE_v2_IOMMU ++#define RTE_VFIO_SPAPR 7 ++#define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17) ++#define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19) ++#define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) ++struct vfio_iommu_spapr_register_memory { ++ uint32_t argsz; ++ uint32_t flags; ++ uint64_t vaddr; ++ uint64_t size; ++}; ++struct vfio_iommu_spapr_tce_create { ++ uint32_t argsz; ++ uint32_t page_shift; ++ uint64_t window_size; ++ uint32_t levels; ++}; ++struct vfio_iommu_spapr_tce_remove { ++ uint32_t argsz; ++ uint64_t start_addr; ++}; ++#else ++#define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU ++#endif ++ + #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) + #define RTE_VFIO_NOIOMMU 8 + #else diff --git a/debian/patches/series b/debian/patches/series index 6921ee07..9242e897 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,3 @@ fix-vhost-user-socket-permission.patch fix-power-default-config.patch - +dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch -- cgit 1.2.3-korg From 00a414e72a6c3ca7a5a3ed68bd2ba029bcb92d7d Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 11:05:13 +0200 Subject: changelog: sPAPR IOMMU based pci probing Change-Id: I48fecc96cfacf2cb94836f687a385d280f2ce685 Signed-off-by: Christian Ehrhardt --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 826d7edc..ef54a1ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium see http://dpdk.org/ml/archives/dev/2017-March/058930.html * dpdk.conf: add info about unwanted effects of multiple hugepage mountpoints + * d/p/dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci- + in-ppc64le.patch: sPAPR IOMMU based pci probing enabled for vfio-pci + devices. [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 7e013c6935818ed748ddd09c4aa37081b3a0ccf7 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 10:49:58 +0200 Subject: i40e PMD / i40e vector PMD on ppc64el Change-Id: Id483b5f72c83b5f5860ea6cfb74ff21b494b1643 Signed-off-by: Christian Ehrhardt --- debian/control | 6 +- ...-v4-i40e-implement-vector-PMD-for-altivec.patch | 724 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 728 insertions(+), 3 deletions(-) create mode 100644 debian/patches/dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch (limited to 'debian') diff --git a/debian/control b/debian/control index 37c14d33..5e25515d 100644 --- a/debian/control +++ b/debian/control @@ -45,7 +45,7 @@ Recommends: dpdk-igb-uio-dkms (= ${binary:Version}) [arm64], 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-i40e1 (= ${binary:Version}) [amd64 i386 ppc64el], librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386], librte-pmd-null-crypto1 (= ${binary:Version}), librte-pmd-null1 (= ${binary:Version}), @@ -152,7 +152,7 @@ Depends: libpcap-dev, 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-i40e1 (= ${binary:Version}) [amd64 i386 ppc64el], librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386], librte-pmd-null-crypto1 (= ${binary:Version}), librte-pmd-null1 (= ${binary:Version}), @@ -522,7 +522,7 @@ Description: Data Plane Development Kit (librte-pmd-fm10k runtime library) This package contains the runtime libraries for librte_pmd_fm10k. Package: librte-pmd-i40e1 -Architecture: amd64 i386 +Architecture: amd64 i386 ppc64el Multi-Arch: same Homepage: http://dpdk.org/doc/guides/nics/i40e.html Pre-Depends: ${misc:Pre-Depends} diff --git a/debian/patches/dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch b/debian/patches/dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch new file mode 100644 index 00000000..a1001cf0 --- /dev/null +++ b/debian/patches/dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch @@ -0,0 +1,724 @@ +Description: i40e: implement vector PMD for altivec + + From: Gowrishankar Muthukrishnan + + This patch enables i40e driver in powerpc along with its altivec + intrinsic support. + + Changes: + v4 - docs and config update. + v3 - minor corrections for coding style standard. + v2 - minor corrections for gcc strict aliasing and coding style standard. + + Signed-off-by: Gowrishankar Muthukrishnan + +Note: can be dropped >=DPDK 17.05 + +Forwarded: yes, http://dpdk.org/dev/patchwork/patch/20680/ +Original-Author: Gowrishankar Muthukrishnan +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1670686 +Author: Christian Ehrhardt +Last-Update: 2017-03-07 + +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -166,6 +166,7 @@ + M: Chao Zhu + F: lib/librte_eal/common/arch/ppc_64/ + F: lib/librte_eal/common/include/arch/ppc_64/ ++F: drivers/net/i40e/i40e_rxtx_vec_altivec.c + + Intel x86 + M: Bruce Richardson +--- a/config/defconfig_ppc_64-power8-linuxapp-gcc ++++ b/config/defconfig_ppc_64-power8-linuxapp-gcc +@@ -49,7 +49,6 @@ + # Note: Initially, all of the PMD drivers compilation are turned off on Power + # Will turn on them only after the successful testing on Power + CONFIG_RTE_LIBRTE_IXGBE_PMD=n +-CONFIG_RTE_LIBRTE_I40E_PMD=n + CONFIG_RTE_LIBRTE_VIRTIO_PMD=y + CONFIG_RTE_LIBRTE_VMXNET3_PMD=n + CONFIG_RTE_LIBRTE_ENIC_PMD=n +--- a/doc/guides/nics/features/i40e.ini ++++ b/doc/guides/nics/features/i40e.ini +@@ -46,3 +46,4 @@ + x86-32 = Y + x86-64 = Y + ARMv8 = Y ++Power8 = Y +--- a/doc/guides/nics/features/i40e_vec.ini ++++ b/doc/guides/nics/features/i40e_vec.ini +@@ -38,3 +38,4 @@ + x86-32 = Y + x86-64 = Y + ARMv8 = Y ++Power8 = Y +--- a/drivers/net/i40e/Makefile ++++ b/drivers/net/i40e/Makefile +@@ -99,6 +99,8 @@ + SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_rxtx.c + ifeq ($(CONFIG_RTE_ARCH_ARM64),y) + SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_neon.c ++else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y) ++SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_altivec.c + else + SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_sse.c + endif +--- /dev/null ++++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c +@@ -0,0 +1,654 @@ ++/*- ++ * BSD LICENSE ++ * ++ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. ++ * Copyright(c) 2017 IBM Corporation. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * ++ * * Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * * Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in ++ * the documentation and/or other materials provided with the ++ * distribution. ++ * * Neither the name of Intel Corporation nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#include ++#include ++#include ++ ++#include "base/i40e_prototype.h" ++#include "base/i40e_type.h" ++#include "i40e_ethdev.h" ++#include "i40e_rxtx.h" ++#include "i40e_rxtx_vec_common.h" ++ ++#include ++ ++#pragma GCC diagnostic ignored "-Wcast-qual" ++ ++static inline void ++i40e_rxq_rearm(struct i40e_rx_queue *rxq) ++{ ++ int i; ++ uint16_t rx_id; ++ volatile union i40e_rx_desc *rxdp; ++ ++ struct i40e_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start]; ++ struct rte_mbuf *mb0, *mb1; ++ ++ vector unsigned long hdr_room = (vector unsigned long){ ++ RTE_PKTMBUF_HEADROOM, ++ RTE_PKTMBUF_HEADROOM}; ++ vector unsigned long dma_addr0, dma_addr1; ++ ++ rxdp = rxq->rx_ring + rxq->rxrearm_start; ++ ++ /* Pull 'n' more MBUFs into the software ring */ ++ if (rte_mempool_get_bulk(rxq->mp, ++ (void *)rxep, ++ RTE_I40E_RXQ_REARM_THRESH) < 0) { ++ if (rxq->rxrearm_nb + RTE_I40E_RXQ_REARM_THRESH >= ++ rxq->nb_rx_desc) { ++ dma_addr0 = (vector unsigned long){}; ++ for (i = 0; i < RTE_I40E_DESCS_PER_LOOP; i++) { ++ rxep[i].mbuf = &rxq->fake_mbuf; ++ vec_st(dma_addr0, 0, ++ (vector unsigned long *)&rxdp[i].read); ++ } ++ } ++ rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed += ++ RTE_I40E_RXQ_REARM_THRESH; ++ return; ++ } ++ ++ /* Initialize the mbufs in vector, process 2 mbufs in one loop */ ++ for (i = 0; i < RTE_I40E_RXQ_REARM_THRESH; i += 2, rxep += 2) { ++ vector unsigned long vaddr0, vaddr1; ++ uintptr_t p0, p1; ++ ++ mb0 = rxep[0].mbuf; ++ mb1 = rxep[1].mbuf; ++ ++ /* Flush mbuf with pkt template. ++ * Data to be rearmed is 6 bytes long. ++ * Though, RX will overwrite ol_flags that are coming next ++ * anyway. So overwrite whole 8 bytes with one load: ++ * 6 bytes of rearm_data plus first 2 bytes of ol_flags. ++ */ ++ p0 = (uintptr_t)&mb0->rearm_data; ++ *(uint64_t *)p0 = rxq->mbuf_initializer; ++ p1 = (uintptr_t)&mb1->rearm_data; ++ *(uint64_t *)p1 = rxq->mbuf_initializer; ++ ++ /* load buf_addr(lo 64bit) and buf_physaddr(hi 64bit) */ ++ vaddr0 = vec_ld(0, (vector unsigned long *)&mb0->buf_addr); ++ vaddr1 = vec_ld(0, (vector unsigned long *)&mb1->buf_addr); ++ ++ /* convert pa to dma_addr hdr/data */ ++ dma_addr0 = vec_mergel(vaddr0, vaddr0); ++ dma_addr1 = vec_mergel(vaddr1, vaddr1); ++ ++ /* add headroom to pa values */ ++ dma_addr0 = vec_add(dma_addr0, hdr_room); ++ dma_addr1 = vec_add(dma_addr1, hdr_room); ++ ++ /* flush desc with pa dma_addr */ ++ vec_st(dma_addr0, 0, (vector unsigned long *)&rxdp++->read); ++ vec_st(dma_addr1, 0, (vector unsigned long *)&rxdp++->read); ++ } ++ ++ rxq->rxrearm_start += RTE_I40E_RXQ_REARM_THRESH; ++ if (rxq->rxrearm_start >= rxq->nb_rx_desc) ++ rxq->rxrearm_start = 0; ++ ++ rxq->rxrearm_nb -= RTE_I40E_RXQ_REARM_THRESH; ++ ++ rx_id = (uint16_t)((rxq->rxrearm_start == 0) ? ++ (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1)); ++ ++ /* Update the tail pointer on the NIC */ ++ I40E_PCI_REG_WRITE(rxq->qrx_tail, rx_id); ++} ++ ++/* Handling the offload flags (olflags) field takes computation ++ * time when receiving packets. Therefore we provide a flag to disable ++ * the processing of the olflags field when they are not needed. This ++ * gives improved performance, at the cost of losing the offload info ++ * in the received packet ++ */ ++#ifdef RTE_LIBRTE_I40E_RX_OLFLAGS_ENABLE ++ ++static inline void ++desc_to_olflags_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts) ++{ ++ vector unsigned int vlan0, vlan1, rss, l3_l4e; ++ ++ /* mask everything except RSS, flow director and VLAN flags ++ * bit2 is for VLAN tag, bit11 for flow director indication ++ * bit13:12 for RSS indication. ++ */ ++ const vector unsigned int rss_vlan_msk = (vector unsigned int){ ++ (int32_t)0x1c03804, (int32_t)0x1c03804, ++ (int32_t)0x1c03804, (int32_t)0x1c03804}; ++ ++ /* map rss and vlan type to rss hash and vlan flag */ ++ const vector unsigned char vlan_flags = (vector unsigned char){ ++ 0, 0, 0, 0, ++ PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0}; ++ ++ const vector unsigned char rss_flags = (vector unsigned char){ ++ 0, PKT_RX_FDIR, 0, 0, ++ 0, 0, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH | PKT_RX_FDIR, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0}; ++ ++ const vector unsigned char l3_l4e_flags = (vector unsigned char){ ++ 0, ++ PKT_RX_IP_CKSUM_BAD, ++ PKT_RX_L4_CKSUM_BAD, ++ PKT_RX_L4_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD | PKT_RX_IP_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD, ++ PKT_RX_EIP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD ++ | PKT_RX_IP_CKSUM_BAD, ++ 0, 0, 0, 0, 0, 0, 0, 0}; ++ ++ vlan0 = (vector unsigned int)vec_mergel(descs[0], descs[1]); ++ vlan1 = (vector unsigned int)vec_mergel(descs[2], descs[3]); ++ vlan0 = (vector unsigned int)vec_mergeh(vlan0, vlan1); ++ ++ vlan1 = vec_and(vlan0, rss_vlan_msk); ++ vlan0 = (vector unsigned int)vec_perm(vlan_flags, ++ (vector unsigned char){}, ++ *(vector unsigned char *)&vlan1); ++ ++ rss = vec_sr(vlan1, (vector unsigned int){11, 11, 11, 11}); ++ rss = (vector unsigned int)vec_perm(rss_flags, (vector unsigned char){}, ++ *(vector unsigned char *)&rss); ++ ++ l3_l4e = vec_sr(vlan1, (vector unsigned int){22, 22, 22, 22}); ++ l3_l4e = (vector unsigned int)vec_perm(l3_l4e_flags, ++ (vector unsigned char){}, ++ *(vector unsigned char *)&l3_l4e); ++ ++ vlan0 = vec_or(vlan0, rss); ++ vlan0 = vec_or(vlan0, l3_l4e); ++ ++ rx_pkts[0]->ol_flags = (uint64_t)vlan0[2]; ++ rx_pkts[1]->ol_flags = (uint64_t)vlan0[3]; ++ rx_pkts[2]->ol_flags = (uint64_t)vlan0[0]; ++ rx_pkts[3]->ol_flags = (uint64_t)vlan0[1]; ++} ++#else ++#define desc_to_olflags_v(desc, rx_pkts) do {} while (0) ++#endif ++ ++#define PKTLEN_SHIFT 10 ++ ++static inline void ++desc_to_ptype_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts) ++{ ++ vector unsigned long ptype0 = vec_mergel(descs[0], descs[1]); ++ vector unsigned long ptype1 = vec_mergel(descs[2], descs[3]); ++ ++ ptype0 = vec_sr(ptype0, (vector unsigned long){30, 30}); ++ ptype1 = vec_sr(ptype1, (vector unsigned long){30, 30}); ++ ++ rx_pkts[0]->packet_type = i40e_rxd_pkt_type_mapping( ++ (*(vector unsigned char *)&ptype0)[0]); ++ rx_pkts[1]->packet_type = i40e_rxd_pkt_type_mapping( ++ (*(vector unsigned char *)&ptype0)[8]); ++ rx_pkts[2]->packet_type = i40e_rxd_pkt_type_mapping( ++ (*(vector unsigned char *)&ptype1)[0]); ++ rx_pkts[3]->packet_type = i40e_rxd_pkt_type_mapping( ++ (*(vector unsigned char *)&ptype1)[8]); ++} ++ ++ /* Notice: ++ * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet ++ * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST ++ * numbers of DD bits ++ */ ++static inline uint16_t ++_recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, ++ uint16_t nb_pkts, uint8_t *split_packet) ++{ ++ volatile union i40e_rx_desc *rxdp; ++ struct i40e_rx_entry *sw_ring; ++ uint16_t nb_pkts_recd; ++ int pos; ++ uint64_t var; ++ vector unsigned char shuf_msk; ++ ++ vector unsigned short crc_adjust = (vector unsigned short){ ++ 0, 0, /* ignore pkt_type field */ ++ rxq->crc_len, /* sub crc on pkt_len */ ++ 0, /* ignore high-16bits of pkt_len */ ++ rxq->crc_len, /* sub crc on data_len */ ++ 0, 0, 0 /* ignore non-length fields */ ++ }; ++ vector unsigned long dd_check, eop_check; ++ ++ /* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */ ++ nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST); ++ ++ /* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */ ++ nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP); ++ ++ /* Just the act of getting into the function from the application is ++ * going to cost about 7 cycles ++ */ ++ rxdp = rxq->rx_ring + rxq->rx_tail; ++ ++ rte_prefetch0(rxdp); ++ ++ /* See if we need to rearm the RX queue - gives the prefetch a bit ++ * of time to act ++ */ ++ if (rxq->rxrearm_nb > RTE_I40E_RXQ_REARM_THRESH) ++ i40e_rxq_rearm(rxq); ++ ++ /* Before we start moving massive data around, check to see if ++ * there is actually a packet available ++ */ ++ if (!(rxdp->wb.qword1.status_error_len & ++ rte_cpu_to_le_32(1 << I40E_RX_DESC_STATUS_DD_SHIFT))) ++ return 0; ++ ++ /* 4 packets DD mask */ ++ dd_check = (vector unsigned long){0x0000000100000001ULL, ++ 0x0000000100000001ULL}; ++ ++ /* 4 packets EOP mask */ ++ eop_check = (vector unsigned long){0x0000000200000002ULL, ++ 0x0000000200000002ULL}; ++ ++ /* mask to shuffle from desc. to mbuf */ ++ shuf_msk = (vector unsigned char){ ++ 0xFF, 0xFF, /* pkt_type set as unknown */ ++ 0xFF, 0xFF, /* pkt_type set as unknown */ ++ 14, 15, /* octet 15~14, low 16 bits pkt_len */ ++ 0xFF, 0xFF, /* skip high 16 bits pkt_len, zero out */ ++ 14, 15, /* octet 15~14, 16 bits data_len */ ++ 2, 3, /* octet 2~3, low 16 bits vlan_macip */ ++ 4, 5, 6, 7 /* octet 4~7, 32bits rss */ ++ }; ++ ++ /* Cache is empty -> need to scan the buffer rings, but first move ++ * the next 'n' mbufs into the cache ++ */ ++ sw_ring = &rxq->sw_ring[rxq->rx_tail]; ++ ++ /* A. load 4 packet in one loop ++ * [A*. mask out 4 unused dirty field in desc] ++ * B. copy 4 mbuf point from swring to rx_pkts ++ * C. calc the number of DD bits among the 4 packets ++ * [C*. extract the end-of-packet bit, if requested] ++ * D. fill info. from desc to mbuf ++ */ ++ ++ for (pos = 0, nb_pkts_recd = 0; pos < nb_pkts; ++ pos += RTE_I40E_DESCS_PER_LOOP, ++ rxdp += RTE_I40E_DESCS_PER_LOOP) { ++ vector unsigned long descs[RTE_I40E_DESCS_PER_LOOP]; ++ vector unsigned char pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4; ++ vector unsigned short staterr, sterr_tmp1, sterr_tmp2; ++ vector unsigned long mbp1, mbp2; /* two mbuf pointer ++ * in one XMM reg. ++ */ ++ ++ /* B.1 load 1 mbuf point */ ++ mbp1 = *(vector unsigned long *)&sw_ring[pos]; ++ /* Read desc statuses backwards to avoid race condition */ ++ /* A.1 load 4 pkts desc */ ++ descs[3] = *(vector unsigned long *)(rxdp + 3); ++ rte_compiler_barrier(); ++ ++ /* B.2 copy 2 mbuf point into rx_pkts */ ++ *(vector unsigned long *)&rx_pkts[pos] = mbp1; ++ ++ /* B.1 load 1 mbuf point */ ++ mbp2 = *(vector unsigned long *)&sw_ring[pos + 2]; ++ ++ descs[2] = *(vector unsigned long *)(rxdp + 2); ++ rte_compiler_barrier(); ++ /* B.1 load 2 mbuf point */ ++ descs[1] = *(vector unsigned long *)(rxdp + 1); ++ rte_compiler_barrier(); ++ descs[0] = *(vector unsigned long *)(rxdp); ++ ++ /* B.2 copy 2 mbuf point into rx_pkts */ ++ *(vector unsigned long *)&rx_pkts[pos + 2] = mbp2; ++ ++ if (split_packet) { ++ rte_mbuf_prefetch_part2(rx_pkts[pos]); ++ rte_mbuf_prefetch_part2(rx_pkts[pos + 1]); ++ rte_mbuf_prefetch_part2(rx_pkts[pos + 2]); ++ rte_mbuf_prefetch_part2(rx_pkts[pos + 3]); ++ } ++ ++ /* avoid compiler reorder optimization */ ++ rte_compiler_barrier(); ++ ++ /* pkt 3,4 shift the pktlen field to be 16-bit aligned*/ ++ const vector unsigned int len3 = vec_sl( ++ vec_ld(0, (vector unsigned int *)&descs[3]), ++ (vector unsigned int){0, 0, 0, PKTLEN_SHIFT}); ++ ++ const vector unsigned int len2 = vec_sl( ++ vec_ld(0, (vector unsigned int *)&descs[2]), ++ (vector unsigned int){0, 0, 0, PKTLEN_SHIFT}); ++ ++ /* merge the now-aligned packet length fields back in */ ++ descs[3] = (vector unsigned long)len3; ++ descs[2] = (vector unsigned long)len2; ++ ++ /* D.1 pkt 3,4 convert format from desc to pktmbuf */ ++ pkt_mb4 = vec_perm((vector unsigned char)descs[3], ++ (vector unsigned char){}, shuf_msk); ++ pkt_mb3 = vec_perm((vector unsigned char)descs[2], ++ (vector unsigned char){}, shuf_msk); ++ ++ /* C.1 4=>2 filter staterr info only */ ++ sterr_tmp2 = vec_mergel((vector unsigned short)descs[3], ++ (vector unsigned short)descs[2]); ++ /* C.1 4=>2 filter staterr info only */ ++ sterr_tmp1 = vec_mergel((vector unsigned short)descs[1], ++ (vector unsigned short)descs[0]); ++ /* D.2 pkt 3,4 set in_port/nb_seg and remove crc */ ++ pkt_mb4 = (vector unsigned char)vec_sub( ++ (vector unsigned short)pkt_mb4, crc_adjust); ++ pkt_mb3 = (vector unsigned char)vec_sub( ++ (vector unsigned short)pkt_mb3, crc_adjust); ++ ++ /* pkt 1,2 shift the pktlen field to be 16-bit aligned*/ ++ const vector unsigned int len1 = vec_sl( ++ vec_ld(0, (vector unsigned int *)&descs[1]), ++ (vector unsigned int){0, 0, 0, PKTLEN_SHIFT}); ++ const vector unsigned int len0 = vec_sl( ++ vec_ld(0, (vector unsigned int *)&descs[0]), ++ (vector unsigned int){0, 0, 0, PKTLEN_SHIFT}); ++ ++ /* merge the now-aligned packet length fields back in */ ++ descs[1] = (vector unsigned long)len1; ++ descs[0] = (vector unsigned long)len0; ++ ++ /* D.1 pkt 1,2 convert format from desc to pktmbuf */ ++ pkt_mb2 = vec_perm((vector unsigned char)descs[1], ++ (vector unsigned char){}, shuf_msk); ++ pkt_mb1 = vec_perm((vector unsigned char)descs[0], ++ (vector unsigned char){}, shuf_msk); ++ ++ /* C.2 get 4 pkts staterr value */ ++ staterr = (vector unsigned short)vec_mergeh( ++ sterr_tmp1, sterr_tmp2); ++ ++ /* D.3 copy final 3,4 data to rx_pkts */ ++ vec_st(pkt_mb4, 0, ++ (vector unsigned char *)&rx_pkts[pos + 3] ++ ->rx_descriptor_fields1 ++ ); ++ vec_st(pkt_mb3, 0, ++ (vector unsigned char *)&rx_pkts[pos + 2] ++ ->rx_descriptor_fields1 ++ ); ++ ++ /* D.2 pkt 1,2 set in_port/nb_seg and remove crc */ ++ pkt_mb2 = (vector unsigned char)vec_sub( ++ (vector unsigned short)pkt_mb2, crc_adjust); ++ pkt_mb1 = (vector unsigned char)vec_sub( ++ (vector unsigned short)pkt_mb1, crc_adjust); ++ ++ /* C* extract and record EOP bit */ ++ if (split_packet) { ++ vector unsigned char eop_shuf_mask = ++ (vector unsigned char){ ++ 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xFF, 0xFF, 0xFF, 0xFF, ++ 0xFF, 0xFF, 0xFF, 0xFF, ++ 0x04, 0x0C, 0x00, 0x08 ++ }; ++ ++ /* and with mask to extract bits, flipping 1-0 */ ++ vector unsigned char eop_bits = vec_and( ++ (vector unsigned char)vec_nor(staterr, staterr), ++ (vector unsigned char)eop_check); ++ /* the staterr values are not in order, as the count ++ * count of dd bits doesn't care. However, for end of ++ * packet tracking, we do care, so shuffle. This also ++ * compresses the 32-bit values to 8-bit ++ */ ++ eop_bits = vec_perm(eop_bits, (vector unsigned char){}, ++ eop_shuf_mask); ++ /* store the resulting 32-bit value */ ++ *split_packet = (vec_ld(0, ++ (vector unsigned int *)&eop_bits))[0]; ++ split_packet += RTE_I40E_DESCS_PER_LOOP; ++ ++ /* zero-out next pointers */ ++ rx_pkts[pos]->next = NULL; ++ rx_pkts[pos + 1]->next = NULL; ++ rx_pkts[pos + 2]->next = NULL; ++ rx_pkts[pos + 3]->next = NULL; ++ } ++ ++ /* C.3 calc available number of desc */ ++ staterr = vec_and(staterr, (vector unsigned short)dd_check); ++ ++ /* D.3 copy final 1,2 data to rx_pkts */ ++ vec_st(pkt_mb2, 0, ++ (vector unsigned char *)&rx_pkts[pos + 1] ++ ->rx_descriptor_fields1 ++ ); ++ vec_st(pkt_mb1, 0, ++ (vector unsigned char *)&rx_pkts[pos]->rx_descriptor_fields1 ++ ); ++ desc_to_ptype_v(descs, &rx_pkts[pos]); ++ desc_to_olflags_v(descs, &rx_pkts[pos]); ++ ++ /* C.4 calc avaialbe number of desc */ ++ var = __builtin_popcountll((vec_ld(0, ++ (vector unsigned long *)&staterr)[0])); ++ nb_pkts_recd += var; ++ if (likely(var != RTE_I40E_DESCS_PER_LOOP)) ++ break; ++ } ++ ++ /* Update our internal tail pointer */ ++ rxq->rx_tail = (uint16_t)(rxq->rx_tail + nb_pkts_recd); ++ rxq->rx_tail = (uint16_t)(rxq->rx_tail & (rxq->nb_rx_desc - 1)); ++ rxq->rxrearm_nb = (uint16_t)(rxq->rxrearm_nb + nb_pkts_recd); ++ ++ return nb_pkts_recd; ++} ++ ++ /* Notice: ++ * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet ++ * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST ++ * numbers of DD bits ++ */ ++uint16_t ++i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, ++ uint16_t nb_pkts) ++{ ++ return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL); ++} ++ ++ /* vPMD receive routine that reassembles scattered packets ++ * Notice: ++ * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet ++ * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST ++ * numbers of DD bits ++ */ ++uint16_t ++i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, ++ uint16_t nb_pkts) ++{ ++ struct i40e_rx_queue *rxq = rx_queue; ++ uint8_t split_flags[RTE_I40E_VPMD_RX_BURST] = {0}; ++ ++ /* get some new buffers */ ++ uint16_t nb_bufs = _recv_raw_pkts_vec(rxq, rx_pkts, nb_pkts, ++ split_flags); ++ if (nb_bufs == 0) ++ return 0; ++ ++ /* happy day case, full burst + no packets to be joined */ ++ const uint64_t *split_fl64 = (uint64_t *)split_flags; ++ ++ if (rxq->pkt_first_seg == NULL && ++ split_fl64[0] == 0 && split_fl64[1] == 0 && ++ split_fl64[2] == 0 && split_fl64[3] == 0) ++ return nb_bufs; ++ ++ /* reassemble any packets that need reassembly*/ ++ unsigned int i = 0; ++ ++ if (!rxq->pkt_first_seg) { ++ /* find the first split flag, and only reassemble then*/ ++ while (i < nb_bufs && !split_flags[i]) ++ i++; ++ if (i == nb_bufs) ++ return nb_bufs; ++ } ++ return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i, ++ &split_flags[i]); ++} ++ ++static inline void ++vtx1(volatile struct i40e_tx_desc *txdp, ++ struct rte_mbuf *pkt, uint64_t flags) ++{ ++ uint64_t high_qw = (I40E_TX_DESC_DTYPE_DATA | ++ ((uint64_t)flags << I40E_TXD_QW1_CMD_SHIFT) | ++ ((uint64_t)pkt->data_len << I40E_TXD_QW1_TX_BUF_SZ_SHIFT)); ++ ++ vector unsigned long descriptor = (vector unsigned long){ ++ pkt->buf_physaddr + pkt->data_off, high_qw}; ++ *(vector unsigned long *)txdp = descriptor; ++} ++ ++static inline void ++vtx(volatile struct i40e_tx_desc *txdp, ++ struct rte_mbuf **pkt, uint16_t nb_pkts, uint64_t flags) ++{ ++ int i; ++ ++ for (i = 0; i < nb_pkts; ++i, ++txdp, ++pkt) ++ vtx1(txdp, *pkt, flags); ++} ++ ++uint16_t ++i40e_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts, ++ uint16_t nb_pkts) ++{ ++ struct i40e_tx_queue *txq = (struct i40e_tx_queue *)tx_queue; ++ volatile struct i40e_tx_desc *txdp; ++ struct i40e_tx_entry *txep; ++ uint16_t n, nb_commit, tx_id; ++ uint64_t flags = I40E_TD_CMD; ++ uint64_t rs = I40E_TX_DESC_CMD_RS | I40E_TD_CMD; ++ int i; ++ ++ /* cross rx_thresh boundary is not allowed */ ++ nb_pkts = RTE_MIN(nb_pkts, txq->tx_rs_thresh); ++ ++ if (txq->nb_tx_free < txq->tx_free_thresh) ++ i40e_tx_free_bufs(txq); ++ ++ nb_pkts = (uint16_t)RTE_MIN(txq->nb_tx_free, nb_pkts); ++ nb_commit = nb_pkts; ++ if (unlikely(nb_pkts == 0)) ++ return 0; ++ ++ tx_id = txq->tx_tail; ++ txdp = &txq->tx_ring[tx_id]; ++ txep = &txq->sw_ring[tx_id]; ++ ++ txq->nb_tx_free = (uint16_t)(txq->nb_tx_free - nb_pkts); ++ ++ n = (uint16_t)(txq->nb_tx_desc - tx_id); ++ if (nb_commit >= n) { ++ tx_backlog_entry(txep, tx_pkts, n); ++ ++ for (i = 0; i < n - 1; ++i, ++tx_pkts, ++txdp) ++ vtx1(txdp, *tx_pkts, flags); ++ ++ vtx1(txdp, *tx_pkts++, rs); ++ ++ nb_commit = (uint16_t)(nb_commit - n); ++ ++ tx_id = 0; ++ txq->tx_next_rs = (uint16_t)(txq->tx_rs_thresh - 1); ++ ++ /* avoid reach the end of ring */ ++ txdp = &txq->tx_ring[tx_id]; ++ txep = &txq->sw_ring[tx_id]; ++ } ++ ++ tx_backlog_entry(txep, tx_pkts, nb_commit); ++ ++ vtx(txdp, tx_pkts, nb_commit, flags); ++ ++ tx_id = (uint16_t)(tx_id + nb_commit); ++ if (tx_id > txq->tx_next_rs) { ++ txq->tx_ring[txq->tx_next_rs].cmd_type_offset_bsz |= ++ rte_cpu_to_le_64(((uint64_t)I40E_TX_DESC_CMD_RS) << ++ I40E_TXD_QW1_CMD_SHIFT); ++ txq->tx_next_rs = ++ (uint16_t)(txq->tx_next_rs + txq->tx_rs_thresh); ++ } ++ ++ txq->tx_tail = tx_id; ++ ++ I40E_PCI_REG_WRITE(txq->qtx_tail, txq->tx_tail); ++ ++ return nb_pkts; ++} ++ ++void __attribute__((cold)) ++i40e_rx_queue_release_mbufs_vec(struct i40e_rx_queue *rxq) ++{ ++ _i40e_rx_queue_release_mbufs_vec(rxq); ++} ++ ++int __attribute__((cold)) ++i40e_rxq_vec_setup(struct i40e_rx_queue *rxq) ++{ ++ return i40e_rxq_vec_setup_default(rxq); ++} ++ ++int __attribute__((cold)) ++i40e_txq_vec_setup(struct i40e_tx_queue __rte_unused * txq) ++{ ++ return 0; ++} ++ ++int __attribute__((cold)) ++i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev) ++{ ++ return i40e_rx_vec_dev_conf_condition_check_default(dev); ++} diff --git a/debian/patches/series b/debian/patches/series index 9242e897..a8f48505 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ fix-vhost-user-socket-permission.patch fix-power-default-config.patch dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch +dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch -- cgit 1.2.3-korg From a4d083825004249635967c65981c68b98e952272 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 10:53:11 +0200 Subject: changelog: i40e PMD / vector PMD on ppc64el Change-Id: I4d564d589827d1f97c21a0fc65f633feb6ceb283 Signed-off-by: Christian Ehrhardt --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ef54a1ef..59a6ce8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium * d/p/dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci- in-ppc64le.patch: sPAPR IOMMU based pci probing enabled for vfio-pci devices. + * enable librte-pmd-i40e1 for ppc64el + - debian/control: enable arch onpackage + - d/p/dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch: add i40e + PMD / vector PMD implementation and enable by default on ppc64el [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 2732340d33c9b92603573a94fd42222c13031c40 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 11:04:07 +0200 Subject: fix library availability/dependency Change-Id: Icd75917e74c7b629e7e43b01c2d5811c48863940 Signed-off-by: Christian Ehrhardt --- debian/control | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 5e25515d..1d75a9e8 100644 --- a/debian/control +++ b/debian/control @@ -45,7 +45,7 @@ Recommends: dpdk-igb-uio-dkms (= ${binary:Version}) [arm64], 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 ppc64el], + librte-pmd-i40e1 (= ${binary:Version}), librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386], librte-pmd-null-crypto1 (= ${binary:Version}), librte-pmd-null1 (= ${binary:Version}), @@ -135,7 +135,7 @@ Depends: libpcap-dev, librte-hash2 (= ${binary:Version}), librte-ip-frag1 (= ${binary:Version}), librte-jobstats1 (= ${binary:Version}), - librte-kni2 (= ${binary:Version}) [amd64 arm64], + librte-kni2 (= ${binary:Version}) [amd64 arm64 ppc64el], librte-kvargs1 (= ${binary:Version}), librte-lpm2 (= ${binary:Version}), librte-mbuf2 (= ${binary:Version}), @@ -152,7 +152,7 @@ Depends: libpcap-dev, 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 ppc64el], + librte-pmd-i40e1 (= ${binary:Version}), librte-pmd-ixgbe1 (= ${binary:Version}) [amd64 arm64 i386], librte-pmd-null-crypto1 (= ${binary:Version}), librte-pmd-null1 (= ${binary:Version}), @@ -509,7 +509,7 @@ Description: Data Plane Development Kit (librte-pmd-enic runtime library) This package contains the runtime libraries for librte_pmd_enic. Package: librte-pmd-fm10k1 -Architecture: amd64 i386 ppc64el +Architecture: amd64 i386 Multi-Arch: same Homepage: http://dpdk.org/doc/guides/nics/fm10k.html Pre-Depends: ${misc:Pre-Depends} @@ -522,7 +522,7 @@ Description: Data Plane Development Kit (librte-pmd-fm10k runtime library) This package contains the runtime libraries for librte_pmd_fm10k. Package: librte-pmd-i40e1 -Architecture: amd64 i386 ppc64el +Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same Homepage: http://dpdk.org/doc/guides/nics/i40e.html Pre-Depends: ${misc:Pre-Depends} -- cgit 1.2.3-korg From 49290e33ba32abb8d61afa46a320ebaff14be321 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 11:04:18 +0200 Subject: changelog:fix library availability/dependency Change-Id: I670fc3a59912215fc46bdde7ee6251d576e36c50 Signed-off-by: Christian Ehrhardt --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 59a6ce8e..7957c454 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,10 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium - debian/control: enable arch onpackage - d/p/dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch: add i40e PMD / vector PMD implementation and enable by default on ppc64el + * fix library availability/dependency + - librte-kni is built on ppc64el, fix dependency from libdpdk-dev + - librte-pmd-fm10k1 is not built on ppc64el (empty pkg atm) adapt arch + - librte-pmd-i40e is built on all architectures now [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From e4562c78c0c5cb1a4080765925209fd23b8bc389 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 13:12:50 +0200 Subject: Add thunderx (LP: #1691659) To make arm support useful on more devices add, enable and fix thunderx networking - that is the nicvf pmd (LP: #1691659) Change-Id: I17f1d6d63d31df05f1af09054ffddcb478c54dd3 Signed-off-by: Christian Ehrhardt --- ...x-check-data-offset-alignment-requirement.patch | 58 ++++++++++++++++ .../nicvf-0002-net-thunderx-fix-32-bit-build.patch | 58 ++++++++++++++++ .../nicvf-0003-config-enable-thunderx-nicvf.patch | 62 +++++++++++++++++ ...x-sync-mailbox-definitions-with-Linux-PF-.patch | 80 ++++++++++++++++++++++ ...nderx-wait-to-complete-during-link-update.patch | 59 ++++++++++++++++ ...006-mk-fix-lib-filtering-when-linking-app.patch | 71 +++++++++++++++++++ ...et-thunderx-disable-PMD-for-old-compilers.patch | 80 ++++++++++++++++++++++ ...t-thunderx-fix-stats-access-out-of-bounds.patch | 67 ++++++++++++++++++ ...-set-cache-line-as-128B-for-generic-arm64.patch | 65 ++++++++++++++++++ ...0010-net-thunderx-fix-deadlock-in-Rx-path.patch | 58 ++++++++++++++++ debian/patches/series | 10 +++ 11 files changed, 668 insertions(+) create mode 100644 debian/patches/nicvf-0001-net-thunderx-check-data-offset-alignment-requirement.patch create mode 100644 debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch create mode 100644 debian/patches/nicvf-0003-config-enable-thunderx-nicvf.patch create mode 100644 debian/patches/nicvf-0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch create mode 100644 debian/patches/nicvf-0005-net-thunderx-wait-to-complete-during-link-update.patch create mode 100644 debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch create mode 100644 debian/patches/nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch create mode 100644 debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch create mode 100644 debian/patches/nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch create mode 100644 debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch (limited to 'debian') diff --git a/debian/patches/nicvf-0001-net-thunderx-check-data-offset-alignment-requirement.patch b/debian/patches/nicvf-0001-net-thunderx-check-data-offset-alignment-requirement.patch new file mode 100644 index 00000000..d5402b82 --- /dev/null +++ b/debian/patches/nicvf-0001-net-thunderx-check-data-offset-alignment-requirement.patch @@ -0,0 +1,58 @@ +From 34c2e7026fb30f6756d2c84d07d99c94106bb2ab Mon Sep 17 00:00:00 2001 +From: Jerin Jacob +Date: Mon, 13 Mar 2017 13:32:11 +0530 +Subject: [PATCH] net/thunderx: check data offset alignment requirement + +nicvf HW expects the DMA address of the packet data to be +aligned with cache line size. + +Packet data offset is a function of struct mbuf size, +mbuf private size and headroom. mbuf private size can +be changed from the application in pool creation, this +check detects HW alignment requirement constraint in pmd +start function. + +Signed-off-by: Jerin Jacob +Acked-by: Hemant Agrawal +--- + drivers/net/thunderx/nicvf_ethdev.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=34c2e7026fb30f6756d2c84d07d99c94106bb2ab +Original-Author: Jerin Jacob +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/drivers/net/thunderx/nicvf_ethdev.c ++++ b/drivers/net/thunderx/nicvf_ethdev.c +@@ -1407,7 +1407,7 @@ + nicvf_vf_start(struct rte_eth_dev *dev, struct nicvf *nic, uint32_t rbdrsz) + { + int ret; +- uint16_t qidx; ++ uint16_t qidx, data_off; + uint32_t total_rxq_desc, nb_rbdr_desc, exp_buffs; + uint64_t mbuf_phys_off = 0; + struct nicvf_rxq *rxq; +@@ -1448,10 +1448,18 @@ + nic->vf_id, qidx, rxq->pool->name); + return -ENOMEM; + } +- rxq->mbuf_phys_off -= nicvf_mbuff_meta_length(mbuf); +- rxq->mbuf_phys_off -= RTE_PKTMBUF_HEADROOM; ++ data_off = nicvf_mbuff_meta_length(mbuf); ++ data_off += RTE_PKTMBUF_HEADROOM; + rte_pktmbuf_free(mbuf); + ++ if (data_off % RTE_CACHE_LINE_SIZE) { ++ PMD_INIT_LOG(ERR, "%s: unaligned data_off=%d delta=%d", ++ rxq->pool->name, data_off, ++ data_off % RTE_CACHE_LINE_SIZE); ++ return -EINVAL; ++ } ++ rxq->mbuf_phys_off -= data_off; ++ + if (mbuf_phys_off == 0) + mbuf_phys_off = rxq->mbuf_phys_off; + if (mbuf_phys_off != rxq->mbuf_phys_off) { diff --git a/debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch b/debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch new file mode 100644 index 00000000..f5653d1e --- /dev/null +++ b/debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch @@ -0,0 +1,58 @@ +From 6d76fde7dba39769c64bee03b62593cc66a1b0e3 Mon Sep 17 00:00:00 2001 +From: Jerin Jacob +Date: Sun, 19 Mar 2017 20:18:46 +0530 +Subject: [PATCH] net/thunderx: fix 32-bit build + +Fixes: e438796617dc ("net/thunderx: add PMD skeleton") + +Signed-off-by: Jerin Jacob +--- + drivers/net/thunderx/nicvf_struct.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=6d76fde7dba39769c64bee03b62593cc66a1b0e3 +Original-Author: Jerin Jacob +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h +index c900e12..5bc6d57 100644 +--- a/drivers/net/thunderx/nicvf_struct.h ++++ b/drivers/net/thunderx/nicvf_struct.h +@@ -43,8 +43,8 @@ + #include + + struct nicvf_rbdr { +- uint64_t rbdr_status; +- uint64_t rbdr_door; ++ uintptr_t rbdr_status; ++ uintptr_t rbdr_door; + struct rbdr_entry_t *desc; + nicvf_phys_addr_t phys; + uint32_t buffsz; +@@ -58,8 +58,8 @@ struct nicvf_txq { + union sq_entry_t *desc; + nicvf_phys_addr_t phys; + struct rte_mbuf **txbuffs; +- uint64_t sq_head; +- uint64_t sq_door; ++ uintptr_t sq_head; ++ uintptr_t sq_door; + struct rte_mempool *pool; + struct nicvf *nic; + void (*pool_free)(struct nicvf_txq *sq); +@@ -74,8 +74,8 @@ struct nicvf_txq { + + struct nicvf_rxq { + uint64_t mbuf_phys_off; +- uint64_t cq_status; +- uint64_t cq_door; ++ uintptr_t cq_status; ++ uintptr_t cq_door; + nicvf_phys_addr_t phys; + union cq_entry_t *desc; + struct nicvf_rbdr *shared_rbdr; +-- +2.7.4 + diff --git a/debian/patches/nicvf-0003-config-enable-thunderx-nicvf.patch b/debian/patches/nicvf-0003-config-enable-thunderx-nicvf.patch new file mode 100644 index 00000000..465dd491 --- /dev/null +++ b/debian/patches/nicvf-0003-config-enable-thunderx-nicvf.patch @@ -0,0 +1,62 @@ +From 0bc8874b3b2c2da74bb955ce2de2da7eb009a8bf Mon Sep 17 00:00:00 2001 +From: Jerin Jacob +Date: Sun, 19 Mar 2017 20:18:48 +0530 +Subject: [PATCH] config: enable thunderx nicvf + +Enable Thunderx nicvf PMD driver in the common +config as it does not have build dependency +with any external library and/or architecture. + +Signed-off-by: Jerin Jacob +--- + config/common_base | 2 +- + config/defconfig_arm64-thunderx-linuxapp-gcc | 10 ---------- + doc/guides/nics/thunderx.rst | 3 +-- + 3 files changed, 2 insertions(+), 13 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=0bc8874b3b2c2da74bb955ce2de2da7eb009a8bf +Original-Author: Jerin Jacob +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/config/common_base ++++ b/config/common_base +@@ -264,7 +264,7 @@ + # + # Compile burst-oriented Cavium Thunderx NICVF PMD driver + # +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n ++CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=y + CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n + CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n + CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +--- a/config/defconfig_arm64-thunderx-linuxapp-gcc ++++ b/config/defconfig_arm64-thunderx-linuxapp-gcc +@@ -36,13 +36,3 @@ + CONFIG_RTE_CACHE_LINE_SIZE=128 + CONFIG_RTE_MAX_NUMA_NODES=2 + CONFIG_RTE_MAX_LCORE=96 +- +-# +-# Compile Cavium Thunderx NICVF PMD driver +-# +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=y +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +-CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n +--- a/doc/guides/nics/thunderx.rst ++++ b/doc/guides/nics/thunderx.rst +@@ -77,9 +77,8 @@ + The following options can be modified in the ``config`` file. + Please note that enabling debugging options may affect system performance. + +-- ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD`` (default ``n``) ++- ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD`` (default ``y``) + +- By default it is enabled only for defconfig_arm64-thunderx-* config. + Toggle compilation of the ``librte_pmd_thunderx_nicvf`` driver. + + - ``CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT`` (default ``n``) diff --git a/debian/patches/nicvf-0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch b/debian/patches/nicvf-0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch new file mode 100644 index 00000000..2ff3a2db --- /dev/null +++ b/debian/patches/nicvf-0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch @@ -0,0 +1,80 @@ +From 2d5a4b62ff2d7b79ca937a5c88654deecf4aa986 Mon Sep 17 00:00:00 2001 +From: Jerin Jacob +Date: Mon, 20 Mar 2017 19:40:40 +0530 +Subject: [PATCH] net/thunderx: sync mailbox definitions with Linux PF driver + +- bgx_link_status mbox definition was changed in Linux +commit 1cc702591bae ("net: thunderx: Add ethtool support") +- NIC_MBOX_MSG_RES_BIT related changes were never part of Linux PF driver + +Signed-off-by: Jerin Jacob +--- + drivers/net/thunderx/base/nicvf_mbox.c | 7 ++----- + drivers/net/thunderx/base/nicvf_mbox.h | 11 +++-------- + 2 files changed, 5 insertions(+), 13 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=2d5a4b62ff2d7b79ca937a5c88654deecf4aa986 +Original-Author: Jerin Jacob +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/drivers/net/thunderx/base/nicvf_mbox.c ++++ b/drivers/net/thunderx/base/nicvf_mbox.c +@@ -62,9 +62,6 @@ + [NIC_MBOX_MSG_RESET_STAT_COUNTER] = "NIC_MBOX_MSG_RESET_STAT_COUNTER", + [NIC_MBOX_MSG_CFG_DONE] = "NIC_MBOX_MSG_CFG_DONE", + [NIC_MBOX_MSG_SHUTDOWN] = "NIC_MBOX_MSG_SHUTDOWN", +- [NIC_MBOX_MSG_RES_BIT] = "NIC_MBOX_MSG_RES_BIT", +- [NIC_MBOX_MSG_RSS_SIZE_RES_BIT] = "NIC_MBOX_MSG_RSS_SIZE", +- [NIC_MBOX_MSG_ALLOC_SQS_RES_BIT] = "NIC_MBOX_MSG_ALLOC_SQS", + }; + + static inline const char * __attribute__((unused)) +@@ -176,7 +173,7 @@ + case NIC_MBOX_MSG_NACK: + nic->pf_nacked = true; + break; +- case NIC_MBOX_MSG_RSS_SIZE_RES_BIT: ++ case NIC_MBOX_MSG_RSS_SIZE: + nic->rss_info.rss_size = mbx.rss_size.ind_tbl_size; + nic->pf_acked = true; + break; +@@ -186,7 +183,7 @@ + nic->speed = mbx.link_status.speed; + nic->pf_acked = true; + break; +- case NIC_MBOX_MSG_ALLOC_SQS_RES_BIT: ++ case NIC_MBOX_MSG_ALLOC_SQS: + assert_primary(nic); + if (mbx.sqs_alloc.qs_count != nic->sqs_count) { + nicvf_log_error("Received %" PRIu8 "/%" PRIu8 +--- a/drivers/net/thunderx/base/nicvf_mbox.h ++++ b/drivers/net/thunderx/base/nicvf_mbox.h +@@ -68,16 +68,10 @@ + #define NIC_MBOX_MSG_ALLOC_SQS 0x12 /* Allocate secondary Qset */ + #define NIC_MBOX_MSG_LOOPBACK 0x16 /* Set interface in loopback */ + #define NIC_MBOX_MSG_RESET_STAT_COUNTER 0x17 /* Reset statistics counters */ +-#define NIC_MBOX_MSG_CFG_DONE 0x7E /* VF configuration done */ +-#define NIC_MBOX_MSG_SHUTDOWN 0x7F /* VF is being shutdown */ +-#define NIC_MBOX_MSG_RES_BIT 0x80 /* Reset bit from PF */ ++#define NIC_MBOX_MSG_CFG_DONE 0xF0 /* VF configuration done */ ++#define NIC_MBOX_MSG_SHUTDOWN 0xF1 /* VF is being shutdown */ + #define NIC_MBOX_MSG_MAX 0x100 /* Maximum number of messages */ + +-#define NIC_MBOX_MSG_RSS_SIZE_RES_BIT \ +- (NIC_MBOX_MSG_RSS_SIZE | NIC_MBOX_MSG_RES_BIT) +-#define NIC_MBOX_MSG_ALLOC_SQS_RES_BIT \ +- (NIC_MBOX_MSG_ALLOC_SQS | NIC_MBOX_MSG_RES_BIT) +- + /* Get vNIC VF configuration */ + struct nic_cfg_msg { + uint8_t msg; +@@ -157,6 +151,7 @@ + /* Physical interface link status */ + struct bgx_link_status { + uint8_t msg; ++ uint8_t mac_type; + uint8_t link_up; + uint8_t duplex; + uint32_t speed; diff --git a/debian/patches/nicvf-0005-net-thunderx-wait-to-complete-during-link-update.patch b/debian/patches/nicvf-0005-net-thunderx-wait-to-complete-during-link-update.patch new file mode 100644 index 00000000..32937a1c --- /dev/null +++ b/debian/patches/nicvf-0005-net-thunderx-wait-to-complete-during-link-update.patch @@ -0,0 +1,59 @@ +From 0cca56708d781b42561e382fcbcb1f1647b932b9 Mon Sep 17 00:00:00 2001 +From: Andriy Berestovskyy +Date: Fri, 31 Mar 2017 15:57:49 +0200 +Subject: [PATCH] net/thunderx: wait to complete during link update + +Some DPDK applications/examples check link status on their +start. NICVF does not wait for the link, so those apps fail. + +Wait up to 9 seconds for the link as other PMDs do in order +to fix those apps/examples. + +Signed-off-by: Andriy Berestovskyy +Acked-by: Jerin Jacob +--- + drivers/net/thunderx/nicvf_ethdev.c | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=0cca56708d781b42561e382fcbcb1f1647b932b9 +Original-Author: Andriy Berestovskyy +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/drivers/net/thunderx/nicvf_ethdev.c ++++ b/drivers/net/thunderx/nicvf_ethdev.c +@@ -145,16 +145,29 @@ + * Return 0 means link status changed, -1 means not changed + */ + static int +-nicvf_dev_link_update(struct rte_eth_dev *dev, +- int wait_to_complete __rte_unused) ++nicvf_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete) + { ++#define CHECK_INTERVAL 100 /* 100ms */ ++#define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */ + struct rte_eth_link link; + struct nicvf *nic = nicvf_pmd_priv(dev); ++ int i; + + PMD_INIT_FUNC_TRACE(); + +- memset(&link, 0, sizeof(link)); +- nicvf_set_eth_link_status(nic, &link); ++ if (wait_to_complete) { ++ /* rte_eth_link_get() might need to wait up to 9 seconds */ ++ for (i = 0; i < MAX_CHECK_TIME; i++) { ++ memset(&link, 0, sizeof(link)); ++ nicvf_set_eth_link_status(nic, &link); ++ if (link.link_status) ++ break; ++ rte_delay_ms(CHECK_INTERVAL); ++ } ++ } else { ++ memset(&link, 0, sizeof(link)); ++ nicvf_set_eth_link_status(nic, &link); ++ } + return nicvf_atomic_write_link_status(dev, &link); + } + diff --git a/debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch b/debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch new file mode 100644 index 00000000..50093364 --- /dev/null +++ b/debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch @@ -0,0 +1,71 @@ +From ab338eb44ebb79840dab1de2742c07070ae3bf0e Mon Sep 17 00:00:00 2001 +From: Olivier Matz +Date: Thu, 6 Apr 2017 16:14:55 +0200 +Subject: [PATCH] mk: fix lib filtering when linking app + +I get the following error when linking the test application: + build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): + In function `nicvf_qsize_regbit': + drivers/net/thunderx/base/nicvf_hw.c:451: undefined reference to `log2' + build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): + In function `nicvf_rss_reta_update': + drivers/net/thunderx/base/nicvf_hw.c:804: undefined reference to `log2' + build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): + In function `nicvf_rss_reta_query': + drivers/net/thunderx/base/nicvf_hw.c:825: undefined reference to `log2' + +While I don't know why it does not happen for a default build, the error +can be explained. The link command line is: + + gcc -o test ... *.o ... -Wl,-lm ... -Wl,-lrte_pmd_thunderx_nicvf ... + +rte_pmd_thunderx_nicvf needs the math library, and it should be +added after. This is not the case because the test application also +adds the math library. + +The makefile already filters the libraries, but it keeps the first +occurrence of the lib. Instead, the last one should be kept. + +Fixes: edf4d331dcdb ("mk: eliminate duplicates from libraries list") +Cc: stable@dpdk.org + +Signed-off-by: Olivier Matz +Acked-by: Thomas Monjalon +--- + mk/rte.app.mk | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=ab338eb44ebb79840dab1de2742c07070ae3bf0e +Original-Author: Olivier Matz +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/mk/rte.app.mk ++++ b/mk/rte.app.mk +@@ -168,10 +168,21 @@ + + LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) + +-# Eliminate duplicates without sorting +-LDLIBS := $(shell echo $(LDLIBS) | \ +- awk '{for (i = 1; i <= NF; i++) { \ +- if ($$i !~ /^-l.*/ || !seen[$$i]++) print $$i }}') ++# all the words except the first one ++allbutfirst = $(wordlist 2,$(words $(1)),$(1)) ++ ++# Eliminate duplicates without sorting, only keep the last occurrence ++filter-libs = \ ++ $(if $(1),$(strip\ ++ $(if \ ++ $(and \ ++ $(filter $(firstword $(1)),$(call allbutfirst,$(1))),\ ++ $(filter -l%,$(firstword $(1)))),\ ++ ,\ ++ $(firstword $(1))) \ ++ $(call filter-libs,$(call allbutfirst,$(1))))) ++ ++LDLIBS := $(call filter-libs,$(LDLIBS)) + + ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy) + LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib diff --git a/debian/patches/nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch b/debian/patches/nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch new file mode 100644 index 00000000..61590496 --- /dev/null +++ b/debian/patches/nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch @@ -0,0 +1,80 @@ +From 0b9ce550c4f60a69da558da6044e1b394256b43c Mon Sep 17 00:00:00 2001 +From: Ferruh Yigit +Date: Thu, 6 Apr 2017 18:05:09 +0100 +Subject: [PATCH] net/thunderx: disable PMD for old compilers + +Disable for gcc < 4.7 and icc <= 14.0 + +PMD uses some compiler builtins and new compiler options. Tested with +gcc 4.5.1 and following were not supported: + +option: +-Ofast + +macros: +_Static_assert + +__ORDER_LITTLE_ENDIAN__ +__ORDER_BIG_ENDIAN__ +__BYTE_ORDER__ + +__atomic_fetch_add +__ATOMIC_ACQUIRE +__atomic_load_n +__ATOMIC_RELAXED +__atomic_store_n +__ATOMIC_RELEASE + +It is not easy to fix all in PMD, disabling PMD for older compilers. + +Signed-off-by: Ferruh Yigit +--- + drivers/net/Makefile | 5 +++++ + mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++ + mk/toolchain/icc/rte.toolchain-compat.mk | 5 +++++ + 3 files changed, 15 insertions(+) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=0b9ce550c4f60a69da558da6044e1b394256b43c +Original-Author: Ferruh Yigit +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/drivers/net/Makefile ++++ b/drivers/net/Makefile +@@ -31,6 +31,11 @@ + + include $(RTE_SDK)/mk/rte.vars.mk + ++# set in mk/toolchain/xxx/rte.toolchain-compat.mk ++ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d) ++ $(warning thunderx pmd is not supported by old compilers) ++endif ++ + DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet + DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x + DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding +--- a/mk/toolchain/gcc/rte.toolchain-compat.mk ++++ b/mk/toolchain/gcc/rte.toolchain-compat.mk +@@ -89,4 +89,9 @@ + ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1) + MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS)) + endif ++ ++ # Disable thunderx PMD for gcc < 4.7 ++ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) ++ CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d ++ endif + endif +--- a/mk/toolchain/icc/rte.toolchain-compat.mk ++++ b/mk/toolchain/icc/rte.toolchain-compat.mk +@@ -72,4 +72,9 @@ + # remove march options + MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS)) + endif ++ ++ # Disable thunderx PMD for icc <= 14.0 ++ ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1) ++ CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d ++ endif + endif diff --git a/debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch b/debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch new file mode 100644 index 00000000..cd26df57 --- /dev/null +++ b/debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch @@ -0,0 +1,67 @@ +From 695cd416ce6c02d7a20108765573936998b2dbf0 Mon Sep 17 00:00:00 2001 +From: Marcin Wilk +Date: Tue, 11 Apr 2017 14:35:13 +0200 +Subject: [PATCH] net/thunderx: fix stats access out of bounds + +Trying to assign more queues to stats struct break only from one loop +when the maximum size is reached. Outside loop iteration is continued. +This leads to access an array out of bounds. + +Fixes: 21e3fb0050b9 ("net/thunderx: add final bits for secondary queue support") +Cc: stable@dpdk.org + +Signed-off-by: Marcin Wilk +Acked-by: Jerin Jacob +--- + drivers/net/thunderx/nicvf_ethdev.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=695cd416ce6c02d7a20108765573936998b2dbf0 +Original-Author: Marcin Wilk +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c +index b0b9c3b..36ff94f 100644 +--- a/drivers/net/thunderx/nicvf_ethdev.c ++++ b/drivers/net/thunderx/nicvf_ethdev.c +@@ -258,7 +258,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) + + /* Reading per RX ring stats */ + for (qidx = rx_start; qidx <= rx_end; qidx++) { +- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) ++ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) + break; + + nicvf_hw_get_rx_qstats(nic, &rx_qstats, qidx); +@@ -271,7 +271,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) + + /* Reading per TX ring stats */ + for (qidx = tx_start; qidx <= tx_end; qidx++) { +- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) ++ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) + break; + + nicvf_hw_get_tx_qstats(nic, &tx_qstats, qidx); +@@ -290,7 +290,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) + + /* Reading per RX ring stats */ + for (qidx = rx_start; qidx <= rx_end; qidx++) { +- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) ++ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) + break; + + nicvf_hw_get_rx_qstats(snic, &rx_qstats, +@@ -303,7 +303,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) + nicvf_tx_range(dev, snic, &tx_start, &tx_end); + /* Reading per TX ring stats */ + for (qidx = tx_start; qidx <= tx_end; qidx++) { +- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) ++ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) + break; + + nicvf_hw_get_tx_qstats(snic, &tx_qstats, +-- +2.7.4 + diff --git a/debian/patches/nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch b/debian/patches/nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch new file mode 100644 index 00000000..95e02d03 --- /dev/null +++ b/debian/patches/nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch @@ -0,0 +1,65 @@ +From 852572d5db26d1d7d9021648740d9f2e0c4503c1 Mon Sep 17 00:00:00 2001 +From: Jerin Jacob +Date: Wed, 26 Apr 2017 21:59:19 +0530 +Subject: [PATCH] config: set cache line as 128B for generic arm64 + +armv8 implementations may have 64B or 128B cache line. +Setting to the maximum available cache line size in generic config to +address minimum DMA alignment across all arm64 implementations. + +Increasing the cacheline size has no negative impact to cache invalidation +on systems with a smaller cache line. + +The need for the minimum DMA alignment has impact on functional aspects +of the platform so default config should cater the functional aspects. + +There is an impact on memory usage with this scheme, but that's not too +important for the single image arm64 distribution use case. + +The arm64 linux kernel followed the similar approach for single +arm64 image use case. +http://lxr.free-electrons.com/source/arch/arm64/include/asm/cache.h + +Signed-off-by: Jerin Jacob +Acked-by: Jianbo Liu +Acked-by: Santosh Shukla +--- + config/defconfig_arm64-armv8a-linuxapp-gcc | 5 +++++ + config/defconfig_arm64-dpaa2-linuxapp-gcc | 1 + + config/defconfig_arm64-xgene1-linuxapp-gcc | 1 + + 3 files changed, 7 insertions(+) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=852572d5db26d1d7d9021648740d9f2e0c4503c1 +Original-Author: Jerin Jacob +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/config/defconfig_arm64-armv8a-linuxapp-gcc ++++ b/config/defconfig_arm64-armv8a-linuxapp-gcc +@@ -42,6 +42,11 @@ + CONFIG_RTE_TOOLCHAIN="gcc" + CONFIG_RTE_TOOLCHAIN_GCC=y + ++# Maximum available cache line size in arm64 implementations. ++# Setting to maximum available cache line size in generic config ++# to address minimum DMA alignment across all arm64 implementations. ++CONFIG_RTE_CACHE_LINE_SIZE=128 ++ + CONFIG_RTE_EAL_IGB_UIO=n + + CONFIG_RTE_LIBRTE_FM10K_PMD=n +--- a/config/defconfig_arm64-dpaa2-linuxapp-gcc ++++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc +@@ -40,3 +40,4 @@ + # + CONFIG_RTE_MAX_LCORE=8 + CONFIG_RTE_MAX_NUMA_NODES=1 ++CONFIG_RTE_CACHE_LINE_SIZE=64 +--- a/config/defconfig_arm64-xgene1-linuxapp-gcc ++++ b/config/defconfig_arm64-xgene1-linuxapp-gcc +@@ -32,3 +32,4 @@ + #include "defconfig_arm64-armv8a-linuxapp-gcc" + + CONFIG_RTE_MACHINE="xgene1" ++CONFIG_RTE_CACHE_LINE_SIZE=64 diff --git a/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch b/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch new file mode 100644 index 00000000..8773671b --- /dev/null +++ b/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch @@ -0,0 +1,58 @@ +From b31eb105463fa1844c19fde382dd6bd294329831 Mon Sep 17 00:00:00 2001 +From: Jerin Jacob +Date: Tue, 2 May 2017 00:11:55 +0530 +Subject: [PATCH] net/thunderx: fix deadlock in Rx path + +RBDR buffers are refilled when SW consumes the buffers from CQ. +This creates deadlock case when CQ buffers exhausted due to lack +of RBDR buffers. Fix is to refill the RBDR when rx_free_thresh +meet, irrespective of the number of CQ buffers consumed. + +Fixes: e2d7fc9f0a24 ("net/thunderx: add single and multi-segment Rx") +Cc: stable@dpdk.org + +Signed-off-by: Jerin Jacob +--- + drivers/net/thunderx/nicvf_rxtx.c | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=b31eb105463fa1844c19fde382dd6bd294329831 +Original-Author: Jerin Jacob +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 +Author: Christian Ehrhardt +Last-Update: 2017-05-18 + +--- a/drivers/net/thunderx/nicvf_rxtx.c ++++ b/drivers/net/thunderx/nicvf_rxtx.c +@@ -469,11 +469,10 @@ + rxq->head = cqe_head; + nicvf_addr_write(rxq->cq_door, to_process); + rxq->recv_buffers += to_process; +- if (rxq->recv_buffers > rxq->rx_free_thresh) { +- rxq->recv_buffers -= nicvf_fill_rbdr(rxq, +- rxq->rx_free_thresh); +- NICVF_RX_ASSERT(rxq->recv_buffers >= 0); +- } ++ } ++ if (rxq->recv_buffers > rxq->rx_free_thresh) { ++ rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); ++ NICVF_RX_ASSERT(rxq->recv_buffers >= 0); + } + + return to_process; +@@ -563,11 +562,10 @@ + rxq->head = cqe_head; + nicvf_addr_write(rxq->cq_door, to_process); + rxq->recv_buffers += buffers_consumed; +- if (rxq->recv_buffers > rxq->rx_free_thresh) { +- rxq->recv_buffers -= +- nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); +- NICVF_RX_ASSERT(rxq->recv_buffers >= 0); +- } ++ } ++ if (rxq->recv_buffers > rxq->rx_free_thresh) { ++ rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); ++ NICVF_RX_ASSERT(rxq->recv_buffers >= 0); + } + + return to_process; diff --git a/debian/patches/series b/debian/patches/series index a8f48505..89f11d64 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,13 @@ fix-vhost-user-socket-permission.patch fix-power-default-config.patch dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch +nicvf-0001-net-thunderx-check-data-offset-alignment-requirement.patch +nicvf-0002-net-thunderx-fix-32-bit-build.patch +nicvf-0003-config-enable-thunderx-nicvf.patch +nicvf-0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch +nicvf-0005-net-thunderx-wait-to-complete-during-link-update.patch +nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch +nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch +nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch +nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch +nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch -- cgit 1.2.3-korg From ec141109a4e206343802e8c84220f31d9536732b Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Fri, 19 May 2017 09:06:45 +0200 Subject: changelog: Add thunderx (LP: #1691659) Change-Id: I1a2d87d645a3375a9db1e6bf6926d37bdb420a9a Signed-off-by: Christian Ehrhardt --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7957c454..d1a13d4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium - librte-kni is built on ppc64el, fix dependency from libdpdk-dev - librte-pmd-fm10k1 is not built on ppc64el (empty pkg atm) adapt arch - librte-pmd-i40e is built on all architectures now + * Fix up thunderx to make arm support useful on more devices (LP: #1691659) + - d/p/nicvf-00[01-10]* backports of 17.02/17.05 fixes for thunderx [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 631014b0296cfeaaabfd474cad5f3f46b3deef7a Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 13:36:36 +0200 Subject: d/control deps and pkg for thunderx Change-Id: Iee2c9d08e1eea34735a9b2302317bc1c8a283f48 Signed-off-by: Christian Ehrhardt --- debian/control | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'debian') diff --git a/debian/control b/debian/control index 1d75a9e8..7808f6da 100644 --- a/debian/control +++ b/debian/control @@ -52,6 +52,7 @@ Recommends: dpdk-igb-uio-dkms (= ${binary:Version}) [arm64], librte-pmd-pcap1 (= ${binary:Version}), librte-pmd-qede1 (= ${binary:Version}), librte-pmd-ring2 (= ${binary:Version}), + librte-pmd-thunderx-nicvf1 (= ${binary:Version}), librte-pmd-vhost1 (= ${binary:Version}), librte-pmd-virtio1 (= ${binary:Version}), librte-pmd-vmxnet3-uio1 (= ${binary:Version}) [amd64 arm64 i386], @@ -159,6 +160,7 @@ Depends: libpcap-dev, librte-pmd-pcap1 (= ${binary:Version}), librte-pmd-qede1 (= ${binary:Version}), librte-pmd-ring2 (= ${binary:Version}), + librte-pmd-thunderx-nicvf1 (= ${binary:Version}), librte-pmd-vhost1 (= ${binary:Version}), librte-pmd-virtio1 (= ${binary:Version}), librte-pmd-vmxnet3-uio1 (= ${binary:Version}) [amd64 arm64 i386], @@ -783,6 +785,18 @@ Description: Data Plane Development Kit (librte_pdump runtime library) . This package contains the runtime libraries for librte_pdump. +Package: librte-pmd-thunderx-nicvf1 +Architecture: amd64 arm64 i386 ppc64el +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} +Conflicts: libdpdk +Description: Data Plane Development Kit (librte_pmd_thunderx_nicvf runtime library) + DPDK is a set of libraries for fast packet processing. Applications run + in user-space and communicate directly with dedicated network interfaces. + . + This package contains the runtime libraries for librte_pmd_thunderx_nicvf. + # All following packages are for ABI compatibility to older releases. # Newer DPDK versions are ABI compatible to older ones for at least one release # and more if maintainable. -- cgit 1.2.3-korg From 7cc28b8bf51333b7dba2e3003435a986b67c0fab Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 15:29:09 +0200 Subject: changelog: d/control deps and pkg for thunderx Change-Id: Id909be3ec1ee7d95083cbeca9406ccfd63f3ba0c Signed-off-by: Christian Ehrhardt --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d1a13d4a..7fdb353f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium - librte-pmd-i40e is built on all architectures now * Fix up thunderx to make arm support useful on more devices (LP: #1691659) - d/p/nicvf-00[01-10]* backports of 17.02/17.05 fixes for thunderx + - d/control: dependencies and package for librte-pmd-thunderx-nicvf [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 6556806d3c558386b2ed8dcfbf3f9d1ac28155fa Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 13:37:18 +0200 Subject: thunderx symbols Change-Id: Ide7f7f3785eb3f25cd6347003678825d64415bc9 Signed-off-by: Christian Ehrhardt --- debian/librte-pmd-thunderx-nicvf1.symbols | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 debian/librte-pmd-thunderx-nicvf1.symbols (limited to 'debian') diff --git a/debian/librte-pmd-thunderx-nicvf1.symbols b/debian/librte-pmd-thunderx-nicvf1.symbols new file mode 100644 index 00000000..eab82e46 --- /dev/null +++ b/debian/librte-pmd-thunderx-nicvf1.symbols @@ -0,0 +1,5 @@ +librte_pmd_thunderx_nicvf.so.1 librte-pmd-thunderx-nicvf1 #MINVER# +# was not built before 16.11 plus updates + DPDK_16.07@DPDK_16.07 16.11 +# INFO: this library exports no symbols, essentially it is a driver that +# registers itself on load and is then only driven by callbacks. -- cgit 1.2.3-korg From c6c543c9fd66fa40f92d6648c7fbeda4bf626c0a Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 18 May 2017 15:29:35 +0200 Subject: changelog: thunderx symbols Change-Id: Ic1aa2dcfd2b3aef1c89f0d33cfd65ff466fa1c04 Signed-off-by: Christian Ehrhardt --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7fdb353f..c571811c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium * Fix up thunderx to make arm support useful on more devices (LP: #1691659) - d/p/nicvf-00[01-10]* backports of 17.02/17.05 fixes for thunderx - d/control: dependencies and package for librte-pmd-thunderx-nicvf + - d/librte-pmd-thunderx-nicvf1.symbols: tracking library symbols [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 8e0c599390561feb8b4ea639c2182e9e130fd7b7 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Fri, 19 May 2017 07:39:46 +0200 Subject: fix dkms issues on 4.11 (LP: #1691830) Change-Id: I5b22aa085d3172a294806b62158f0949ef574789 Signed-off-by: Christian Ehrhardt --- .../patches/kni-fix-build-with-kernel-4.11.patch | 82 ++++++++++++++++++++++ .../kni-fix-ethtool-build-with-kernel-4.11.patch | 65 +++++++++++++++++ debian/patches/series | 2 + 3 files changed, 149 insertions(+) create mode 100644 debian/patches/kni-fix-build-with-kernel-4.11.patch create mode 100644 debian/patches/kni-fix-ethtool-build-with-kernel-4.11.patch (limited to 'debian') diff --git a/debian/patches/kni-fix-build-with-kernel-4.11.patch b/debian/patches/kni-fix-build-with-kernel-4.11.patch new file mode 100644 index 00000000..73dfe51d --- /dev/null +++ b/debian/patches/kni-fix-build-with-kernel-4.11.patch @@ -0,0 +1,82 @@ +From d4d2380cbb02980bf0334601d9ce6ec5400413f9 Mon Sep 17 00:00:00 2001 +From: Ferruh Yigit +Date: Tue, 21 Mar 2017 09:54:48 +0000 +Subject: [PATCH] kni: fix build with kernel 4.11 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +compile error: +.../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6: +error: implicit declaration of function ‘signal_pending’ +[-Werror=implicit-function-declaration] + if (signal_pending(current) || ret_val <= 0) { + ^~~~~~~~~~~~~~ + +Linux 4.11 moves signal function declarations to its own header file: +Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup & +sigpending methods from into ") + +Use new header file "linux/sched/signal.h" to fix the build error. + +Cc: stable@dpdk.org + +Reported-by: Jerin Jacob +Signed-off-by: Ferruh Yigit +Tested-by: Jerin Jacob +Tested-by: Pankaj Gupta +--- + lib/librte_eal/linuxapp/kni/compat.h | 6 ++++++ + lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++ + 2 files changed, 12 insertions(+) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=d4d2380cbb02980bf0334601d9ce6ec5400413f9 +Original-Author: Ferruh Yigit +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691830 +Author: Christian Ehrhardt +Last-Update: 2017-05-19 + +diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h +index 78da08e..d96275a 100644 +--- a/lib/librte_eal/linuxapp/kni/compat.h ++++ b/lib/librte_eal/linuxapp/kni/compat.h +@@ -2,6 +2,8 @@ + * Minimal wrappers to allow compiling kni on older kernels. + */ + ++#include ++ + #ifndef RHEL_RELEASE_VERSION + #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b)) + #endif +@@ -67,3 +69,7 @@ + (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34))) + #undef NET_NAME_UNKNOWN + #endif ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER ++#endif +diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h +index 002e5fa..72385ab 100644 +--- a/lib/librte_eal/linuxapp/kni/kni_dev.h ++++ b/lib/librte_eal/linuxapp/kni/kni_dev.h +@@ -30,9 +30,15 @@ + #endif + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + ++#include "compat.h" ++ + #include + #include ++#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER ++#include ++#else + #include ++#endif + #include + #include + #include +-- +2.7.4 + diff --git a/debian/patches/kni-fix-ethtool-build-with-kernel-4.11.patch b/debian/patches/kni-fix-ethtool-build-with-kernel-4.11.patch new file mode 100644 index 00000000..cd8c21be --- /dev/null +++ b/debian/patches/kni-fix-ethtool-build-with-kernel-4.11.patch @@ -0,0 +1,65 @@ +From 9fb3cd2c041eeca30b6c46e5d555d857d6096ae7 Mon Sep 17 00:00:00 2001 +From: Ferruh Yigit +Date: Wed, 3 May 2017 17:00:16 +0100 +Subject: [PATCH] kni: fix ethtool build with kernel 4.11 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +build error: +.../lib/librte_eal/linuxapp/kni/igb_main.c:1034:10: +error: implicit declaration of function ‘pci_enable_msix’ + err = pci_enable_msix(pdev, + ^~~~~~~~~~~~~~~ + +This build error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option +enabled. + +Following Linux commit removes the pci_enable_msix() +Linux: 4244de1c64de ("PCI: remove pci_enable_msix") + +Switch to pci_enable_msix_range() for kernel > 4.8 since current Linux +igb driver uses this function. + +Signed-off-by: Ferruh Yigit +Acked-by: Nicolas Dichtel +--- + lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 7 +++++++ + lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 4 ++++ + 2 files changed, 11 insertions(+) + +Origin: http://dpdk.org/browse/dpdk/commit/?id=9fb3cd2c041eeca30b6c46e5d555d857d6096ae7 +Original-Author: Ferruh Yigit +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691830 +Author: Christian Ehrhardt +Last-Update: 2017-05-19 + +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +@@ -1031,8 +1031,15 @@ + for (i = 0; i < numvecs; i++) + adapter->msix_entries[i].entry = i; + ++#ifdef HAVE_PCI_ENABLE_MSIX + err = pci_enable_msix(pdev, + adapter->msix_entries, numvecs); ++#else ++ err = pci_enable_msix_range(pdev, ++ adapter->msix_entries, ++ numvecs, ++ numvecs); ++#endif + if (err == 0) + break; + } +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +@@ -3933,4 +3933,8 @@ + #define HAVE_VF_VLAN_PROTO + #endif /* >= 4.9.0 */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) ++#define HAVE_PCI_ENABLE_MSIX ++#endif ++ + #endif /* _KCOMPAT_H_ */ diff --git a/debian/patches/series b/debian/patches/series index 89f11d64..878e9259 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,3 +12,5 @@ nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch +kni-fix-build-with-kernel-4.11.patch +kni-fix-ethtool-build-with-kernel-4.11.patch -- cgit 1.2.3-korg From 7d7841c29e4c6a9a8e590448134d7d893778c325 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Fri, 19 May 2017 07:41:25 +0200 Subject: changelog: fix dkms issues on 4.11 (LP: #1691830) Change-Id: Ia523427abeb54027a6d923c51a30822e2dfd6a7c Signed-off-by: Christian Ehrhardt --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c571811c..5040a565 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,9 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium - d/p/nicvf-00[01-10]* backports of 17.02/17.05 fixes for thunderx - d/control: dependencies and package for librte-pmd-thunderx-nicvf - d/librte-pmd-thunderx-nicvf1.symbols: tracking library symbols + * fix dpdk-rte-kni dkms issues with kernel 4.11 (LP: #1691830) + - d/p/kni-fix-build-with-kernel-4.11.patch: fix pci_enable_msix usage + - d/p/kni-fix-ethtool-build-with-kernel-4.11.patch: Use new signal header [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From bfc76e8a86292e59f442aba7d3cdb1510a652608 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Fri, 19 May 2017 08:54:41 +0200 Subject: debian/control: remove arm64 dkms recommends This was meant when arm64 absolutely required the dkms modules to work. But there are platforms which can work without now. We already have a arch neutral suggests, so no need to replace this. Given the complexity dkms sometimes brings on e.g. kernel updates dropping the recommends helps more systems (by avoiding those issues) than it hurts (by users of those needing it installing the dkms packages) Change-Id: I99a060092d685a8cb87db6d0259e4ab18a823d7e Signed-off-by: Christian Ehrhardt --- debian/control | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 7808f6da..e769ba30 100644 --- a/debian/control +++ b/debian/control @@ -35,9 +35,7 @@ Depends: hwdata, ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} -Recommends: dpdk-igb-uio-dkms (= ${binary:Version}) [arm64], - dpdk-rte-kni-dkms (= ${binary:Version}) [arm64], - librte-pmd-af-packet1 (= ${binary:Version}), +Recommends: librte-pmd-af-packet1 (= ${binary:Version}), librte-pmd-bnxt1 (= ${binary:Version}), librte-pmd-bond1 (= ${binary:Version}), librte-pmd-cxgbe1 (= ${binary:Version}), -- cgit 1.2.3-korg From 784bf02aa60bcb6db6cdc57af06a0ec4e6c8add8 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Fri, 19 May 2017 10:48:43 +0200 Subject: debian/rules: fix man pages on non-x86 These were built only in the arch indep, and therefore usually x86 only. Due to that dh:_installman only picked it up there. Move the make target to the binary section, so that the man pages will be packaged along the executables. Update in v2 - keep it in the BUILD_DOC wrapper to be able to skip it with nodoc build option. Change-Id: I6aa6f2d78014de7764b6a8804711570b0194f66d Signed-off-by: Christian Ehrhardt --- debian/rules | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 3a4b3197..b2a059ad 100755 --- a/debian/rules +++ b/debian/rules @@ -172,8 +172,7 @@ endif override_dh_auto_build-indep: ifeq (y,$(BUILD_DOCS)) - $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html \ - doc-guides-man + $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html endif override_dh_auto_install-indep: @@ -201,6 +200,10 @@ endif sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' \ $(DPDK_SHARED_DIR)/.config $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build +ifeq (y,$(BUILD_DOCS)) + # need to be around for dh_installman to be picked up + $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) doc-guides-man +endif override_dh_auto_install-arch: LIBDIR=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) override_dh_auto_install-arch: -- cgit 1.2.3-korg From 620d3642469706d7649c5505484406bd614468e1 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Fri, 19 May 2017 10:48:56 +0200 Subject: changelog: fix man pages on non-x86 Change-Id: I4ecd2957e01f9017b0a3f2aa46e67856a3978cd2 Signed-off-by: Christian Ehrhardt --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5040a565..6f554e51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,7 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium * fix dpdk-rte-kni dkms issues with kernel 4.11 (LP: #1691830) - d/p/kni-fix-build-with-kernel-4.11.patch: fix pci_enable_msix usage - d/p/kni-fix-ethtool-build-with-kernel-4.11.patch: Use new signal header + * ensure man pages are bundled with executables on all architectures [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 499849a5cc8a1723500e41206e7d369297c1b36b Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Tue, 23 May 2017 12:17:55 +0200 Subject: d/p/fix-vhost-user-socket-permission update ovs Fix to work with newer openvswitch versions. Change-Id: Iaa10e90611b9cd2cee45328a2cce4bfb1efcbdb2 Signed-off-by: Christian Ehrhardt --- .../patches/fix-vhost-user-socket-permission.patch | 138 +++++++++++---------- 1 file changed, 74 insertions(+), 64 deletions(-) (limited to 'debian') diff --git a/debian/patches/fix-vhost-user-socket-permission.patch b/debian/patches/fix-vhost-user-socket-permission.patch index 1978ac2d..7cd188c5 100644 --- a/debian/patches/fix-vhost-user-socket-permission.patch +++ b/debian/patches/fix-vhost-user-socket-permission.patch @@ -25,9 +25,17 @@ Fixes LP: #1546565 So over time we have to check when we can drop it at the price of a config transition - likely OVS 2.6 won't need it anymore. +*Update* + - the handling and lifecycle of this changed in Openvswitch 2.7 so we can no + more use internal_config. + - Also the upstreaming was aborted as that now clearly goes towards client + mode vhost sockets for this (and other issues). + - But until that is fully working we have to carry the workaround. + - Updated to work with Openvswitch 2.7 (and backward compatible to 2.6) + Forwarded: yes Author: Christian Ehrhardt -Last-Update: 2016-09-28 +Last-Update: 2017-05-23 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -68,26 +76,6 @@ Last-Update: 2016-09-28 {0, 0, NULL, 0 } }; -@@ -166,6 +168,8 @@ - #endif - internal_cfg->vmware_tsc_map = 0; - internal_cfg->create_uio_dev = 0; -+ internal_cfg->vhost_sock_owner = NULL; -+ internal_cfg->vhost_sock_perm = NULL; - } - - static int ---- a/lib/librte_eal/common/eal_internal_cfg.h -+++ b/lib/librte_eal/common/eal_internal_cfg.h -@@ -83,6 +83,8 @@ - volatile enum rte_intr_mode vfio_intr_mode; - const char *hugefile_prefix; /**< the base filename of hugetlbfs files */ - const char *hugepage_dir; /**< specific hugetlbfs directory to use */ -+ const char *vhost_sock_owner; /**< owner:group of vhost_user sockets */ -+ const char *vhost_sock_perm; /**< permissions of vhost_user sockets */ - - unsigned num_hugepage_sizes; /**< how many sizes on this system */ - struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES]; --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -83,6 +83,10 @@ @@ -127,7 +115,20 @@ Last-Update: 2016-09-28 #include #include -@@ -354,6 +357,8 @@ +@@ -117,6 +120,12 @@ + /* internal configuration */ + struct internal_config internal_config; + ++/* workaround to be able to create the sockets under a certain set of ++ * owner/permissions as specified to EAL until solved upstream */ ++static uid_t debian_vhost_sock_uid = (uid_t)-1; ++static gid_t debian_vhost_sock_gid = (gid_t)-1; ++static mode_t debian_vhost_sock_perm = 0; ++ + /* used by rte_rdtsc() */ + int rte_cycles_vmware_tsc_map; + +@@ -354,6 +363,8 @@ " --"OPT_CREATE_UIO_DEV" Create /dev/uioX (usually done by hotplug)\n" " --"OPT_VFIO_INTR" Interrupt mode for VFIO (legacy|msi|msix)\n" " --"OPT_XEN_DOM0" Support running on Xen dom0 without hugetlbfs\n" @@ -136,26 +137,10 @@ Last-Update: 2016-09-28 "\n"); /* Allow the application to print its usage message too if hook is set */ if ( rte_application_usage_hook ) { -@@ -611,6 +616,14 @@ - internal_config.create_uio_dev = 1; - break; - -+ case OPT_VHOST_OWNER_NUM: -+ internal_config.vhost_sock_owner = optarg; -+ break; -+ -+ case OPT_VHOST_PERM_NUM: -+ internal_config.vhost_sock_perm = optarg; -+ break; -+ - default: - if (opt < OPT_LONG_MIN_NUM && isprint(opt)) { - RTE_LOG(ERR, EAL, "Option %c is not supported " -@@ -943,3 +956,172 @@ - /* Module has been found */ - return 1; +@@ -515,6 +526,121 @@ + optarg = old_optarg; } -+ + +/* Try to double the size of '*buf', return true + * if successful, and '*sizep' will be updated with + * the new size. Otherwise, return false. */ @@ -270,57 +255,82 @@ Last-Update: 2016-09-28 + free(user_search); + return e; +} ++ + /* Parse the argument given in the command line of the application */ + static int + eal_parse_args(int argc, char **argv) +@@ -611,6 +737,26 @@ + internal_config.create_uio_dev = 1; + break; + ++ case OPT_VHOST_OWNER_NUM: ++ if (get_owners_from_str(optarg, &debian_vhost_sock_uid, ++ &debian_vhost_sock_gid)) { ++ RTE_LOG(ERR, EAL,"vhost-user socket unable to get" ++ " specified user/group: %s\n", optarg); ++ debian_vhost_sock_uid = (uid_t)-1; ++ debian_vhost_sock_gid = (gid_t)-1; ++ } ++ else { ++ RTE_LOG(INFO, EAL,"socket owner specified as %s (%d:%d)\n", ++ optarg, debian_vhost_sock_uid, debian_vhost_sock_gid); ++ } ++ break; ++ ++ case OPT_VHOST_PERM_NUM: ++ debian_vhost_sock_perm = (mode_t)strtoul(optarg, NULL, 0); ++ RTE_LOG(INFO, EAL,"socket perm specified as '%#o' from '%s'\n", ++ debian_vhost_sock_perm, optarg); ++ break; ++ + default: + if (opt < OPT_LONG_MIN_NUM && isprint(opt)) { + RTE_LOG(ERR, EAL, "Option %c is not supported " +@@ -943,3 +1089,47 @@ + /* Module has been found */ + return 1; + } + +static void +vhost_set_permissions(const char *vhost_sock_location) +{ -+ unsigned long int mode = strtoul(internal_config.vhost_sock_perm, NULL, 0); -+ int err = chmod(vhost_sock_location, (mode_t)mode); ++ int err = chmod(vhost_sock_location, debian_vhost_sock_perm); + if (err) { + RTE_LOG(ERR, EAL,"vhost-user socket cannot set" -+ " permissions to %s (%s).\n", -+ internal_config.vhost_sock_perm, strerror(err)); ++ " permissions to %#o (%s).\n", ++ debian_vhost_sock_perm, strerror(err)); + return; + } + RTE_LOG(INFO, EAL,"Socket %s changed permissions" -+ " to %s\n", vhost_sock_location, -+ internal_config.vhost_sock_perm); ++ " to %#o\n", vhost_sock_location, ++ debian_vhost_sock_perm); +} + +static void +vhost_set_ownership(const char *vhost_sock_location) +{ -+ uid_t vhuid=0; -+ gid_t vhgid=0; -+ -+ if (get_owners_from_str(internal_config.vhost_sock_owner, &vhuid, &vhgid)) { -+ RTE_LOG(ERR, EAL,"vhost-user socket unable to get" -+ " specified user/group: %s\n", -+ internal_config.vhost_sock_owner); -+ return; -+ } -+ -+ int err = chown(vhost_sock_location, vhuid, vhgid); ++ int err = chown(vhost_sock_location, debian_vhost_sock_uid, debian_vhost_sock_gid); + if (err) { + RTE_LOG(ERR, EAL,"vhost-user socket unable to set" -+ " ownership to %s (%s).\n", -+ internal_config.vhost_sock_owner, strerror(err)); ++ " ownership to %d:%d (%s).\n", ++ debian_vhost_sock_uid, debian_vhost_sock_gid, ++ strerror(err)); + return; + } + + RTE_LOG(INFO, EAL,"Socket %s changed ownership" -+ " to %s.\n", vhost_sock_location, -+ internal_config.vhost_sock_owner); ++ " to %d:%d.\n", vhost_sock_location, ++ debian_vhost_sock_uid, debian_vhost_sock_gid); +} + +void +rte_eal_set_socket_permissions(const char *path) +{ -+ if (internal_config.vhost_sock_perm) { ++ if (debian_vhost_sock_perm != 0) { + vhost_set_permissions(path); + } + -+ if (internal_config.vhost_sock_owner) { ++ if (debian_vhost_sock_uid != (uid_t)-1 || debian_vhost_sock_gid != (gid_t)-1) { + vhost_set_ownership(path); + } +} -- cgit 1.2.3-korg From a1010a65a23be30d1a1d1d369ff47f8abce391f5 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Wed, 24 May 2017 07:47:41 +0200 Subject: changelog: d/p/fix-vhost-user-socket-permission Changelog entry to the update to d/p/fix-vhost-user-socket-permission to work with newer openvswitch versions. Change-Id: I7705fab315897806763a5897a1c5deaf69651cb4 Signed-off-by: Christian Ehrhardt --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6f554e51..b1deb76f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium - d/p/kni-fix-build-with-kernel-4.11.patch: fix pci_enable_msix usage - d/p/kni-fix-ethtool-build-with-kernel-4.11.patch: Use new signal header * ensure man pages are bundled with executables on all architectures + * d/p/fix-vhost-user-socket-permission.patch: updated to work with newer + openvswitch versions [ Luca Boccassi ] * Simplify debian/rules by using upstream's install target -- cgit 1.2.3-korg From 8686692a718455cac01a0f78081ff8fb2193afe7 Mon Sep 17 00:00:00 2001 From: Santiago Date: Tue, 30 May 2017 09:51:23 +0200 Subject: debian/control: fix compatbility typo Change-Id: I2095f6f1292d40ead117a4d22a1dffcfa0c18b7a Gbp-Dch: Ignore Signed-off-by: Santiago --- debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index e769ba30..c842e77b 100644 --- a/debian/control +++ b/debian/control @@ -826,7 +826,7 @@ Description: Data Plane Development Kit (libethdev runtime library) DPDK is a set of libraries for fast packet processing. Applications run in user-space and communicate directly with dedicated network interfaces. . - This package contains an ABI compatbility link for an older version of the + This package contains an ABI compatibility link for an older version of the runtime libraries for libethdev. Package: librte-cryptodev1 @@ -840,7 +840,7 @@ Description: Data Plane Development Kit (librte-cryptodev runtime library) DPDK is a set of libraries for fast packet processing. Applications run in user-space and communicate directly with dedicated network interfaces. . - This package contains an ABI compatbility link for an older version of the + This package contains an ABI compatibility link for an older version of the the runtime libraries for librte_cryptodev. Package: librte-eal2 @@ -854,6 +854,6 @@ Description: Data Plane Development Kit (librte-eal runtime library) DPDK is a set of libraries for fast packet processing. Applications run in user-space and communicate directly with dedicated network interfaces. . - This package contains an ABI compatbility link for an older version of the + This package contains an ABI compatibility link for an older version of the runtime libraries for librte_eal. -- cgit 1.2.3-korg From 5f6021664aa3edf36ab7f37378c032a86bb655b2 Mon Sep 17 00:00:00 2001 From: Santiago Date: Tue, 30 May 2017 13:18:48 +0200 Subject: debian/control: remove duplicated 'the' Change-Id: I77feaaa5dfbb5cd3d1a8397dd6542192af17d46d Gbp-Dch: Ignore Signed-off-by: Santiago --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index c842e77b..9a135064 100644 --- a/debian/control +++ b/debian/control @@ -841,7 +841,7 @@ Description: Data Plane Development Kit (librte-cryptodev runtime library) in user-space and communicate directly with dedicated network interfaces. . This package contains an ABI compatibility link for an older version of the - the runtime libraries for librte_cryptodev. + runtime libraries for librte_cryptodev. Package: librte-eal2 Architecture: amd64 arm64 i386 ppc64el -- cgit 1.2.3-korg From ed7798327d28889f6b6e08c6eb2966c9d92c9cfa Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:05:13 +0100 Subject: Change DEB_BUILD_OPTIONS nodocs to nodoc Debian Policy version 4.0.0 was just released and nodoc is officially recommended and recognised. Rename the option to comply. Change-Id: If80282f5e47b05065dd427d067f6e37c0f349517 Signed-off-by: Luca Boccassi --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index b2a059ad..5c14b37c 100755 --- a/debian/rules +++ b/debian/rules @@ -75,7 +75,7 @@ else PAR := "1" endif -ifneq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) +ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) BUILD_DOCS=n else BUILD_DOCS=y -- cgit 1.2.3-korg From 6ce014b0d19b7a81bfba9467f69f3c9597b887a2 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:06:23 +0100 Subject: Update changelog for nodocs to nodoc change Change-Id: Ic7a47d8a3b431641ea77c6a6b81caeb22f82cd48 Signed-off-by: Luca Boccassi --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b1deb76f..2ef8ee3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,7 +32,7 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium and Debian's multiarch dir. Thanks Jan Blunck! * Clarify that only the kni and igb_uio kernel modules are distributed exclusively under the GPL2 in debian/copyright - * Add new DEB_BUILD_OPTIONS "nodocs" to allow users to avoid + * Add new DEB_BUILD_OPTIONS "nodoc" to allow users to avoid building the DPDK documentation * Add new DEB_BUILD_OPTIONS "nostatic" to allow users to avoid building the DPDK static libraries -- cgit 1.2.3-korg From ec6cf932cdbfd21314a20fe42bfe5f9ae29e868e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:07:03 +0100 Subject: Use HTTPS for d/copyright format URL Debian Policy v4.0.0 recommends using HTTPS Change-Id: Iba14b202cdc77936da1a3dde739cc68bb87a23a4 Signed-off-by: Luca Boccassi --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/copyright b/debian/copyright index 5ad7c10b..9d36e823 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: dpdk Source: http://dpdk.org -- cgit 1.2.3-korg From cb4b4b5088b958c974e048ab9c82835f750ee0b0 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:11:12 +0100 Subject: Add try-restart to init script try-restart is specified in the Debian Policy v4.0.0. We already do nothing for restart, so do the same for try-restart. Change-Id: Ia72f22d9bae7785f1d5557d111dd284bbf799ff2 Signed-off-by: Luca Boccassi --- debian/dpdk.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/dpdk.init b/debian/dpdk.init index 01b47845..002ba29f 100644 --- a/debian/dpdk.init +++ b/debian/dpdk.init @@ -35,7 +35,7 @@ start) ;; stop) ;; -restart|force-reload) +try-restart|restart|force-reload) ;; status) output=$(/lib/dpdk/dpdk-init --status 2>&1) || error="$?" -- cgit 1.2.3-korg From bf6e314c5180192fe8beb93846b0170c16240fa5 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:12:02 +0100 Subject: Mention try-restart in changelog Change-Id: I44ff94666905cf7dbbdd7033e643f555289ac0ea Signed-off-by: Luca Boccassi --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2ef8ee3b..36b51265 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,7 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium building the DPDK documentation * Add new DEB_BUILD_OPTIONS "nostatic" to allow users to avoid building the DPDK static libraries + * Add try-restart to dpdk.init script -- Christian Ehrhardt Thu, 08 Dec 2016 16:58:37 +0100 -- cgit 1.2.3-korg From 0af1d7eff76dcd3b78ce334c87e87822b6eecfc0 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:13:53 +0100 Subject: Declare compliance with Debian Policy v4.0.0 Update Standards-Version to 4.0.0 Change-Id: I441d6824e122e459f058de79b6d3e30d50fad342 Signed-off-by: Luca Boccassi --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 9a135064..db3c12eb 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,7 @@ Build-Depends: debhelper (>= 9), python-sphinx-rtd-theme, texlive-fonts-recommended, texlive-latex-extra -Standards-Version: 3.9.8 +Standards-Version: 4.0.0 Section: libs Homepage: http://www.dpdk.org Vcs-Git: https://gerrit.fd.io/r/deb_dpdk -- cgit 1.2.3-korg From 98b330d5d42b569850026263bbda81511c583252 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 30 May 2017 14:14:30 +0100 Subject: Mention Standards-Version bump in changelog Change-Id: I8151f4f72fcc8ac7d11a5c8c73f954efd7eb70d3 Signed-off-by: Luca Boccassi --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 36b51265..aa45cdd3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,7 @@ dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium * Add new DEB_BUILD_OPTIONS "nostatic" to allow users to avoid building the DPDK static libraries * Add try-restart to dpdk.init script + * Update Standards-Version to 4.0.0 -- Christian Ehrhardt Thu, 08 Dec 2016 16:58:37 +0100 -- cgit 1.2.3-korg From 1d15a86e5aaf82b853b5c6811346a328881f6cf2 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 8 Jun 2017 10:06:45 -0600 Subject: Changelog: Merge stable update to 16.11.2 Change-Id: Iff1a96695bc84413780aadc93d23dc9f59272598 Signed-off-by: Christian Ehrhardt --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index aa45cdd3..8d88ceb4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium + + * Merge stable update to 16.11.2; For a list of changes + see http://dpdk.org/ml/archives/announce/2017-May/000131.html + + -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 + dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium [ Christian Ehrhardt ] -- cgit 1.2.3-korg From 58084e746e7f1d6c8b5d894b0ee6debfcb6bb6a7 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 8 Jun 2017 10:13:20 -0600 Subject: Drop patches that are in 16.11.2 Drop patches that were included in the latest stable release: - debian/patches/kni-fix-build-with-kernel-4.11.patch - debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch - debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch - debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch - debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch Change-Id: Iced4e508c5dd2c41adf7589123e367983de9bb89 Signed-off-by: Christian Ehrhardt --- .../patches/kni-fix-build-with-kernel-4.11.patch | 82 ---------------------- .../nicvf-0002-net-thunderx-fix-32-bit-build.patch | 58 --------------- ...006-mk-fix-lib-filtering-when-linking-app.patch | 71 ------------------- ...t-thunderx-fix-stats-access-out-of-bounds.patch | 67 ------------------ ...0010-net-thunderx-fix-deadlock-in-Rx-path.patch | 58 --------------- debian/patches/series | 5 -- 6 files changed, 341 deletions(-) delete mode 100644 debian/patches/kni-fix-build-with-kernel-4.11.patch delete mode 100644 debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch delete mode 100644 debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch delete mode 100644 debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch delete mode 100644 debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch (limited to 'debian') diff --git a/debian/patches/kni-fix-build-with-kernel-4.11.patch b/debian/patches/kni-fix-build-with-kernel-4.11.patch deleted file mode 100644 index 73dfe51d..00000000 --- a/debian/patches/kni-fix-build-with-kernel-4.11.patch +++ /dev/null @@ -1,82 +0,0 @@ -From d4d2380cbb02980bf0334601d9ce6ec5400413f9 Mon Sep 17 00:00:00 2001 -From: Ferruh Yigit -Date: Tue, 21 Mar 2017 09:54:48 +0000 -Subject: [PATCH] kni: fix build with kernel 4.11 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -compile error: -.../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6: -error: implicit declaration of function ‘signal_pending’ -[-Werror=implicit-function-declaration] - if (signal_pending(current) || ret_val <= 0) { - ^~~~~~~~~~~~~~ - -Linux 4.11 moves signal function declarations to its own header file: -Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup & -sigpending methods from into ") - -Use new header file "linux/sched/signal.h" to fix the build error. - -Cc: stable@dpdk.org - -Reported-by: Jerin Jacob -Signed-off-by: Ferruh Yigit -Tested-by: Jerin Jacob -Tested-by: Pankaj Gupta ---- - lib/librte_eal/linuxapp/kni/compat.h | 6 ++++++ - lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++ - 2 files changed, 12 insertions(+) - -Origin: http://dpdk.org/browse/dpdk/commit/?id=d4d2380cbb02980bf0334601d9ce6ec5400413f9 -Original-Author: Ferruh Yigit -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691830 -Author: Christian Ehrhardt -Last-Update: 2017-05-19 - -diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h -index 78da08e..d96275a 100644 ---- a/lib/librte_eal/linuxapp/kni/compat.h -+++ b/lib/librte_eal/linuxapp/kni/compat.h -@@ -2,6 +2,8 @@ - * Minimal wrappers to allow compiling kni on older kernels. - */ - -+#include -+ - #ifndef RHEL_RELEASE_VERSION - #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b)) - #endif -@@ -67,3 +69,7 @@ - (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34))) - #undef NET_NAME_UNKNOWN - #endif -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER -+#endif -diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h -index 002e5fa..72385ab 100644 ---- a/lib/librte_eal/linuxapp/kni/kni_dev.h -+++ b/lib/librte_eal/linuxapp/kni/kni_dev.h -@@ -30,9 +30,15 @@ - #endif - #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -+#include "compat.h" -+ - #include - #include -+#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER -+#include -+#else - #include -+#endif - #include - #include - #include --- -2.7.4 - diff --git a/debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch b/debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch deleted file mode 100644 index f5653d1e..00000000 --- a/debian/patches/nicvf-0002-net-thunderx-fix-32-bit-build.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 6d76fde7dba39769c64bee03b62593cc66a1b0e3 Mon Sep 17 00:00:00 2001 -From: Jerin Jacob -Date: Sun, 19 Mar 2017 20:18:46 +0530 -Subject: [PATCH] net/thunderx: fix 32-bit build - -Fixes: e438796617dc ("net/thunderx: add PMD skeleton") - -Signed-off-by: Jerin Jacob ---- - drivers/net/thunderx/nicvf_struct.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -Origin: http://dpdk.org/browse/dpdk/commit/?id=6d76fde7dba39769c64bee03b62593cc66a1b0e3 -Original-Author: Jerin Jacob -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 -Author: Christian Ehrhardt -Last-Update: 2017-05-18 - -diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h -index c900e12..5bc6d57 100644 ---- a/drivers/net/thunderx/nicvf_struct.h -+++ b/drivers/net/thunderx/nicvf_struct.h -@@ -43,8 +43,8 @@ - #include - - struct nicvf_rbdr { -- uint64_t rbdr_status; -- uint64_t rbdr_door; -+ uintptr_t rbdr_status; -+ uintptr_t rbdr_door; - struct rbdr_entry_t *desc; - nicvf_phys_addr_t phys; - uint32_t buffsz; -@@ -58,8 +58,8 @@ struct nicvf_txq { - union sq_entry_t *desc; - nicvf_phys_addr_t phys; - struct rte_mbuf **txbuffs; -- uint64_t sq_head; -- uint64_t sq_door; -+ uintptr_t sq_head; -+ uintptr_t sq_door; - struct rte_mempool *pool; - struct nicvf *nic; - void (*pool_free)(struct nicvf_txq *sq); -@@ -74,8 +74,8 @@ struct nicvf_txq { - - struct nicvf_rxq { - uint64_t mbuf_phys_off; -- uint64_t cq_status; -- uint64_t cq_door; -+ uintptr_t cq_status; -+ uintptr_t cq_door; - nicvf_phys_addr_t phys; - union cq_entry_t *desc; - struct nicvf_rbdr *shared_rbdr; --- -2.7.4 - diff --git a/debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch b/debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch deleted file mode 100644 index 50093364..00000000 --- a/debian/patches/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch +++ /dev/null @@ -1,71 +0,0 @@ -From ab338eb44ebb79840dab1de2742c07070ae3bf0e Mon Sep 17 00:00:00 2001 -From: Olivier Matz -Date: Thu, 6 Apr 2017 16:14:55 +0200 -Subject: [PATCH] mk: fix lib filtering when linking app - -I get the following error when linking the test application: - build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): - In function `nicvf_qsize_regbit': - drivers/net/thunderx/base/nicvf_hw.c:451: undefined reference to `log2' - build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): - In function `nicvf_rss_reta_update': - drivers/net/thunderx/base/nicvf_hw.c:804: undefined reference to `log2' - build/lib/librte_pmd_thunderx_nicvf.a(nicvf_hw.o): - In function `nicvf_rss_reta_query': - drivers/net/thunderx/base/nicvf_hw.c:825: undefined reference to `log2' - -While I don't know why it does not happen for a default build, the error -can be explained. The link command line is: - - gcc -o test ... *.o ... -Wl,-lm ... -Wl,-lrte_pmd_thunderx_nicvf ... - -rte_pmd_thunderx_nicvf needs the math library, and it should be -added after. This is not the case because the test application also -adds the math library. - -The makefile already filters the libraries, but it keeps the first -occurrence of the lib. Instead, the last one should be kept. - -Fixes: edf4d331dcdb ("mk: eliminate duplicates from libraries list") -Cc: stable@dpdk.org - -Signed-off-by: Olivier Matz -Acked-by: Thomas Monjalon ---- - mk/rte.app.mk | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) - -Origin: http://dpdk.org/browse/dpdk/commit/?id=ab338eb44ebb79840dab1de2742c07070ae3bf0e -Original-Author: Olivier Matz -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 -Author: Christian Ehrhardt -Last-Update: 2017-05-18 - ---- a/mk/rte.app.mk -+++ b/mk/rte.app.mk -@@ -168,10 +168,21 @@ - - LDLIBS += $(_LDLIBS-y) $(CPU_LDLIBS) $(EXTRA_LDLIBS) - --# Eliminate duplicates without sorting --LDLIBS := $(shell echo $(LDLIBS) | \ -- awk '{for (i = 1; i <= NF; i++) { \ -- if ($$i !~ /^-l.*/ || !seen[$$i]++) print $$i }}') -+# all the words except the first one -+allbutfirst = $(wordlist 2,$(words $(1)),$(1)) -+ -+# Eliminate duplicates without sorting, only keep the last occurrence -+filter-libs = \ -+ $(if $(1),$(strip\ -+ $(if \ -+ $(and \ -+ $(filter $(firstword $(1)),$(call allbutfirst,$(1))),\ -+ $(filter -l%,$(firstword $(1)))),\ -+ ,\ -+ $(firstword $(1))) \ -+ $(call filter-libs,$(call allbutfirst,$(1))))) -+ -+LDLIBS := $(call filter-libs,$(LDLIBS)) - - ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy) - LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib diff --git a/debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch b/debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch deleted file mode 100644 index cd26df57..00000000 --- a/debian/patches/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 695cd416ce6c02d7a20108765573936998b2dbf0 Mon Sep 17 00:00:00 2001 -From: Marcin Wilk -Date: Tue, 11 Apr 2017 14:35:13 +0200 -Subject: [PATCH] net/thunderx: fix stats access out of bounds - -Trying to assign more queues to stats struct break only from one loop -when the maximum size is reached. Outside loop iteration is continued. -This leads to access an array out of bounds. - -Fixes: 21e3fb0050b9 ("net/thunderx: add final bits for secondary queue support") -Cc: stable@dpdk.org - -Signed-off-by: Marcin Wilk -Acked-by: Jerin Jacob ---- - drivers/net/thunderx/nicvf_ethdev.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -Origin: http://dpdk.org/browse/dpdk/commit/?id=695cd416ce6c02d7a20108765573936998b2dbf0 -Original-Author: Marcin Wilk -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 -Author: Christian Ehrhardt -Last-Update: 2017-05-18 - -diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c -index b0b9c3b..36ff94f 100644 ---- a/drivers/net/thunderx/nicvf_ethdev.c -+++ b/drivers/net/thunderx/nicvf_ethdev.c -@@ -258,7 +258,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) - - /* Reading per RX ring stats */ - for (qidx = rx_start; qidx <= rx_end; qidx++) { -- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) -+ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) - break; - - nicvf_hw_get_rx_qstats(nic, &rx_qstats, qidx); -@@ -271,7 +271,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) - - /* Reading per TX ring stats */ - for (qidx = tx_start; qidx <= tx_end; qidx++) { -- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) -+ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) - break; - - nicvf_hw_get_tx_qstats(nic, &tx_qstats, qidx); -@@ -290,7 +290,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) - - /* Reading per RX ring stats */ - for (qidx = rx_start; qidx <= rx_end; qidx++) { -- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) -+ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) - break; - - nicvf_hw_get_rx_qstats(snic, &rx_qstats, -@@ -303,7 +303,7 @@ nicvf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) - nicvf_tx_range(dev, snic, &tx_start, &tx_end); - /* Reading per TX ring stats */ - for (qidx = tx_start; qidx <= tx_end; qidx++) { -- if (qidx == RTE_ETHDEV_QUEUE_STAT_CNTRS) -+ if (qidx >= RTE_ETHDEV_QUEUE_STAT_CNTRS) - break; - - nicvf_hw_get_tx_qstats(snic, &tx_qstats, --- -2.7.4 - diff --git a/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch b/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch deleted file mode 100644 index 8773671b..00000000 --- a/debian/patches/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch +++ /dev/null @@ -1,58 +0,0 @@ -From b31eb105463fa1844c19fde382dd6bd294329831 Mon Sep 17 00:00:00 2001 -From: Jerin Jacob -Date: Tue, 2 May 2017 00:11:55 +0530 -Subject: [PATCH] net/thunderx: fix deadlock in Rx path - -RBDR buffers are refilled when SW consumes the buffers from CQ. -This creates deadlock case when CQ buffers exhausted due to lack -of RBDR buffers. Fix is to refill the RBDR when rx_free_thresh -meet, irrespective of the number of CQ buffers consumed. - -Fixes: e2d7fc9f0a24 ("net/thunderx: add single and multi-segment Rx") -Cc: stable@dpdk.org - -Signed-off-by: Jerin Jacob ---- - drivers/net/thunderx/nicvf_rxtx.c | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -Origin: http://dpdk.org/browse/dpdk/commit/?id=b31eb105463fa1844c19fde382dd6bd294329831 -Original-Author: Jerin Jacob -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659 -Author: Christian Ehrhardt -Last-Update: 2017-05-18 - ---- a/drivers/net/thunderx/nicvf_rxtx.c -+++ b/drivers/net/thunderx/nicvf_rxtx.c -@@ -469,11 +469,10 @@ - rxq->head = cqe_head; - nicvf_addr_write(rxq->cq_door, to_process); - rxq->recv_buffers += to_process; -- if (rxq->recv_buffers > rxq->rx_free_thresh) { -- rxq->recv_buffers -= nicvf_fill_rbdr(rxq, -- rxq->rx_free_thresh); -- NICVF_RX_ASSERT(rxq->recv_buffers >= 0); -- } -+ } -+ if (rxq->recv_buffers > rxq->rx_free_thresh) { -+ rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); -+ NICVF_RX_ASSERT(rxq->recv_buffers >= 0); - } - - return to_process; -@@ -563,11 +562,10 @@ - rxq->head = cqe_head; - nicvf_addr_write(rxq->cq_door, to_process); - rxq->recv_buffers += buffers_consumed; -- if (rxq->recv_buffers > rxq->rx_free_thresh) { -- rxq->recv_buffers -= -- nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); -- NICVF_RX_ASSERT(rxq->recv_buffers >= 0); -- } -+ } -+ if (rxq->recv_buffers > rxq->rx_free_thresh) { -+ rxq->recv_buffers -= nicvf_fill_rbdr(rxq, rxq->rx_free_thresh); -+ NICVF_RX_ASSERT(rxq->recv_buffers >= 0); - } - - return to_process; diff --git a/debian/patches/series b/debian/patches/series index 878e9259..a104d100 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,14 +3,9 @@ fix-power-default-config.patch dpdk-dev-v3-eal-sPAPR-IOMMU-support-in-pci-probing-for-vfio-pci-in-ppc64le.patch dpdk-dev-v4-i40e-implement-vector-PMD-for-altivec.patch nicvf-0001-net-thunderx-check-data-offset-alignment-requirement.patch -nicvf-0002-net-thunderx-fix-32-bit-build.patch nicvf-0003-config-enable-thunderx-nicvf.patch nicvf-0004-net-thunderx-sync-mailbox-definitions-with-Linux-PF-.patch nicvf-0005-net-thunderx-wait-to-complete-during-link-update.patch -nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch -nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch nicvf-0009-config-set-cache-line-as-128B-for-generic-arm64.patch -nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch -kni-fix-build-with-kernel-4.11.patch kni-fix-ethtool-build-with-kernel-4.11.patch -- cgit 1.2.3-korg From 1d7acbfcb3f013d88b3a35403a54285bd3ef0be1 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 8 Jun 2017 10:22:59 -0600 Subject: Changelog: mention dropped changes Change-Id: Ic0545215730e1debebebb977cac0922c23af5a07 Signed-off-by: Christian Ehrhardt --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8d88ceb4..c22deec1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,12 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium * Merge stable update to 16.11.2; For a list of changes see http://dpdk.org/ml/archives/announce/2017-May/000131.html + * Dropped changes - patches that were included in 16.11.2 stable: + - d/p/kni-fix-build-with-kernel-4.11.patch + - d/p/nicvf-0002-net-thunderx-fix-32-bit-build.patch + - d/p/nicvf-0006-mk-fix-lib-filtering-when-linking-app.patch + - d/p/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch + - d/p/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg From a3362a8a9236fd59949fb86b4079423b22dde3ce Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Tue, 4 Apr 2017 12:12:22 +0200 Subject: Pass jobs argument via MAKEFLAGS variable Change-Id: I23f329a3116563d70b318f6c4c9ad9159a48e997 Signed-off-by: Luca Boccassi --- debian/rules | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 5c14b37c..bc593fa2 100755 --- a/debian/rules +++ b/debian/rules @@ -71,8 +71,7 @@ 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" + MAKEFLAGS += -j$(PAR) endif ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) @@ -172,7 +171,7 @@ endif override_dh_auto_build-indep: ifeq (y,$(BUILD_DOCS)) - $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html + $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) doc-api-html doc-guides-html endif override_dh_auto_install-indep: @@ -185,7 +184,7 @@ endif override_dh_auto_build-arch: ifeq (y,$(BUILD_STATIC_LIB)) - $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build + $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_STATIC_DIR) RTE_KERNELDIR=$(KSRC) build endif # Unfortunately the decision about having static or shared libraries is # made for the whole build, which then produces only .a or .so files @@ -199,10 +198,10 @@ endif cp -a $(DPDK_STATIC_DIR) $(DPDK_SHARED_DIR) sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' \ $(DPDK_SHARED_DIR)/.config - $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build + $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) build ifeq (y,$(BUILD_DOCS)) # need to be around for dh_installman to be picked up - $(MAKE) -j $(PAR) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) doc-guides-man + $(MAKE) V=$(DH_VERBOSE) O=$(DPDK_SHARED_DIR) RTE_KERNELDIR=$(KSRC) doc-guides-man endif override_dh_auto_install-arch: LIBDIR=/usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -- cgit 1.2.3-korg From b121ff27dbb03c1da9afd078d0ab3818440519ca Mon Sep 17 00:00:00 2001 From: "Charles (Chas) Williams" Date: Mon, 12 Jun 2017 13:00:50 +0100 Subject: Add support for building mempool packages Change-Id: Ia7e55570cdc8aa93c82fbd2d7403331ecee95030 Signed-off-by: Luca Boccassi --- debian/rules | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'debian') diff --git a/debian/rules b/debian/rules index bc593fa2..f6e7ccd4 100755 --- a/debian/rules +++ b/debian/rules @@ -273,6 +273,11 @@ endif 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_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}; \ + fi; \ if [ "$${LIBF#librte_eal}x" != "$${LIBF}x" ]; then \ mkdir -p $${LIBD}/dpdk-pmds; \ fi; \ -- cgit 1.2.3-korg From 84fc024c38dc0277dd25776fdc99670ef00b39cb Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Tue, 11 Apr 2017 10:19:53 +0200 Subject: Add dbgsym meta-package This adds a meta-package to install all generated -dbgsym packages. Change-Id: If2d802317628d5858ce2a60add445da39ab980e8 Signed-off-by: Luca Boccassi --- debian/dh-dbgsym-metapkg | 24 ++++++++++++++++++++++++ debian/rules | 6 ++++++ 2 files changed, 30 insertions(+) create mode 100755 debian/dh-dbgsym-metapkg (limited to 'debian') diff --git a/debian/dh-dbgsym-metapkg b/debian/dh-dbgsym-metapkg new file mode 100755 index 00000000..fecbed18 --- /dev/null +++ b/debian/dh-dbgsym-metapkg @@ -0,0 +1,24 @@ +#!/bin/sh -e + +PACKAGE=${1:?Missing parameter} + +dh_installdocs -p${PACKAGE} +dh_installchangelogs -p${PACKAGE} +dh_compress -p${PACKAGE} + +install -d debian/${PACKAGE}/DEBIAN + +echo -n 'misc:Depends=' > debian/${PACKAGE}.substvars +grep -E 'lib.*-dbgsym' debian/files | tr '_' ' ' | \ + awk '{ print $1,"(=",$2 ")" }' | paste -sd ',' - | \ + sed -e 's/,/, /g' >> debian/${PACKAGE}.substvars + +dh_gencontrol -p libdpdk-dev -- \ + -Pdebian/${PACKAGE} \ + -Tdebian/${PACKAGE}.substvars \ + -UPre-Depends -URecommends -USuggests -UEnhances -UProvides \ + -UEssential -UConflicts -UReplaces -UBreaks \ + -DSection=debug -DPriority=extra \ + -DAuto-Built-Package=debug-symbols \ + -DPackage=${PACKAGE} "-DDepends=\${misc:Depends}" \ + "-DDescription=Debug symbols for libdpdk-dev (meta-package)" diff --git a/debian/rules b/debian/rules index f6e7ccd4..bd5ec0b5 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,7 @@ export DH_VERBOSE=1 export DH_OPTIONS=-v VERSION := $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: (.*:)?(.*)-(.*)/\2/p') +DPDK_ABI := $(shell echo $(VERSION) | cut -d '.' -f1-2) # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* include /usr/share/dpkg/default.mk @@ -117,6 +118,11 @@ override_dh_gencontrol: dh_gencontrol -p dpdk-modules-$(KVERS) -- \ -v`cat debian/VERSION` \ -V'built:using:kernel=$(call get_built_using,linux-headers-$(KVERS))' + ./debian/dh-dbgsym-metapkg libdpdk$(DPDK_ABI)-dbgsym + +override_dh_builddeb: + dh_builddeb + dh_builddeb -plibdpdk$(DPDK_ABI)-dbgsym build: @if [ x"$(KVERS)" = x ] ; then \ -- cgit 1.2.3-korg From 864973804fe71a7a00292fdb15777cddf87716ca Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 13:54:44 +0100 Subject: Hide dbgsym metapackage behind DEB_BUILD_OPTIONS dbgsym packages go in the -debug section of the archive, and various DDs and FTP Masters have strongly recommended to avoid uploading any such metapackage to Main for this reason. It can be still very useful for users and rebuilders, so leave it disabled behind a dbgsym_meta DEB_BUILD_OPTIONS flag. Change-Id: I112f3195755cc6bafef3167b39d3d47273572377 Signed-off-by: Luca Boccassi --- debian/rules | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/rules b/debian/rules index bd5ec0b5..33b98b5a 100755 --- a/debian/rules +++ b/debian/rules @@ -113,17 +113,6 @@ DPDK_CONFIG_BUILD_KMOD=y # dpkg-genchanges, and also would require a lot of overrides for debhelpers. get_built_using ?= $(filter-out (=),$(shell dpkg-query -f='$${source:Package} (=$${source:Version})' -W $1)) -override_dh_gencontrol: - dh_gencontrol - dh_gencontrol -p dpdk-modules-$(KVERS) -- \ - -v`cat debian/VERSION` \ - -V'built:using:kernel=$(call get_built_using,linux-headers-$(KVERS))' - ./debian/dh-dbgsym-metapkg libdpdk$(DPDK_ABI)-dbgsym - -override_dh_builddeb: - dh_builddeb - dh_builddeb -plibdpdk$(DPDK_ABI)-dbgsym - build: @if [ x"$(KVERS)" = x ] ; then \ echo 'No version in $(KSRC)/include/linux/version.h' >&2; \ @@ -137,6 +126,29 @@ endif %: dh $@ --with python2,dkms +override_dh_gencontrol: + dh_gencontrol +ifneq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS))) + dh_gencontrol -p dpdk-modules-$(KVERS) -- \ + -v`cat debian/VERSION` \ + -V'built:using:kernel=$(call get_built_using,linux-headers-$(KVERS))' +endif +ifneq (,$(findstring dbgsym_meta,$(DEB_BUILD_OPTIONS))) + ./debian/dh-dbgsym-metapkg libdpdk$(DPDK_ABI)-dbgsym +endif + +# dbgsym_meta can be passed via DEB_BUILD_OPTIONS to enable building the +# optional dbgsym meta package libdpdk-dbgsym. +# This is not built by default as it would go in main but depend on +# packages in the debian-debug archive. +# Debian Developers and FTP masters strongly discourage this. +# We provide this optional flag as a convenience for rebuilders. +ifneq (,$(findstring dbgsym_meta,$(DEB_BUILD_OPTIONS))) +override_dh_builddeb: + dh_builddeb + dh_builddeb -plibdpdk$(DPDK_ABI)-dbgsym +endif + override_dh_auto_clean: rm -rf debian/build debian/tmp debian/dpdk-modules-* \ debian/control.modules debian/VERSION -- cgit 1.2.3-korg From 6e1ca2647e3582e41dc33757c49f628f8c740388 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 13:57:06 +0100 Subject: Generate libdpdk-dev dependencies and dpdk recommends There are many, many binary packages in DPDK, and they constantly change. To avoid having to manually maintain the list of dependencies of libdpdk-dev and recommends of dpdk, generate them at build time depending on what is actually built for each architecture. Change-Id: I19f5f037c41dc4b1d61fb5b2c00e0f005431d8f0 Signed-off-by: Luca Boccassi --- debian/control | 69 ++-------------------------------------------------------- debian/rules | 7 ++++++ 2 files changed, 9 insertions(+), 67 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index db3c12eb..57f41d78 100644 --- a/debian/control +++ b/debian/control @@ -35,26 +35,7 @@ Depends: hwdata, ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} -Recommends: 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}), - 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-qede1 (= ${binary:Version}), - librte-pmd-ring2 (= ${binary:Version}), - librte-pmd-thunderx-nicvf1 (= ${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] +Recommends: ${librte:Recommends}, Suggests: dpdk-doc, dpdk-igb-uio-dkms (= ${binary:Version}), dpdk-rte-kni-dkms (= ${binary:Version}), @@ -124,53 +105,7 @@ Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: libpcap-dev, - librte-acl2 (= ${binary:Version}), - librte-cfgfile2 (= ${binary:Version}), - librte-cmdline2 (= ${binary:Version}), - librte-cryptodev2 (= ${binary:Version}), - librte-distributor1 (= ${binary:Version}), - librte-eal3 (= ${binary:Version}), - librte-ethdev5 (= ${binary:Version}), - librte-hash2 (= ${binary:Version}), - librte-ip-frag1 (= ${binary:Version}), - librte-jobstats1 (= ${binary:Version}), - librte-kni2 (= ${binary:Version}) [amd64 arm64 ppc64el], - librte-kvargs1 (= ${binary:Version}), - librte-lpm2 (= ${binary:Version}), - librte-mbuf2 (= ${binary:Version}), - librte-mempool2 (= ${binary:Version}), - librte-meter1 (= ${binary:Version}), - librte-net1 (= ${binary:Version}), - librte-pdump1 (= ${binary:Version}), - librte-pipeline3 (= ${binary:Version}), - 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}), - 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-qede1 (= ${binary:Version}), - librte-pmd-ring2 (= ${binary:Version}), - librte-pmd-thunderx-nicvf1 (= ${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], - librte-port3 (= ${binary:Version}), - librte-power1 (= ${binary:Version}), - librte-reorder1 (= ${binary:Version}), - librte-ring1 (= ${binary:Version}), - librte-sched1 (= ${binary:Version}), - librte-table2 (= ${binary:Version}), - librte-timer1 (= ${binary:Version}), - librte-vhost3 (= ${binary:Version}), + ${librte:Depends}, ${misc:Depends} Description: Data Plane Development Kit (basic development files) DPDK is a set of libraries for fast packet processing. Applications run diff --git a/debian/rules b/debian/rules index 33b98b5a..82eb417b 100755 --- a/debian/rules +++ b/debian/rules @@ -128,6 +128,13 @@ endif override_dh_gencontrol: dh_gencontrol + # debian/files will not exist until dh_gencontrol has ran at least once, + # so we need to run gencontrol for libdpdk-dev and libdpdk-dbgsym after. + # The list of libraries and PMDs is everchanging, so generate the dependency + # list for libdpdk-dev to avoid having to maintain it manually. + # Same for the recommends list for dpdk, were we want the PMDs and the mempools. + dh_gencontrol -p libdpdk-dev -- -V"librte:Depends=`grep -E 'librte-*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`" + dh_gencontrol -p dpdk -- -V"librte:Recommends=`grep -E 'librte-(pmd|mempool).*' ./debian/files | grep -v dbgsym | tr '_' ' ' | awk '{ print $$1,"(=",$$2 ")" }' | paste -sd ',' - | sed -e 's/,/, /g'`" ifneq (,$(findstring kernel_modules,$(DEB_BUILD_OPTIONS))) dh_gencontrol -p dpdk-modules-$(KVERS) -- \ -v`cat debian/VERSION` \ -- cgit 1.2.3-korg From a4c7776ffe18b92f0ca9380f5477076ad073157b Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 14:01:15 +0100 Subject: Mention libpdk-dbgsym in changelog Change-Id: I51ef8a929dc54067fe3389098e5009e086e43770 Signed-off-by: Luca Boccassi --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c22deec1..f0fc6529 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium + [ Christian Ehrhardt ] * Merge stable update to 16.11.2; For a list of changes see http://dpdk.org/ml/archives/announce/2017-May/000131.html * Dropped changes - patches that were included in 16.11.2 stable: @@ -9,6 +10,12 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium - d/p/nicvf-0008-net-thunderx-fix-stats-access-out-of-bounds.patch - d/p/nicvf-0010-net-thunderx-fix-deadlock-in-Rx-path.patch + [ Luca Boccassi ] + * Optionally generate libdpdk-dbgsym metapackage that depends on every + librte/PMD binary package's dbgsym. Keep it disabled by default, and + let users choose to enable it by passing dbgsym_meta via DEB_BUILD_OPTIONS. + Thanks Jan Blunck for the patch! + -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 dpdk (16.11.1-1~git1) UNRELEASED; urgency=medium -- cgit 1.2.3-korg From 8e085c53da268eb35edf1a521aade6348a9562aa Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 14:03:18 +0100 Subject: Mention dependency generation in changelog Change-Id: Ic73a9bba1ccaf1843b3c246f291dd1ef185f38c4 Signed-off-by: Luca Boccassi --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f0fc6529..d104c977 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,9 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium librte/PMD binary package's dbgsym. Keep it disabled by default, and let users choose to enable it by passing dbgsym_meta via DEB_BUILD_OPTIONS. Thanks Jan Blunck for the patch! + * Generate dependency list of libdpdk-dev to all librte and PMDs packages + dynamically at build time. + * Generate list of recommends for dpdk dynamically at build time. -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg From 7e67194fcc89ecaeea59fbc0b33807e24854a673 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 15:52:53 +0100 Subject: Set strict dependency on kernel version The in-kernel API/ABI is (intentionally) not stable, so the binary kernel modules package must strictly depend on the same kernel that it was built against. Change-Id: I85cd6d465678e7693fb33659e3b4525730992cb0 Signed-off-by: Luca Boccassi --- debian/control.modules.in | 2 +- debian/prep-modules | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/control.modules.in b/debian/control.modules.in index dd1d9f83..88141546 100644 --- a/debian/control.modules.in +++ b/debian/control.modules.in @@ -1,8 +1,8 @@ Package: dpdk-modules-#KVERS# Section: kernel Architecture: amd64 arm64 i386 +Depends: linux-image-#KVERS# #KDREV# Provides: dpdk-modules -Recommends: linux-image-#KVERS# Conflicts: dpdk-igb-uio-dkms, dpdk-rte-kni-dkms Built-Using: ${built:using:kernel} Description: Data Plane Development Kit (rte kni, igb uio modules) diff --git a/debian/prep-modules b/debian/prep-modules index 3e1f9f88..0caf81ed 100755 --- a/debian/prep-modules +++ b/debian/prep-modules @@ -31,10 +31,10 @@ # in the Debian kernel package names (in other words, the ABI version, not # the package version). # -# * Make the package recommend linux-image-$(KVERS) as appropriate for the -# kernel version that we're building against. Use recommend rather than -# depends since the user may have built their own kernel outside of the -# Debian package infrastructure. +# * Make the package depend on linux-image-$(KVERS) (= version) as appropriate +# for the kernel version that we're building against. Use depend as the +# kernel ABI is not stable and it's not guaranteed that a module built +# against a version of the headers will work under a different kernel. # # * Save the version number of the binary package in debian/VERSION for later # use by dh_gencontrol. This will be the version number of the source @@ -79,7 +79,12 @@ elif [ ! -f "$changelog" ] ; then dpdk_kvers=`perl debian/kernel-version "$1"` fi if [ -z "$KDREV" ] ; then - dpdk_kdrev="${dpdk_kvers}-1" + set +e + dpdk_kdrev=`dpkg-query -W -f='${Version}\n' linux-headers-${dpdk_kvers} 2> /dev/null` + if [ $? -ne 0 ] ; then + dpdk_kdrev="${dpdk_kvers}-1" + fi + set -e else dpdk_kvers="${dpdk_kvers}${INT_SUBARCH}" dpdk_kdrev="${KDREV}" @@ -101,7 +106,7 @@ dpdk_kdrev="$(echo "$dpdk_kdrev" | tr _ -)" # Generate the control file from the template. -sed "s/#KVERS#/${dpdk_kvers}/g" debian/control.modules.in > debian/control.modules +sed -e "s/#KVERS#/${dpdk_kvers}/g" -e "s/#KDREV#/(= ${dpdk_kdrev})/g" debian/control.modules.in > debian/control.modules # Now, calcuate the binary package version. Extract the epoch from the kernel # package revision and add it to the beginning of the binary package version -- cgit 1.2.3-korg From 23cb5563dab4773a05597fb6531aa0eb40cbc091 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Mon, 12 Jun 2017 15:54:11 +0100 Subject: Mention dpdk-modules-* dependency change in changelog Change-Id: Ifa63cb12d931a081819195a36020df1ed8e4f262 Signed-off-by: Luca Boccassi --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d104c977..5c5da247 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,8 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium * Generate dependency list of libdpdk-dev to all librte and PMDs packages dynamically at build time. * Generate list of recommends for dpdk dynamically at build time. + * dpdk-modules-$KVERS: depend on same kernel version used to build rather than + just recommend - in-kernel API/ABI is not stable. -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg From c162fd41a0d90e50e9860d08aae7ffa433c40adf Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 13 Jun 2017 11:18:21 +0100 Subject: Mention mempool changes in changelog Change-Id: I071246b42bab99996c3edbdfff451651441617da Signed-off-by: Luca Boccassi --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5c5da247..9dda9641 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,10 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium * Generate list of recommends for dpdk dynamically at build time. * dpdk-modules-$KVERS: depend on same kernel version used to build rather than just recommend - in-kernel API/ABI is not stable. + * Support for building packages for the new mempool framework has been added. + In 17.05 and newer a mempool framework was added, that has to be loaded + like a PMD. So any "plugin" will be linked in RTE_EAL_PMD_PATH just like + the PMDs. No mempool plugins are built for now, so it is currently a no-op. -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg From 6d0f627c533ccaeac81f11b8ea5639fd873caf61 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 13 Jun 2017 11:20:41 +0100 Subject: Remove old compatibility transitional packages Change-Id: I64ea0708cacbb657895ba2548bd3b02fac9a0c0c Signed-off-by: Luca Boccassi --- debian/control | 62 --------------------------------------- debian/libethdev4.links.in | 1 - debian/librte-cryptodev1.links.in | 1 - debian/librte-eal2.links.in | 1 - debian/rules | 15 ---------- 5 files changed, 80 deletions(-) delete mode 100644 debian/libethdev4.links.in delete mode 100644 debian/librte-cryptodev1.links.in delete mode 100644 debian/librte-eal2.links.in (limited to 'debian') diff --git a/debian/control b/debian/control index 57f41d78..7863adc6 100644 --- a/debian/control +++ b/debian/control @@ -730,65 +730,3 @@ Description: Data Plane Development Kit (librte_pmd_thunderx_nicvf runtime libra . This package contains the runtime libraries for librte_pmd_thunderx_nicvf. -# All following packages are for ABI compatibility to older releases. -# Newer DPDK versions are ABI compatible to older ones for at least one release -# and more if maintainable. -# -# The cross dependencies in DPDK libraries would otherwise force us to conflict -# with older ABI versions to avoid double ld.so resolution -# (https://lists.ubuntu.com/archives/ubuntu-devel/2017-February/039659.html). -# -# But the conflicts in debian/control would make the old versions and thereby -# the dependent applications non-installable until there is a rebuild (as other -# updates would do). -# But for our case that would deny most benefits of version named libraries -# (e.g. the ability to have both). -# -# Instead of adding conflicts fields - whenever possible - provide a backward -# compatible wrapper symlinking to the new (ABI compatible) implementation. -# -# Still as soon as (all) dependendent packages are rebuilt these compat -# wrappers can be autoremoved (apt will take care of that) - -Package: libethdev4 -Architecture: amd64 arm64 i386 ppc64el -Multi-Arch: same -Homepage: http://dpdk.org/doc/api/rte__ethdev_8h.html -Pre-Depends: ${misc:Pre-Depends} -Depends: librte-ethdev5, ${misc:Depends}, ${shlibs:Depends} -Conflicts: libdpdk0 -Description: Data Plane Development Kit (libethdev runtime library) - DPDK is a set of libraries for fast packet processing. Applications run - in user-space and communicate directly with dedicated network interfaces. - . - This package contains an ABI compatibility link for an older version of the - runtime libraries for libethdev. - -Package: librte-cryptodev1 -Architecture: amd64 arm64 i386 ppc64el -Multi-Arch: same -Homepage: http://dpdk.org/doc/api/rte__cryptodev_8h.html -Pre-Depends: ${misc:Pre-Depends} -Depends: librte-cryptodev2, ${misc:Depends}, ${shlibs:Depends} -Conflicts: libdpdk0 -Description: Data Plane Development Kit (librte-cryptodev runtime library) - DPDK is a set of libraries for fast packet processing. Applications run - in user-space and communicate directly with dedicated network interfaces. - . - This package contains an ABI compatibility link for an older version of the - runtime libraries for librte_cryptodev. - -Package: librte-eal2 -Architecture: amd64 arm64 i386 ppc64el -Multi-Arch: same -Homepage: http://dpdk.org/doc/api/rte__eal_8h.html -Pre-Depends: ${misc:Pre-Depends} -Depends: librte-eal3, ${misc:Depends}, ${shlibs:Depends} -Conflicts: libdpdk0 -Description: Data Plane Development Kit (librte-eal runtime library) - DPDK is a set of libraries for fast packet processing. Applications run - in user-space and communicate directly with dedicated network interfaces. - . - This package contains an ABI compatibility link for an older version of the - runtime libraries for librte_eal. - diff --git a/debian/libethdev4.links.in b/debian/libethdev4.links.in deleted file mode 100644 index 6f482f9a..00000000 --- a/debian/libethdev4.links.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/librte_ethdev.so.5 usr/lib/@DEB_HOST_MULTIARCH@/libethdev.so.4 diff --git a/debian/librte-cryptodev1.links.in b/debian/librte-cryptodev1.links.in deleted file mode 100644 index ddde2520..00000000 --- a/debian/librte-cryptodev1.links.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/librte_cryptodev.so.2 usr/lib/@DEB_HOST_MULTIARCH@/librte_cryptodev.so.1 diff --git a/debian/librte-eal2.links.in b/debian/librte-eal2.links.in deleted file mode 100644 index c6cd36a3..00000000 --- a/debian/librte-eal2.links.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/librte_eal.so.3 usr/lib/@DEB_HOST_MULTIARCH@/librte_eal.so.2 diff --git a/debian/rules b/debian/rules index 82eb417b..59569b9c 100755 --- a/debian/rules +++ b/debian/rules @@ -162,12 +162,6 @@ override_dh_auto_clean: sed -i '/Package: dpdk-modules-/,/`tail -n1 debian/control.modules.in`/d' debian/control test -L config/defconfig_$(DPDK_CONFIG) && rm -f config/defconfig_$(DPDK_CONFIG) || true -override_dh_clean: - dh_clean - rm -f debian/libethdev4.links - rm -f debian/librte-cryptodev1.links - rm -f debian/librte-eal2.links - override_dh_auto_configure: # Add support for a custom defconfig file in the debian directory. ifneq (,$(filter dpdk_config=%,$(DEB_BUILD_OPTIONS))) @@ -329,15 +323,6 @@ ifneq (,$(KVERS)) DESTDIR=debian/dpdk-modules-$(KVERS) install-kmod endif -debian/libethdev4.links: debian/libethdev4.links.in - sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@ -debian/librte-cryptodev1.links: debian/librte-cryptodev1.links.in - sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@ -debian/librte-eal2.links: debian/librte-eal2.links.in - sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' < $< > $@ -override_dh_link: debian/libethdev4.links debian/librte-cryptodev1.links debian/librte-eal2.links - dh_link - override_dh_dkms: dh_dkms -V $(VERSION) -- cgit 1.2.3-korg From 893fbab8ee5539b1fd73d0521c6c4d224d023f00 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 13 Jun 2017 11:21:58 +0100 Subject: Mention dropping transitional packages in changelog Change-Id: I864d1887d7bf1c5c9ff0787f57fb1830d6d68dff Signed-off-by: Luca Boccassi --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9dda9641..70d85b36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium In 17.05 and newer a mempool framework was added, that has to be loaded like a PMD. So any "plugin" will be linked in RTE_EAL_PMD_PATH just like the PMDs. No mempool plugins are built for now, so it is currently a no-op. + * Drop libethdev4, librte-cryptodev1 and librte-eal2 transitional packages, + no longer needed. -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg From b89cea16f018bc65908b085b157ce8f0b4a8fd4c Mon Sep 17 00:00:00 2001 From: "Charles (Chas) Williams" Date: Wed, 14 Jun 2017 13:13:01 +0100 Subject: Fix upstream documentation links in d/control Change-Id: Id08865ce8f7a1991970e4be664497b3cac6e196d Signed-off-by: Luca Boccassi --- debian/control | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 7863adc6..8963f098 100644 --- a/debian/control +++ b/debian/control @@ -131,7 +131,7 @@ Description: Data Plane Development Kit (libethdev runtime library) Package: librte-acl2 Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same -Homepage: http://dpdk.org/doc/api/rte__ethdev_8h.html +Homepage: http://dpdk.org/doc/api/rte__acl_8h.html Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: libdpdk0 @@ -157,6 +157,7 @@ Description: Data Plane Development Kit (librte-cfgfile runtime library) Package: librte-cmdline2 Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same +Homepage: http://dpdk.org/doc/api/cmdline_8h.html Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: libdpdk0 @@ -369,6 +370,7 @@ Description: Data Plane Development Kit (librte-pmd-af-packet runtime library) Package: librte-pmd-bnxt1 Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same +Homepage: http://dpdk.org/doc/guides/nics/bnxt.html Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: libdpdk0 @@ -696,7 +698,7 @@ Description: Data Plane Development Kit (librte_timer runtime library) Package: librte-vhost3 Architecture: amd64 arm64 i386 ppc64el Multi-Arch: same -Homepage: http://dpdk.org/doc/api/rte__virtio__net_8h.html +Homepage: http://dpdk.org/doc/api/rte__vhost_8h.html Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: libdpdk0 -- cgit 1.2.3-korg From 8462db66da316418b951eb6ea06cc41f02278e31 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 14 Jun 2017 13:13:54 +0100 Subject: mention links changes in changelog Change-Id: I44f2dbabd36e1c9ffc1e940afcbc22034380d0a7 Signed-off-by: Luca Boccassi --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 70d85b36..3a5d1361 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,8 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium the PMDs. No mempool plugins are built for now, so it is currently a no-op. * Drop libethdev4, librte-cryptodev1 and librte-eal2 transitional packages, no longer needed. + * Fix some upstream documentation links in the packages metadata. + Thanks Chas Williams! -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg From 820abfcb99344f78974562a723d15d871fb9200e Mon Sep 17 00:00:00 2001 From: "Charles (Chas) Williams" Date: Wed, 14 Jun 2017 15:42:30 +0100 Subject: Pass -g via EXTRA_CFLAGS Change-Id: Ieddf137bcb8ed68417b61ac7f66969d20231b4ed Signed-off-by: Luca Boccassi --- debian/rules | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/rules b/debian/rules index 59569b9c..9d2d3b91 100755 --- a/debian/rules +++ b/debian/rules @@ -38,6 +38,7 @@ ifeq (yes, $(dpkg_version_lt)) endif export RTE_DEVEL_BUILD=n +export EXTRA_CFLAGS+=-g # People rebuilding this package can overwrite DPDK_CONFIG, RTE_MACHINE and # RTE_TARGET via DEB_BUILD_OPTIONS if they like -- cgit 1.2.3-korg From e17e83e3a136be1a66eb1b580a4f049912b81657 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 14 Jun 2017 15:44:10 +0100 Subject: Mention fixing dbg symbols in changelog Change-Id: If2976c5bc4fa87d45e86db06613fd3cdbad6ab85 Signed-off-by: Luca Boccassi --- debian/changelog | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3a5d1361..31b82898 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,7 @@ dpdk (16.11.2-1~git1) UNRELEASED; urgency=medium no longer needed. * Fix some upstream documentation links in the packages metadata. Thanks Chas Williams! + * Fix building debugging symbols for -dbgsym packages. Thanks Chas Williams! -- Christian Ehrhardt Thu, 08 Jun 2017 10:05:44 -0600 -- cgit 1.2.3-korg