diff options
Diffstat (limited to 'recipes-extended/dpdk')
15 files changed, 530 insertions, 80 deletions
diff --git a/recipes-extended/dpdk/dpdk-20.11.inc b/recipes-extended/dpdk/dpdk-20.11.inc new file mode 100644 index 00000000..90b4c405 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11.inc @@ -0,0 +1,15 @@ +DESCRIPTION = "Data Plane Development Kit" +HOMEPAGE = "http://dpdk.org" +LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only" +LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444" + +SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1" +SRCREV = "f74b8bd5ab1c6ff76e956fc202a56aea2d200270" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(qoriq-arm64)" + +CVE_PRODUCT = "data_plane_development_kit" diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch b/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch new file mode 100644 index 00000000..18b75fb6 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch @@ -0,0 +1,74 @@ +From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Wed, 14 Apr 2021 17:25:53 +0800 +Subject: [PATCH] Makefile: add makefile + +Current meson build for kernel module build does not fit in Yocto. +So added Makefile to build rte_kni.ko + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + kernel/linux/kni/Kbuild | 6 ------ + kernel/linux/kni/Makefile | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 35 insertions(+), 6 deletions(-) + delete mode 100644 kernel/linux/kni/Kbuild + create mode 100644 kernel/linux/kni/Makefile + +diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild +deleted file mode 100644 +index e5452d6c00..0000000000 +--- a/kernel/linux/kni/Kbuild ++++ /dev/null +@@ -1,6 +0,0 @@ +-# SPDX-License-Identifier: BSD-3-Clause +-# Copyright(c) 2018 Luca Boccassi <bluca@debian.org> +- +-ccflags-y := $(MODULE_CFLAGS) +-obj-m := rte_kni.o +-rte_kni-y := $(patsubst $(src)/%.c,%.o,$(wildcard $(src)/*.c)) +diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile +new file mode 100644 +index 0000000000..19897ee06e +--- /dev/null ++++ b/kernel/linux/kni/Makefile +@@ -0,0 +1,35 @@ ++# ++# Makefile for building rte_kni.ko ++# ++MODULE_CFLAGS += -include $(S)/config/rte_config.h ++MODULE_CFLAGS += -I$(S)/lib/librte_eal/include ++MODULE_CFLAGS += -I$(S)/lib/librte_kni ++MODULE_CFLAGS += -I$(S)/kernel/linux/kni ++MODULE_CFLAGS += -I$(S) ++MODULE_CFLAGS += -I$(STAGING_INCDIR) ++ ++rte_kni-objs = kni_misc.o kni_net.o ++ ++ccflags-y := $(MODULE_CFLAGS) ++cflags-y := $(MODULE_CFLAGS) ++obj-m := rte_kni.o ++ ++ ++KERNEL_MAKE_OPTS := -C $(STAGING_KERNEL_DIR) M=$(CURDIR) ++ifneq ($(ARCH),) ++KERNEL_MAKE_OPTS += ARCH=$(ARCH) ++endif ++ifneq ($(CROSS_COMPILE),) ++KERNEL_MAKE_OPTS += CROSS_COMPILE=$(CROSS_COMPILE) ++endif ++ ++build: ++ $(MAKE) $(KERNEL_MAKE_OPTS) modules ++ ++install: modules_install ++ ++modules_install: ++ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install ++ ++clean: ++ $(MAKE) $(KERNEL_MAKE_OPTS) clean +-- +2.17.1 + diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch new file mode 100644 index 00000000..f88b6484 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch @@ -0,0 +1,31 @@ +From 6fe85f3a12d15e25345ef0547035a929351a179c Mon Sep 17 00:00:00 2001 +From: Ting Liu <ting.liu@nxp.com> +Date: Fri, 17 Sep 2021 12:53:53 +0530 +Subject: [PATCH] drivers/net/enetfec/enet_uio.c: fix multiple definition + +.../drivers/net/enetfec/enet_uio.c:22: multiple definition of `count'; +.../examples/flow_classify/flow_classify.c:170: first defined here +collect2: error: ld returned 1 exit status + +Upstream-Status: Pending +Signed-off-by: Ting Liu <ting.liu@nxp.com> +--- + drivers/net/enetfec/enet_uio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c +index b64dc522e8..9e09f9beb6 100644 +--- a/drivers/net/enetfec/enet_uio.c ++++ b/drivers/net/enetfec/enet_uio.c +@@ -19,7 +19,7 @@ + #include "enet_uio.h" + + static struct uio_job enetfec_uio_job; +-int count; ++static int count; + + /** @brief Reads first line from a file. + * Composes file name as: root/subdir/filename +-- +2.25.1 + diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch b/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch new file mode 100644 index 00000000..4df28c40 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch @@ -0,0 +1,35 @@ +From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001 +From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> +Date: Thu, 24 Jun 2021 11:30:09 +0800 +Subject: [PATCH] ifpga/meson: Fix finding librt using find_library() + +Finding with "librt" keyword would give the output +with full path of librt such as /usr/lib/librt.so +instead of -lrt. + +Assume find_library() will prepend "lib", thus remove +"lib" from "librt" keyword. The output will shows as +-lrt. + +Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html] + +Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> +--- + drivers/raw/ifpga/base/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build +index da2d6e33c..949f7f127 100644 +--- a/drivers/raw/ifpga/base/meson.build ++++ b/drivers/raw/ifpga/base/meson.build +@@ -25,7 +25,7 @@ sources = [ + + rtdep = dependency('librt', required: false) + if not rtdep.found() +- rtdep = cc.find_library('librt', required: false) ++ rtdep = cc.find_library('rt', required: false) + endif + if not rtdep.found() + build = false +-- +2.32.0 diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch b/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch new file mode 100644 index 00000000..bef1f45b --- /dev/null +++ b/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch @@ -0,0 +1,38 @@ +From cf8f15824dc2dd306d9c7e111641bef045d623c2 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Wed, 14 Apr 2021 16:03:10 +0800 +Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + config/meson.build | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/config/meson.build b/config/meson.build +index 2f150de3b8..41bb3e9ec4 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -94,12 +94,12 @@ dpdk_conf.set('RTE_MACHINE', machine) + machine_args = [] + + # ppc64 does not support -march= at all, use -mcpu and -mtune for that +-if host_machine.cpu_family().startswith('ppc') +- machine_args += '-mcpu=' + machine +- machine_args += '-mtune=' + machine +-else +- machine_args += '-march=' + machine +-endif ++#if host_machine.cpu_family().startswith('ppc') ++# machine_args += '-mcpu=' + machine ++# machine_args += '-mtune=' + machine ++#else ++# machine_args += '-march=' + machine ++#endif + + toolchain = cc.get_id() + dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) +-- +2.17.1 + diff --git a/recipes-extended/dpdk/dpdk-module_20.11.bb b/recipes-extended/dpdk/dpdk-module_20.11.bb new file mode 100644 index 00000000..180b140b --- /dev/null +++ b/recipes-extended/dpdk/dpdk-module_20.11.bb @@ -0,0 +1,41 @@ +include dpdk-20.11.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk-${PV}:" + +SRC_URI += " \ + file://0001-Makefile-add-makefile.patch \ +" + +inherit module + +#kernel module needs 'rte_build_config.h', which is generated at buid time +DEPENDS += "dpdk" + +export S +export STAGING_KERNEL_DIR +export STAGING_INCDIR +export INSTALL_MOD_DIR="dpdk" + +do_configure[noexec] = "1" + +do_compile() { + cd ${S}/kernel/linux/kni + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ + KERNEL_VERSION=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \ + ${MAKE_TARGETS} +} + +do_install() { + cd ${S}/kernel/linux/kni + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \ + INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + O=${STAGING_KERNEL_BUILDDIR} \ + ${MODULES_INSTALL_TARGET} +} diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc index 71977bae..f2ab1370 100644 --- a/recipes-extended/dpdk/dpdk.inc +++ b/recipes-extended/dpdk/dpdk.inc @@ -1,39 +1,30 @@ DESCRIPTION = "Data Plane Development Kit" HOMEPAGE = "http://dpdk.org" -LICENSE = "BSD-3-Clause & LGPLv2 & GPLv2" -LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492" - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1 \ - file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ - file://0001-add-Wno-cast-function-type.patch \ - file://0001-Add-RTE_KERNELDIR_OUT.patch \ - file://0004-update-WERROR_FLAGS.patch \ -" -SRCREV = "a36da6a94243015b228c15b8b9aa1e650fd4b96d" +RDEPENDS:${PN} += "python3-core" DEPENDS = "virtual/kernel openssl" -DEPENDS_append_x86-64 = " numactl" +DEPENDS:append:x86-64 = " numactl" do_configure[depends] += "virtual/kernel:do_shared_workdir" inherit module COMPATIBLE_HOST = '(aarch64|arm|i.86|x86_64).*-linux' -COMPATIBLE_HOST_libc-musl = 'null' -COMPATIBLE_HOST_armv4 = 'null' -COMPATIBLE_HOST_armv5 = 'null' -COMPATIBLE_HOST_armv6 = 'null' +COMPATIBLE_HOST:libc-musl = 'null' +COMPATIBLE_HOST:armv4 = 'null' +COMPATIBLE_HOST:armv5 = 'null' +COMPATIBLE_HOST:armv6 = 'null' -COMPATIBLE_MACHINE = "(imx|qoriq)" +COMPATIBLE_MACHINE = "(imx-nxp-bsp|qoriq)" -DPDK_RTE_TARGET_x86-64 = "x86_64-native-linuxapp-gcc" -DPDK_RTE_TARGET_x86 = "i686-native-linuxapp-gcc" -DPDK_RTE_TARGET_armv7a = "${ARCH}-armv7a-linuxapp-gcc" -DPDK_RTE_TARGET_armv7ve = "${ARCH}-armv7a-linuxapp-gcc" +DPDK_RTE_TARGET:x86-64 = "x86_64-native-linuxapp-gcc" +DPDK_RTE_TARGET:x86 = "i686-native-linuxapp-gcc" +DPDK_RTE_TARGET:armv7a = "${ARCH}-armv7a-linuxapp-gcc" +DPDK_RTE_TARGET:armv7ve = "${ARCH}-armv7a-linuxapp-gcc" DPDK_RTE_TARGET ?= "${ARCH}-dpaa-linuxapp-gcc" export RTE_TARGET = "${DPDK_RTE_TARGET}" export RTE_OUTPUT = "${S}/${RTE_TARGET}" -export MODULE_DIR = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" +export MODULE_DIR = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net" S = "${WORKDIR}/git" @@ -102,13 +93,13 @@ do_install () { PACKAGES += "${PN}-examples" -FILES_${PN}-dbg += " \ +FILES:${PN}-dbg += " \ ${datadir}/dpdk/.debug \ ${datadir}/dpdk/examples/*/.debug \ " -FILES_${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \ +FILES:${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \ " -FILES_${PN}-dev += " \ +FILES:${PN}-dev += " \ ${datadir}/dpdk/${RTE_TARGET}/.config \ ${includedir} \ ${includedir}/exec-env \ @@ -118,11 +109,14 @@ FILES_${PN}-dev += " \ ${datadir}/dpdk/mk \ " -FILES_${PN} += " ${datadir}/ \ +FILES:${PN} += " ${datadir}/ \ ${prefix}/sbin/ \ ${prefix}/bin/ \ ${libdir}/ \ " -FILES_${PN}-examples += " \ +FILES:${PN}-examples += " \ ${datadir}/examples/* \ " + +TOOLCHAIN = "gcc" + diff --git a/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch b/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch index 64a6876f..383b9085 100644 --- a/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch +++ b/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch @@ -1,15 +1,16 @@ -From 4ea737c1d5a185d56ee1d6da18172b389ea90760 Mon Sep 17 00:00:00 2001 +From 9c2b840a1c8ac0fbb638b5cd481909a3f832eed4 Mon Sep 17 00:00:00 2001 From: Chunrong Guo <chunrong.guo@nxp.com> Date: Wed, 3 Jul 2019 08:50:45 +0200 Subject: [PATCH] Add RTE_KERNELDIR_OUT +Upstream-Status: Pending Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com> --- kernel/linux/kni/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile -index 282be7b..dfbebdc 100644 +index 595bac261..28a31f36a 100644 --- a/kernel/linux/kni/Makefile +++ b/kernel/linux/kni/Makefile @@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror @@ -22,5 +23,5 @@ index 282be7b..dfbebdc 100644 MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))" endif -- -2.7.4 +2.17.1 diff --git a/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch b/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch index c074eac6..b4b8a548 100644 --- a/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch +++ b/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch @@ -1,16 +1,16 @@ -From beb13be8023beb68499c72e71a79b8f91784e484 Mon Sep 17 00:00:00 2001 +From 354c2d1570ddf83a99c4ac711c884644c6dd1cef Mon Sep 17 00:00:00 2001 From: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com> Date: Wed, 27 Mar 2019 09:35:43 +0100 Subject: [PATCH] add -Wno-cast-function-type Upstream-Status: Inappropriate [configuration] - +Signed-off-by: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com> --- examples/cmdif/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile -index d28badf..4e9851c 100644 +index 235c3adbf..230f17b0a 100644 --- a/examples/cmdif/lib/Makefile +++ b/examples/cmdif/lib/Makefile @@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c @@ -23,5 +23,5 @@ index d28badf..4e9851c 100644 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server -- -2.7.4 +2.17.1 diff --git a/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch b/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch new file mode 100644 index 00000000..b73b3a96 --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch @@ -0,0 +1,49 @@ +From 229fc129be85a4d2d2c4efddae7bb97c3d87d416 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Mar 2023 22:02:01 -0700 +Subject: [PATCH] examples: fix Arm build with GCC 12 + +GCC-12 warns when a pointer of type union points to an array of same +defined size, as union internally gets paded with pad bytes. + + ../examples/common/neon/port_group.h:42:21: error: array subscript + 'union <anonymous>[0]' is partly outside array bounds of + 'uint16_t[5]' {aka 'short unsigned int[5]'} + [-Werror=array-bounds] + 42 | pnum->u64 = gptbl[v].pnum; + | ^~ + ../examples/common/neon/port_group.h:21:23: note: object 'pn' of + size [0, 10] + 21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1 + | ~~~~~~~~~^~~~~~~~~~~~~~~ + ../examples/common/neon/port_group.h:43:21: error: array subscript + 'union <anonymous>[0]' is partly outside array bounds of + 'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=array-bounds] + 43 | pnum->u16[FWDSTEP] = 1; + | ^~ + +Fixes: 732115ce38c6 ("examples/l3fwd: move packet group function in common") + +Upstream-Status: Backport [https://github.com/DPDK/dpdk/commit/b269bd630e96b276a69d698e13ad9ebfbbb67512] +Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + examples/l3fwd/l3fwd_neon.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h +index 86ac5971d7..dc73e9fef7 100644 +--- a/examples/l3fwd/l3fwd_neon.h ++++ b/examples/l3fwd/l3fwd_neon.h +@@ -77,7 +77,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1, + union { + uint16_t u16[FWDSTEP + 1]; + uint64_t u64; +- } *pnum = (void *)pn; ++ } __rte_packed *pnum = (void *)pn; + + int32_t v; + uint16x8_t mask = {1, 2, 4, 8, 0, 0, 0, 0}; +-- +2.39.2 + diff --git a/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch b/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch deleted file mode 100644 index 9249b2b5..00000000 --- a/recipes-extended/dpdk/dpdk/0004-update-WERROR_FLAGS.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3828a36fa537a187127a1c9b82ce2f5959b88367 Mon Sep 17 00:00:00 2001 -From: Chunrong Guo <chunrong.guo@nxp.com> -Date: Thu, 4 Jul 2019 08:03:56 +0200 -Subject: [PATCH] update WERROR_FLAGS - -Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com> ---- - kernel/linux/kni/Makefile | 2 +- - mk/toolchain/gcc/rte.vars.mk | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile -index dfbebdc..8b5c13e 100644 ---- a/kernel/linux/kni/Makefile -+++ b/kernel/linux/kni/Makefile -@@ -14,7 +14,7 @@ MODULE = rte_kni - MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50 - MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb - MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h --MODULE_CFLAGS += -Wall -Werror -+MODULE_CFLAGS += -Wall -Werror -Wno-missing-attributes - - -include /etc/lsb-release - -diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk -index aa94344..81efa1c 100644 ---- a/mk/toolchain/gcc/rte.vars.mk -+++ b/mk/toolchain/gcc/rte.vars.mk -@@ -49,6 +49,7 @@ WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual - WERROR_FLAGS += -Wformat-nonliteral -Wformat-security - WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated - WERROR_FLAGS += -Wno-error=pedantic -+WERROR_FLAGS += -Wno-address-of-packed-member - - ifeq ($(RTE_DEVEL_BUILD),y) - WERROR_FLAGS += -Werror --- -2.7.4 - diff --git a/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch b/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch new file mode 100644 index 00000000..b1bdf09b --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch @@ -0,0 +1,105 @@ +Explicitly use python3 + +Upstream-Status: Pending +Signed-off-by: Ting Liu <ting.liu@nxp.com> + +diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py +index 0194be046..86fe3a89d 100755 +--- a/app/test-bbdev/test-bbdev.py ++++ b/app/test-bbdev/test-bbdev.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2017 Intel Corporation +diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py +index 3a8fac426..231fe6032 100755 +--- a/app/test-cmdline/cmdline_test.py ++++ b/app/test-cmdline/cmdline_test.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2010-2014 Intel Corporation + +diff --git a/app/test/autotest.py b/app/test/autotest.py +index b42f48879..30541d102 100644 +--- a/app/test/autotest.py ++++ b/app/test/autotest.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2010-2014 Intel Corporation + +diff --git a/buildtools/map_to_def.py b/buildtools/map_to_def.py +index 6775b54a9..ff67f0a35 100644 +--- a/buildtools/map_to_def.py ++++ b/buildtools/map_to_def.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2019 Intel Corporation + +diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py +index 404866d2f..1f689d9a8 100755 +--- a/config/arm/armv8_machine.py ++++ b/config/arm/armv8_machine.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2017 Cavium, Inc + +diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py +index 616412a1c..3244b0984 100755 +--- a/devtools/update_version_map_abi.py ++++ b/devtools/update_version_map_abi.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2019 Intel Corporation + +diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py +index 6f129b1db..e86bf6b92 100755 +--- a/usertools/cpu_layout.py ++++ b/usertools/cpu_layout.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2010-2014 Intel Corporation + # Copyright(c) 2017 Cavium, Inc. All rights reserved. +diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py +index b1d149876..3f8175338 100755 +--- a/usertools/dpdk-devbind.py ++++ b/usertools/dpdk-devbind.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2010-2014 Intel Corporation + # +diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py +index 069a3bf12..1d5c99c2a 100755 +--- a/usertools/dpdk-pmdinfo.py ++++ b/usertools/dpdk-pmdinfo.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com> + +diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py +index 290345dcc..279067450 100755 +--- a/usertools/dpdk-telemetry-client.py ++++ b/usertools/dpdk-telemetry-client.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + # SPDX-License-Identifier: BSD-3-Clause + # Copyright(c) 2018 Intel Corporation + diff --git a/recipes-extended/dpdk/dpdk_18.11.bb b/recipes-extended/dpdk/dpdk_18.11.bb deleted file mode 100644 index 1a6b927e..00000000 --- a/recipes-extended/dpdk/dpdk_18.11.bb +++ /dev/null @@ -1,8 +0,0 @@ -include dpdk.inc - - -do_install_append () { - # Remove the unneeded dir - rm -rf ${D}/${datadir}/${RTE_TARGET}/app -} - diff --git a/recipes-extended/dpdk/dpdk_19.11-20.12.bb b/recipes-extended/dpdk/dpdk_19.11-20.12.bb new file mode 100644 index 00000000..b14d4fbf --- /dev/null +++ b/recipes-extended/dpdk/dpdk_19.11-20.12.bb @@ -0,0 +1,21 @@ +LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only" +LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ + file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444" + +SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1 \ + file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ + file://0001-add-Wno-cast-function-type.patch \ + file://0001-Add-RTE_KERNELDIR_OUT.patch \ + file://0005-use-python3-instead-of-python.patch \ + file://0001-examples-fix-Arm-build-with-GCC-12.patch \ +" +SRCREV = "7071c27f6f5aefb57de1cffab3484707b1e82e2b" + +include dpdk.inc + +do_install:append () { + # Remove the unneeded dir + rm -rf ${D}/${datadir}/${RTE_TARGET}/app +} + diff --git a/recipes-extended/dpdk/dpdk_20.11.bb b/recipes-extended/dpdk/dpdk_20.11.bb new file mode 100644 index 00000000..2d27adc5 --- /dev/null +++ b/recipes-extended/dpdk/dpdk_20.11.bb @@ -0,0 +1,93 @@ +include dpdk-20.11.inc + +SRC_URI += " \ + file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \ + file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \ + file://0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch \ +" + +MESON_BUILDTYPE = "release" + +# kernel module is provide by dpdk-module recipe, so disable here +EXTRA_OEMESON = " -Denable_kmods=false \ + -Dexamples=all \ + -Doptimization=3 \ +" + +PACKAGECONFIG ??= "openssl" +PACKAGECONFIG[afxdp] = ",,libbpf" +PACKAGECONFIG[libvirt] = ",,libvirt" +PACKAGECONFIG[openssl] = ",,openssl" + +RDEPENDS:${PN} += "bash pciutils python3-core" +RDEPENDS:${PN}-examples += "bash" +DEPENDS = "numactl" + +inherit meson + +INSTALL_PATH = "${prefix}/share/dpdk" + +do_configure:prepend() { + sed -i "/implementor_/d" ${WORKDIR}/meson.cross + sed -i "/\[properties]/aimplementor_id = 'dpaa'" ${WORKDIR}/meson.cross + sed -i "/\[properties]/aimplementor_pn = 'default'" ${WORKDIR}/meson.cross + sed -i "s/cpu =.*/cpu = 'armv8-a'/" ${WORKDIR}/meson.cross +} + +do_install:append(){ + # remove source files + rm -rf ${D}/${INSTALL_PATH}/examples/* + + # Install examples + install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ + for dirname in ${B}/examples/dpdk-* + do + if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then + install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ + fi + done + cp -rf ${S}/nxp/* ${D}/${INSTALL_PATH}/ +} + +PACKAGES =+ "${PN}-tools ${PN}-examples ${PN}-misc" + +FILES:${PN}-tools = " \ + ${bindir}/dpdk-testpmd \ + ${INSTALL_PATH}/examples/dpdk-l2fwd \ + ${INSTALL_PATH}/examples/dpdk-l2fwd-crypto \ + ${INSTALL_PATH}/examples/dpdk-l3fwd \ + ${INSTALL_PATH}/examples/dpdk-ipsec-secgw \ +" + +FILES:${PN}-examples = " \ + ${bindir}/dpdk-proc-info \ + ${bindir}/dpdk-test \ + ${bindir}/dpdk-test-crypto-perf \ + ${bindir}/dpdk-*.py \ + ${INSTALL_PATH}/examples/dpdk-cmdif \ + ${INSTALL_PATH}/examples/dpdk-cmdline \ + ${INSTALL_PATH}/examples/dpdk-ethtool \ + ${INSTALL_PATH}/examples/dpdk-ip_fragmentation \ + ${INSTALL_PATH}/examples/dpdk-ip_reassembly \ + ${INSTALL_PATH}/examples/dpdk-kni \ + ${INSTALL_PATH}/examples/dpdk-l2fwd-keepalive \ + ${INSTALL_PATH}/examples/dpdk-l2fwd-qdma \ + ${INSTALL_PATH}/examples/dpdk-l3fwd-acl \ + ${INSTALL_PATH}/examples/dpdk-link_status_interrupt \ + ${INSTALL_PATH}/examples/dpdk-mp_client \ + ${INSTALL_PATH}/examples/dpdk-mp_server \ + ${INSTALL_PATH}/examples/dpdk-qdma_demo \ + ${INSTALL_PATH}/examples/dpdk-simple_mp \ + ${INSTALL_PATH}/examples/dpdk-symmetric_mp \ + ${INSTALL_PATH}/examples/dpdk-symmetric_mp_qdma \ + ${INSTALL_PATH}/examples/dpdk-timer \ +" + +FILES:${PN}-misc = " \ + ${bindir}/dpdk-pdump \ + ${bindir}/dpdk-test-* \ + ${bindir}/dpdk-*.py \ + ${INSTALL_PATH}/examples/* \ +" + +INSANE_SKIP:${PN} = "dev-so" |