summaryrefslogtreecommitdiffstats
path: root/recipes-extended/dpdk
diff options
context:
space:
mode:
authorZelan Zou <zelan.zou@nxp.com>2026-01-07 19:16:15 +0800
committerZelan Zou <zelan.zou@nxp.com>2026-02-11 14:35:21 +0800
commit8171bf1143a1c0fdd3012b6981ec61763fe72efb (patch)
treed1e9204cccf417d589a1cb19c1b8d3306730d23c /recipes-extended/dpdk
parent8367930d92e54614c33ec2686add6db03f363876 (diff)
downloadmeta-freescale-8171bf1143a1c0fdd3012b6981ec61763fe72efb.tar.gz
dpdk: Upgrade to 22.11
Align with lf-6.12.49-2.2.0 Signed-off-by: Zelan Zou <zelan.zou@nxp.com>
Diffstat (limited to 'recipes-extended/dpdk')
-rw-r--r--recipes-extended/dpdk/dpdk-20.11.inc13
-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.patch31
-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-module_20.11.bb41
-rw-r--r--recipes-extended/dpdk/dpdk.inc120
-rw-r--r--recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch27
-rw-r--r--recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch27
-rw-r--r--recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch49
-rw-r--r--recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch105
-rw-r--r--recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch51
-rw-r--r--recipes-extended/dpdk/dpdk_19.11-20.12.bb21
-rw-r--r--recipes-extended/dpdk/dpdk_20.11.bb93
-rw-r--r--recipes-extended/dpdk/dpdk_22.11.bb48
-rw-r--r--recipes-extended/dpdk/files/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch (renamed from recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch)14
15 files changed, 55 insertions, 694 deletions
diff --git a/recipes-extended/dpdk/dpdk-20.11.inc b/recipes-extended/dpdk/dpdk-20.11.inc
deleted file mode 100644
index 66bcda2ff..000000000
--- a/recipes-extended/dpdk/dpdk-20.11.inc
+++ /dev/null
@@ -1,13 +0,0 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
6 file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444"
7
8SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1"
9SRCREV = "f74b8bd5ab1c6ff76e956fc202a56aea2d200270"
10
11COMPATIBLE_MACHINE = "(qoriq-arm64)"
12
13CVE_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
deleted file mode 100644
index 18b75fb65..000000000
--- a/recipes-extended/dpdk/dpdk-20.11/0001-Makefile-add-makefile.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 14 Apr 2021 17:25:53 +0800
4Subject: [PATCH] Makefile: add makefile
5
6Current meson build for kernel module build does not fit in Yocto.
7So added Makefile to build rte_kni.ko
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
12---
13 kernel/linux/kni/Kbuild | 6 ------
14 kernel/linux/kni/Makefile | 35 +++++++++++++++++++++++++++++++++++
15 2 files changed, 35 insertions(+), 6 deletions(-)
16 delete mode 100644 kernel/linux/kni/Kbuild
17 create mode 100644 kernel/linux/kni/Makefile
18
19diff --git a/kernel/linux/kni/Kbuild b/kernel/linux/kni/Kbuild
20deleted file mode 100644
21index e5452d6c00..0000000000
22--- a/kernel/linux/kni/Kbuild
23+++ /dev/null
24@@ -1,6 +0,0 @@
25-# SPDX-License-Identifier: BSD-3-Clause
26-# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
27-
28-ccflags-y := $(MODULE_CFLAGS)
29-obj-m := rte_kni.o
30-rte_kni-y := $(patsubst $(src)/%.c,%.o,$(wildcard $(src)/*.c))
31diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
32new file mode 100644
33index 0000000000..19897ee06e
34--- /dev/null
35+++ b/kernel/linux/kni/Makefile
36@@ -0,0 +1,35 @@
37+#
38+# Makefile for building rte_kni.ko
39+#
40+MODULE_CFLAGS += -include $(S)/config/rte_config.h
41+MODULE_CFLAGS += -I$(S)/lib/librte_eal/include
42+MODULE_CFLAGS += -I$(S)/lib/librte_kni
43+MODULE_CFLAGS += -I$(S)/kernel/linux/kni
44+MODULE_CFLAGS += -I$(S)
45+MODULE_CFLAGS += -I$(STAGING_INCDIR)
46+
47+rte_kni-objs = kni_misc.o kni_net.o
48+
49+ccflags-y := $(MODULE_CFLAGS)
50+cflags-y := $(MODULE_CFLAGS)
51+obj-m := rte_kni.o
52+
53+
54+KERNEL_MAKE_OPTS := -C $(STAGING_KERNEL_DIR) M=$(CURDIR)
55+ifneq ($(ARCH),)
56+KERNEL_MAKE_OPTS += ARCH=$(ARCH)
57+endif
58+ifneq ($(CROSS_COMPILE),)
59+KERNEL_MAKE_OPTS += CROSS_COMPILE=$(CROSS_COMPILE)
60+endif
61+
62+build:
63+ $(MAKE) $(KERNEL_MAKE_OPTS) modules
64+
65+install: modules_install
66+
67+modules_install:
68+ $(MAKE) $(KERNEL_MAKE_OPTS) modules_install
69+
70+clean:
71+ $(MAKE) $(KERNEL_MAKE_OPTS) clean
72--
732.17.1
74
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
deleted file mode 100644
index f88b64843..000000000
--- a/recipes-extended/dpdk/dpdk-20.11/0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 6fe85f3a12d15e25345ef0547035a929351a179c Mon Sep 17 00:00:00 2001
2From: Ting Liu <ting.liu@nxp.com>
3Date: Fri, 17 Sep 2021 12:53:53 +0530
4Subject: [PATCH] drivers/net/enetfec/enet_uio.c: fix multiple definition
5
6.../drivers/net/enetfec/enet_uio.c:22: multiple definition of `count';
7.../examples/flow_classify/flow_classify.c:170: first defined here
8collect2: error: ld returned 1 exit status
9
10Upstream-Status: Pending
11Signed-off-by: Ting Liu <ting.liu@nxp.com>
12---
13 drivers/net/enetfec/enet_uio.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
17index b64dc522e8..9e09f9beb6 100644
18--- a/drivers/net/enetfec/enet_uio.c
19+++ b/drivers/net/enetfec/enet_uio.c
20@@ -19,7 +19,7 @@
21 #include "enet_uio.h"
22
23 static struct uio_job enetfec_uio_job;
24-int count;
25+static int count;
26
27 /** @brief Reads first line from a file.
28 * Composes file name as: root/subdir/filename
29--
302.25.1
31
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
deleted file mode 100644
index 4df28c40b..000000000
--- a/recipes-extended/dpdk/dpdk-20.11/0001-ifpga-meson-Fix-finding-librt-using-find_library.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 308409d72671b7978b20d40748ad985a235b6c86 Mon Sep 17 00:00:00 2001
2From: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
3Date: Thu, 24 Jun 2021 11:30:09 +0800
4Subject: [PATCH] ifpga/meson: Fix finding librt using find_library()
5
6Finding with "librt" keyword would give the output
7with full path of librt such as /usr/lib/librt.so
8instead of -lrt.
9
10Assume find_library() will prepend "lib", thus remove
11"lib" from "librt" keyword. The output will shows as
12-lrt.
13
14Upstream-Status: Submitted [https://mails.dpdk.org/archives/stable/2021-June/031840.html]
15
16Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>
17---
18 drivers/raw/ifpga/base/meson.build | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
22index da2d6e33c..949f7f127 100644
23--- a/drivers/raw/ifpga/base/meson.build
24+++ b/drivers/raw/ifpga/base/meson.build
25@@ -25,7 +25,7 @@ sources = [
26
27 rtdep = dependency('librt', required: false)
28 if not rtdep.found()
29- rtdep = cc.find_library('librt', required: false)
30+ rtdep = cc.find_library('rt', required: false)
31 endif
32 if not rtdep.found()
33 build = false
34--
352.32.0
diff --git a/recipes-extended/dpdk/dpdk-module_20.11.bb b/recipes-extended/dpdk/dpdk-module_20.11.bb
deleted file mode 100644
index 585e198ea..000000000
--- a/recipes-extended/dpdk/dpdk-module_20.11.bb
+++ /dev/null
@@ -1,41 +0,0 @@
1include dpdk-20.11.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk-${PV}:"
4
5SRC_URI += " \
6 file://0001-Makefile-add-makefile.patch \
7"
8
9inherit module
10
11#kernel module needs 'rte_build_config.h', which is generated at buid time
12DEPENDS += "dpdk"
13
14export S
15export STAGING_KERNEL_DIR
16export STAGING_INCDIR
17export INSTALL_MOD_DIR = "dpdk"
18
19do_configure[noexec] = "1"
20
21do_compile() {
22 cd ${S}/kernel/linux/kni
23 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
24 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
25 KERNEL_VERSION=${KERNEL_VERSION} \
26 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
27 AR="${KERNEL_AR}" \
28 O=${STAGING_KERNEL_BUILDDIR} \
29 KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
30 ${MAKE_TARGETS}
31}
32
33do_install() {
34 cd ${S}/kernel/linux/kni
35 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
36 oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
37 INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \
38 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
39 O=${STAGING_KERNEL_BUILDDIR} \
40 ${MODULES_INSTALL_TARGET}
41}
diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc
deleted file mode 100644
index eabd18650..000000000
--- a/recipes-extended/dpdk/dpdk.inc
+++ /dev/null
@@ -1,120 +0,0 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3
4RDEPENDS:${PN} += "python3-core"
5DEPENDS = "virtual/kernel openssl"
6DEPENDS:append:x86-64 = " numactl"
7do_configure[depends] += "virtual/kernel:do_shared_workdir"
8
9inherit module
10
11COMPATIBLE_HOST = '(aarch64|arm|i.86|x86_64).*-linux'
12COMPATIBLE_HOST:libc-musl = 'null'
13COMPATIBLE_HOST:armv4 = 'null'
14COMPATIBLE_HOST:armv5 = 'null'
15COMPATIBLE_HOST:armv6 = 'null'
16
17COMPATIBLE_MACHINE = "(imx-nxp-bsp|qoriq)"
18
19DPDK_RTE_TARGET:x86-64 = "x86_64-native-linuxapp-gcc"
20DPDK_RTE_TARGET:x86 = "i686-native-linuxapp-gcc"
21DPDK_RTE_TARGET:armv7a = "${ARCH}-armv7a-linuxapp-gcc"
22DPDK_RTE_TARGET:armv7ve = "${ARCH}-armv7a-linuxapp-gcc"
23DPDK_RTE_TARGET ?= "${ARCH}-dpaa-linuxapp-gcc"
24
25export RTE_TARGET = "${DPDK_RTE_TARGET}"
26export RTE_OUTPUT = "${S}/${RTE_TARGET}"
27export MODULE_DIR = "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net"
28
29EXTRA_OEMAKE += 'ETHTOOL_LIB_PATH="${S}/examples/ethtool/lib/${RTE_TARGET}" RTE_SDK="${S}" \
30 OPENSSL_PATH="${STAGING_DIR_HOST}" RTE_KERNELDIR="${STAGING_KERNEL_DIR}" \
31 RTE_KERNELDIR_OUT="${STAGING_KERNEL_BUILDDIR}" EXAMPLES_BUILD_DIR="${RTE_TARGET}" \
32'
33do_configure () {
34 #############################################################
35 ### default value for prefix is "usr", unsetting it, so it
36 ### will not be concatenated in ${RTE_TARGET}/Makefile
37 ### which will cause compilation failure
38 #############################################################
39 unset prefix
40 oe_runmake O=$RTE_TARGET T=$RTE_TARGET config
41}
42
43do_compile () {
44 unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS
45
46 cd ${S}/${RTE_TARGET}
47 oe_runmake CONFIG_RTE_EAL_IGB_UIO=n CONFIG_RTE_KNI_KMOD=y \
48 CONFIG_RTE_LIBRTE_PMD_OPENSSL=y \
49 EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \
50 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
51 CROSS="${TARGET_PREFIX}" \
52 prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1
53
54 cd ${S}/examples/
55 for APP in l2fwd l3fwd cmdif l2fwd-qdma l2fwd-crypto ipsec-secgw vhost kni ip_fragmentation ip_reassembly; do
56 temp=`basename ${APP}`
57 if [ ${temp} = "ipsec-secgw" ] || [ ${temp} = "l2fwd-crypto" ]; then
58 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
59 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
60 CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}"
61 else
62 oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \
63 EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \
64 CROSS="${TARGET_PREFIX}" -C ${APP} CONFIG_RTE_LIBRTE_PMD_OPENSSL=y O="${S}/examples/${temp}/"
65 fi
66 done
67
68}
69
70do_install () {
71 oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D}
72 oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR}
73 oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D}
74
75 # Install examples
76 install -d 0644 ${D}/${datadir}/dpdk/cmdif/include
77 install -d 0644 ${D}/${datadir}/dpdk/cmdif/lib
78 install -d 0644 ${D}/${datadir}/dpdk/examples
79 cp examples/cmdif/lib/client/fsl_cmdif_client.h examples/cmdif/lib/server/fsl_cmdif_server.h \
80 examples/cmdif/lib/shbp/fsl_shbp.h ${D}/${datadir}/dpdk/cmdif/include
81 cp examples/cmdif/lib/${RTE_TARGET}/librte_cmdif.a ${D}/${datadir}/dpdk/cmdif/lib
82 install -d 0644 ${D}/${datadir}/dpdk/examples/ipsec_secgw
83 cp -r ${S}/examples/ipsec-secgw/*.cfg ${D}/${datadir}/dpdk/examples/ipsec_secgw
84 cp -rf ${S}/nxp/* ${D}/${datadir}/dpdk
85 cp -r ${S}/examples/cmdif/cmdif_demo/${DPDK_RTE_TARGET}/cmdif_demo ${D}/${datadir}/dpdk/examples
86 cp -r ${S}/examples/vhost/vhost-switch ${D}/${datadir}/dpdk/examples
87 for APP in l2fwd l3fwd l2fwd-qdma l2fwd-crypto ipsec-secgw kni ip_fragmentation ip_reassembly; do
88 cp -r ${S}/examples/${APP}/${APP} ${D}/${datadir}/dpdk/examples
89 done
90}
91
92PACKAGES += "${PN}-examples"
93
94FILES:${PN}-dbg += " \
95 ${datadir}/dpdk/.debug \
96 ${datadir}/dpdk/examples/*/.debug \
97 "
98FILES:${PN}-staticdev += "${datadir}/dpdk/cmdif/lib/*.a \
99"
100FILES:${PN}-dev += " \
101 ${datadir}/dpdk/${RTE_TARGET}/.config \
102 ${includedir} \
103 ${includedir}/exec-env \
104 ${datadir}/dpdk/buildtools/ \
105 ${datadir}/dpdk/${RTE_TARGET}/include \
106 ${datadir}/dpdk/${RTE_TARGET}/lib \
107 ${datadir}/dpdk/mk \
108 "
109
110FILES:${PN} += " ${datadir}/ \
111 ${prefix}/sbin/ \
112 ${prefix}/bin/ \
113 ${libdir}/ \
114 "
115FILES:${PN}-examples += " \
116 ${datadir}/examples/* \
117 "
118
119TOOLCHAIN = "gcc"
120
diff --git a/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch b/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch
deleted file mode 100644
index 383b9085c..000000000
--- a/recipes-extended/dpdk/dpdk/0001-Add-RTE_KERNELDIR_OUT.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 9c2b840a1c8ac0fbb638b5cd481909a3f832eed4 Mon Sep 17 00:00:00 2001
2From: Chunrong Guo <chunrong.guo@nxp.com>
3Date: Wed, 3 Jul 2019 08:50:45 +0200
4Subject: [PATCH] Add RTE_KERNELDIR_OUT
5
6Upstream-Status: Pending
7Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
8---
9 kernel/linux/kni/Makefile | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/kernel/linux/kni/Makefile b/kernel/linux/kni/Makefile
13index 595bac261..28a31f36a 100644
14--- a/kernel/linux/kni/Makefile
15+++ b/kernel/linux/kni/Makefile
16@@ -20,7 +20,7 @@ MODULE_CFLAGS += -Wall -Werror
17
18 ifeq ($(DISTRIB_ID),Ubuntu)
19 MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(DISTRIB_RELEASE))
20-UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/generated/utsrelease.h \
21+UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR_OUT)/include/generated/utsrelease.h \
22 | cut -d '"' -f2 | cut -d- -f1,2 | tr .- ,`,1)
23 MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
24 endif
25--
262.17.1
27
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
deleted file mode 100644
index b4b8a5488..000000000
--- a/recipes-extended/dpdk/dpdk/0001-add-Wno-cast-function-type.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 354c2d1570ddf83a99c4ac711c884644c6dd1cef Mon Sep 17 00:00:00 2001
2From: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com>
3Date: Wed, 27 Mar 2019 09:35:43 +0100
4Subject: [PATCH] add -Wno-cast-function-type
5
6Upstream-Status: Inappropriate [configuration]
7Signed-off-by: "C.r. Guo" <nxa13725@lsv07005.swis.us-cdc01.nxp.com>
8---
9 examples/cmdif/lib/Makefile | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/examples/cmdif/lib/Makefile b/examples/cmdif/lib/Makefile
13index 235c3adbf..230f17b0a 100644
14--- a/examples/cmdif/lib/Makefile
15+++ b/examples/cmdif/lib/Makefile
16@@ -28,7 +28,7 @@ SRCS-y += server/cmdif_srv_gpp.c
17 SRCS-y += shbp/shbp.c
18
19 CFLAGS += -O3
20-CFLAGS += $(WERROR_FLAGS)
21+CFLAGS += $(WERROR_FLAGS) -Wno-cast-function-type -Wno-missing-attributes
22 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib
23 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/client
24 CFLAGS += -I$(RTE_SDK)/examples/cmdif/lib/server
25--
262.17.1
27
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
deleted file mode 100644
index b73b3a967..000000000
--- a/recipes-extended/dpdk/dpdk/0001-examples-fix-Arm-build-with-GCC-12.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From 229fc129be85a4d2d2c4efddae7bb97c3d87d416 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Mar 2023 22:02:01 -0700
4Subject: [PATCH] examples: fix Arm build with GCC 12
5
6GCC-12 warns when a pointer of type union points to an array of same
7defined size, as union internally gets paded with pad bytes.
8
9 ../examples/common/neon/port_group.h:42:21: error: array subscript
10 'union <anonymous>[0]' is partly outside array bounds of
11 'uint16_t[5]' {aka 'short unsigned int[5]'}
12 [-Werror=array-bounds]
13 42 | pnum->u64 = gptbl[v].pnum;
14 | ^~
15 ../examples/common/neon/port_group.h:21:23: note: object 'pn' of
16 size [0, 10]
17 21 | port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1
18 | ~~~~~~~~~^~~~~~~~~~~~~~~
19 ../examples/common/neon/port_group.h:43:21: error: array subscript
20 'union <anonymous>[0]' is partly outside array bounds of
21 'uint16_t[5]' {aka 'short unsigned int[5]'} [-Werror=array-bounds]
22 43 | pnum->u16[FWDSTEP] = 1;
23 | ^~
24
25Fixes: 732115ce38c6 ("examples/l3fwd: move packet group function in common")
26
27Upstream-Status: Backport [https://github.com/DPDK/dpdk/commit/b269bd630e96b276a69d698e13ad9ebfbbb67512]
28Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30---
31 examples/l3fwd/l3fwd_neon.h | 2 +-
32 1 file changed, 1 insertion(+), 1 deletion(-)
33
34diff --git a/examples/l3fwd/l3fwd_neon.h b/examples/l3fwd/l3fwd_neon.h
35index 86ac5971d7..dc73e9fef7 100644
36--- a/examples/l3fwd/l3fwd_neon.h
37+++ b/examples/l3fwd/l3fwd_neon.h
38@@ -77,7 +77,7 @@ port_groupx4(uint16_t pn[FWDSTEP + 1], uint16_t *lp, uint16x8_t dp1,
39 union {
40 uint16_t u16[FWDSTEP + 1];
41 uint64_t u64;
42- } *pnum = (void *)pn;
43+ } __rte_packed *pnum = (void *)pn;
44
45 int32_t v;
46 uint16x8_t mask = {1, 2, 4, 8, 0, 0, 0, 0};
47--
482.39.2
49
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
deleted file mode 100644
index b1bdf09b4..000000000
--- a/recipes-extended/dpdk/dpdk/0005-use-python3-instead-of-python.patch
+++ /dev/null
@@ -1,105 +0,0 @@
1Explicitly use python3
2
3Upstream-Status: Pending
4Signed-off-by: Ting Liu <ting.liu@nxp.com>
5
6diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
7index 0194be046..86fe3a89d 100755
8--- a/app/test-bbdev/test-bbdev.py
9+++ b/app/test-bbdev/test-bbdev.py
10@@ -1,4 +1,4 @@
11-#!/usr/bin/env python
12+#!/usr/bin/env python3
13
14 # SPDX-License-Identifier: BSD-3-Clause
15 # Copyright(c) 2017 Intel Corporation
16diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py
17index 3a8fac426..231fe6032 100755
18--- a/app/test-cmdline/cmdline_test.py
19+++ b/app/test-cmdline/cmdline_test.py
20@@ -1,4 +1,4 @@
21-#!/usr/bin/env python
22+#!/usr/bin/env python3
23 # SPDX-License-Identifier: BSD-3-Clause
24 # Copyright(c) 2010-2014 Intel Corporation
25
26diff --git a/app/test/autotest.py b/app/test/autotest.py
27index b42f48879..30541d102 100644
28--- a/app/test/autotest.py
29+++ b/app/test/autotest.py
30@@ -1,4 +1,4 @@
31-#!/usr/bin/env python
32+#!/usr/bin/env python3
33 # SPDX-License-Identifier: BSD-3-Clause
34 # Copyright(c) 2010-2014 Intel Corporation
35
36diff --git a/buildtools/map_to_def.py b/buildtools/map_to_def.py
37index 6775b54a9..ff67f0a35 100644
38--- a/buildtools/map_to_def.py
39+++ b/buildtools/map_to_def.py
40@@ -1,4 +1,4 @@
41-#!/usr/bin/env python
42+#!/usr/bin/env python3
43 # SPDX-License-Identifier: BSD-3-Clause
44 # Copyright(c) 2019 Intel Corporation
45
46diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py
47index 404866d2f..1f689d9a8 100755
48--- a/config/arm/armv8_machine.py
49+++ b/config/arm/armv8_machine.py
50@@ -1,4 +1,4 @@
51-#!/usr/bin/python
52+#!/usr/bin/env python3
53 # SPDX-License-Identifier: BSD-3-Clause
54 # Copyright(c) 2017 Cavium, Inc
55
56diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py
57index 616412a1c..3244b0984 100755
58--- a/devtools/update_version_map_abi.py
59+++ b/devtools/update_version_map_abi.py
60@@ -1,4 +1,4 @@
61-#!/usr/bin/env python
62+#!/usr/bin/env python3
63 # SPDX-License-Identifier: BSD-3-Clause
64 # Copyright(c) 2019 Intel Corporation
65
66diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
67index 6f129b1db..e86bf6b92 100755
68--- a/usertools/cpu_layout.py
69+++ b/usertools/cpu_layout.py
70@@ -1,4 +1,4 @@
71-#!/usr/bin/env python
72+#!/usr/bin/env python3
73 # SPDX-License-Identifier: BSD-3-Clause
74 # Copyright(c) 2010-2014 Intel Corporation
75 # Copyright(c) 2017 Cavium, Inc. All rights reserved.
76diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
77index b1d149876..3f8175338 100755
78--- a/usertools/dpdk-devbind.py
79+++ b/usertools/dpdk-devbind.py
80@@ -1,4 +1,4 @@
81-#! /usr/bin/env python
82+#!/usr/bin/env python3
83 # SPDX-License-Identifier: BSD-3-Clause
84 # Copyright(c) 2010-2014 Intel Corporation
85 #
86diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
87index 069a3bf12..1d5c99c2a 100755
88--- a/usertools/dpdk-pmdinfo.py
89+++ b/usertools/dpdk-pmdinfo.py
90@@ -1,4 +1,4 @@
91-#!/usr/bin/env python
92+#!/usr/bin/env python3
93 # SPDX-License-Identifier: BSD-3-Clause
94 # Copyright(c) 2016 Neil Horman <nhorman@tuxdriver.com>
95
96diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
97index 290345dcc..279067450 100755
98--- a/usertools/dpdk-telemetry-client.py
99+++ b/usertools/dpdk-telemetry-client.py
100@@ -1,4 +1,4 @@
101-#! /usr/bin/env python
102+#!/usr/bin/env python3
103 # SPDX-License-Identifier: BSD-3-Clause
104 # Copyright(c) 2018 Intel Corporation
105
diff --git a/recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
deleted file mode 100644
index 4657f070d..000000000
--- a/recipes-extended/dpdk/dpdk/add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001
2From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
3Date: Fri, 18 Dec 2015 18:30:47 +0800
4Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build
5 artifact
6
7Introduce RTE_KERNELDIR_OUT to be the path to which kernel build
8artifacts are located. This is for matching the workflow change
9since Yocto Project v1.8 onwards whereby tmp/work-shared contains
10separate directories for kernel source and kernel artifacts.
11
12Upstream-Status: Inappropriate [configuration]
13
14Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
15---
16 mk/rte.module.mk | 6 +++---
17 1 file changed, 3 insertions(+), 3 deletions(-)
18
19diff --git a/mk/rte.module.mk b/mk/rte.module.mk
20index 53ed4fe..b7a014b 100644
21--- a/mk/rte.module.mk
22+++ b/mk/rte.module.mk
23@@ -77,7 +77,7 @@ build: _postbuild
24 # build module
25 $(MODULE).ko: $(SRCS_LINKS)
26 @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
27- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
28+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
29 CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0)
30
31 # install module in $(RTE_OUTPUT)/kmod
32@@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
33
34 # install module
35 modules_install:
36- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \
37+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \
38 modules_install
39
40 .PHONY: clean
41@@ -98,7 +98,7 @@ clean: _postclean
42 .PHONY: doclean
43 doclean:
44 @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi
45- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean
46+ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean
47 @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\
48 if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;)
49 @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi
50--
511.9.1
diff --git a/recipes-extended/dpdk/dpdk_19.11-20.12.bb b/recipes-extended/dpdk/dpdk_19.11-20.12.bb
deleted file mode 100644
index b14d4fbf8..000000000
--- a/recipes-extended/dpdk/dpdk_19.11-20.12.bb
+++ /dev/null
@@ -1,21 +0,0 @@
1LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only"
2LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
3 file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
4 file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444"
5
6SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1 \
7 file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
8 file://0001-add-Wno-cast-function-type.patch \
9 file://0001-Add-RTE_KERNELDIR_OUT.patch \
10 file://0005-use-python3-instead-of-python.patch \
11 file://0001-examples-fix-Arm-build-with-GCC-12.patch \
12"
13SRCREV = "7071c27f6f5aefb57de1cffab3484707b1e82e2b"
14
15include dpdk.inc
16
17do_install:append () {
18 # Remove the unneeded dir
19 rm -rf ${D}/${datadir}/${RTE_TARGET}/app
20}
21
diff --git a/recipes-extended/dpdk/dpdk_20.11.bb b/recipes-extended/dpdk/dpdk_20.11.bb
deleted file mode 100644
index 2d27adc54..000000000
--- a/recipes-extended/dpdk/dpdk_20.11.bb
+++ /dev/null
@@ -1,93 +0,0 @@
1include dpdk-20.11.inc
2
3SRC_URI += " \
4 file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch \
5 file://0001-ifpga-meson-Fix-finding-librt-using-find_library.patch \
6 file://0001-drivers-net-enetfec-enet_uio.c-fix-multiple-definiti.patch \
7"
8
9MESON_BUILDTYPE = "release"
10
11# kernel module is provide by dpdk-module recipe, so disable here
12EXTRA_OEMESON = " -Denable_kmods=false \
13 -Dexamples=all \
14 -Doptimization=3 \
15"
16
17PACKAGECONFIG ??= "openssl"
18PACKAGECONFIG[afxdp] = ",,libbpf"
19PACKAGECONFIG[libvirt] = ",,libvirt"
20PACKAGECONFIG[openssl] = ",,openssl"
21
22RDEPENDS:${PN} += "bash pciutils python3-core"
23RDEPENDS:${PN}-examples += "bash"
24DEPENDS = "numactl"
25
26inherit meson
27
28INSTALL_PATH = "${prefix}/share/dpdk"
29
30do_configure:prepend() {
31 sed -i "/implementor_/d" ${WORKDIR}/meson.cross
32 sed -i "/\[properties]/aimplementor_id = 'dpaa'" ${WORKDIR}/meson.cross
33 sed -i "/\[properties]/aimplementor_pn = 'default'" ${WORKDIR}/meson.cross
34 sed -i "s/cpu =.*/cpu = 'armv8-a'/" ${WORKDIR}/meson.cross
35}
36
37do_install:append(){
38 # remove source files
39 rm -rf ${D}/${INSTALL_PATH}/examples/*
40
41 # Install examples
42 install -m 0755 -d ${D}/${INSTALL_PATH}/examples/
43 for dirname in ${B}/examples/dpdk-*
44 do
45 if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then
46 install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/
47 fi
48 done
49 cp -rf ${S}/nxp/* ${D}/${INSTALL_PATH}/
50}
51
52PACKAGES =+ "${PN}-tools ${PN}-examples ${PN}-misc"
53
54FILES:${PN}-tools = " \
55 ${bindir}/dpdk-testpmd \
56 ${INSTALL_PATH}/examples/dpdk-l2fwd \
57 ${INSTALL_PATH}/examples/dpdk-l2fwd-crypto \
58 ${INSTALL_PATH}/examples/dpdk-l3fwd \
59 ${INSTALL_PATH}/examples/dpdk-ipsec-secgw \
60"
61
62FILES:${PN}-examples = " \
63 ${bindir}/dpdk-proc-info \
64 ${bindir}/dpdk-test \
65 ${bindir}/dpdk-test-crypto-perf \
66 ${bindir}/dpdk-*.py \
67 ${INSTALL_PATH}/examples/dpdk-cmdif \
68 ${INSTALL_PATH}/examples/dpdk-cmdline \
69 ${INSTALL_PATH}/examples/dpdk-ethtool \
70 ${INSTALL_PATH}/examples/dpdk-ip_fragmentation \
71 ${INSTALL_PATH}/examples/dpdk-ip_reassembly \
72 ${INSTALL_PATH}/examples/dpdk-kni \
73 ${INSTALL_PATH}/examples/dpdk-l2fwd-keepalive \
74 ${INSTALL_PATH}/examples/dpdk-l2fwd-qdma \
75 ${INSTALL_PATH}/examples/dpdk-l3fwd-acl \
76 ${INSTALL_PATH}/examples/dpdk-link_status_interrupt \
77 ${INSTALL_PATH}/examples/dpdk-mp_client \
78 ${INSTALL_PATH}/examples/dpdk-mp_server \
79 ${INSTALL_PATH}/examples/dpdk-qdma_demo \
80 ${INSTALL_PATH}/examples/dpdk-simple_mp \
81 ${INSTALL_PATH}/examples/dpdk-symmetric_mp \
82 ${INSTALL_PATH}/examples/dpdk-symmetric_mp_qdma \
83 ${INSTALL_PATH}/examples/dpdk-timer \
84"
85
86FILES:${PN}-misc = " \
87 ${bindir}/dpdk-pdump \
88 ${bindir}/dpdk-test-* \
89 ${bindir}/dpdk-*.py \
90 ${INSTALL_PATH}/examples/* \
91"
92
93INSANE_SKIP:${PN} = "dev-so"
diff --git a/recipes-extended/dpdk/dpdk_22.11.bb b/recipes-extended/dpdk/dpdk_22.11.bb
new file mode 100644
index 000000000..727106e49
--- /dev/null
+++ b/recipes-extended/dpdk/dpdk_22.11.bb
@@ -0,0 +1,48 @@
1DESCRIPTION = "Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
6 file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444"
7
8DEPENDS = "python3-pyelftools-native"
9
10DPDK_SRC ?= "git://github.com/nxp-qoriq/dpdk;protocol=https"
11SRC_URI = "${DPDK_SRC};nobranch=1 \
12 file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch"
13SRCREV = "e09ece7ebcda131ee3d5a45999ad3396ee2092ae"
14
15inherit meson pkgconfig
16
17PACKAGECONFIG ??= "openssl examples"
18
19PACKAGECONFIG[afxdp] = ",,libbpf"
20PACKAGECONFIG[examples] = "-Denable_examples_bin_install=true -Dexamples=${DPDK_EXAMPLES},-Denable_examples_bin_install=false"
21PACKAGECONFIG[libvirt] = ",,libvirt"
22PACKAGECONFIG[openssl] = ",,openssl"
23
24DPDK_EXAMPLES ?= "l2fwd,l3fwd,l2fwd-crypto,ipsec-secgw,ip_fragmentation,ip_reassembly,qdma_demo,timer,multi_process/simple_mp"
25DPDK_APPS ?= "pdump,test-pmd,proc-info,test-crypto-perf"
26
27# kernel module is provide by dpdk-module recipe, so disable here
28EXTRA_OEMESON = " \
29 -Denable_kmods=false \
30 -Doptimization=3 \
31 --cross-file ${S}/config/arm/arm64_poky_linux_gcc \
32 -Denable_driver_sdk=true \
33 ${@bb.utils.contains('DISTRO_FEATURES', 'vpp', '-Dc_args="-Ofast -fPIC -ftls-model=local-dynamic"', '', d)} \
34 -Denable_examples_source_install=false \
35 -Ddrivers_install_subdir= \
36 -Denable_apps=${DPDK_APPS} \
37"
38
39do_install:append(){
40 install -d ${D}/${sysconfdir}/dpdk
41 cp -rf ${S}/nxp/* ${D}/${sysconfdir}/dpdk
42}
43
44RDEPENDS:${PN} += "bash pciutils python3-core python3-pyelftools"
45
46COMPATIBLE_MACHINE = "(qoriq-arm64)"
47
48CVE_PRODUCT = "data_plane_development_kit"
diff --git a/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch b/recipes-extended/dpdk/files/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch
index bef1f45b5..fed893a08 100644
--- a/recipes-extended/dpdk/dpdk-20.11/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch
+++ b/recipes-extended/dpdk/files/0001-meson.build-march-and-mcpu-already-passed-by-Yocto.patch
@@ -14,21 +14,21 @@ diff --git a/config/meson.build b/config/meson.build
14index 2f150de3b8..41bb3e9ec4 100644 14index 2f150de3b8..41bb3e9ec4 100644
15--- a/config/meson.build 15--- a/config/meson.build
16+++ b/config/meson.build 16+++ b/config/meson.build
17@@ -94,12 +94,12 @@ dpdk_conf.set('RTE_MACHINE', machine) 17@@ -127,12 +127,12 @@ dpdk_conf.set('RTE_MACHINE', cpu_instruction_set)
18 machine_args = [] 18 machine_args = []
19 19
20 # ppc64 does not support -march= at all, use -mcpu and -mtune for that 20 # ppc64 does not support -march= at all, use -mcpu and -mtune for that
21-if host_machine.cpu_family().startswith('ppc') 21-if host_machine.cpu_family().startswith('ppc')
22- machine_args += '-mcpu=' + machine 22- machine_args += '-mcpu=' + cpu_instruction_set
23- machine_args += '-mtune=' + machine 23- machine_args += '-mtune=' + cpu_instruction_set
24-else 24-else
25- machine_args += '-march=' + machine 25- machine_args += '-march=' + cpu_instruction_set
26-endif 26-endif
27+#if host_machine.cpu_family().startswith('ppc') 27+#if host_machine.cpu_family().startswith('ppc')
28+# machine_args += '-mcpu=' + machine 28+# machine_args += '-mcpu=' + cpu_instruction_set
29+# machine_args += '-mtune=' + machine 29+# machine_args += '-mtune=' + cpu_instruction_set
30+#else 30+#else
31+# machine_args += '-march=' + machine 31+# machine_args += '-march=' + cpu_instruction_set
32+#endif 32+#endif
33 33
34 toolchain = cc.get_id() 34 toolchain = cc.get_id()