aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorTing Liu <ting.liu@nxp.com>2021-10-14 16:33:00 +0800
committerTing Liu <ting.liu@nxp.com>2021-10-15 22:11:36 +0800
commit08ede515232af9922dc4dc03828dbb9fd99dd310 (patch)
tree2391315f74395d654d77945c63fbc44a1c9882f2 /recipes-extended
parentdc6ada8f9515e92bfdc7e5e2c18ccef87b6e80f8 (diff)
downloadmeta-freescale-08ede515232af9922dc4dc03828dbb9fd99dd310.tar.gz
meta-freescale-08ede515232af9922dc4dc03828dbb9fd99dd310.tar.bz2
meta-freescale-08ede515232af9922dc4dc03828dbb9fd99dd310.zip
dpdk: add 20.11 recipe
Signed-off-by: Ting Liu <ting.liu@nxp.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/dpdk/dpdk-20.11.inc15
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch74
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch30
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch35
-rw-r--r--recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch38
-rw-r--r--recipes-extended/dpdk/dpdk-module_20.11.bb41
-rw-r--r--recipes-extended/dpdk/dpdk_20.11.bb93
7 files changed, 326 insertions, 0 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..00aed60d
--- /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 & LGPLv2.1 & GPLv2"
+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://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;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..f19b2b32
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch
@@ -0,0 +1,30 @@
+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
+
+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_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"