summaryrefslogtreecommitdiffstats
path: root/meta-dpdk
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2023-06-08 12:49:57 -0700
committerMark Hatle <mark.hatle@amd.com>2023-06-09 09:54:12 -0500
commit44bdae5e457e248cfce536893a150d5cb9a11f6b (patch)
tree012a0e3d8b133c311dbec46ce6dd85f1053696e1 /meta-dpdk
parentf7a092f2657d783b61e9da2becb03c4a1ef7ef2d (diff)
downloadmeta-xilinx-44bdae5e457e248cfce536893a150d5cb9a11f6b.tar.gz
meta-dpdk: Add langdale meta-dpdk
Add a copy of meta-dpdk, for the langdale branch from git://git.yoctoproject.org/meta-dpdk as of commit: bd1b4f10262f12dd66a91383757ccba4eeda0b08 Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-dpdk')
-rw-r--r--meta-dpdk/COPYING.MIT17
-rw-r--r--meta-dpdk/LICENSE5
-rw-r--r--meta-dpdk/README72
-rw-r--r--meta-dpdk/conf/layer.conf22
-rw-r--r--meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch46
-rw-r--r--meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch44
-rw-r--r--meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch31
-rw-r--r--meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch34
-rw-r--r--meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb37
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb29
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb58
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb58
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk.inc12
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch74
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch38
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch42
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb77
-rw-r--r--meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb76
18 files changed, 772 insertions, 0 deletions
diff --git a/meta-dpdk/COPYING.MIT b/meta-dpdk/COPYING.MIT
new file mode 100644
index 00000000..fb950dc6
--- /dev/null
+++ b/meta-dpdk/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/meta-dpdk/LICENSE b/meta-dpdk/LICENSE
new file mode 100644
index 00000000..e57d3b90
--- /dev/null
+++ b/meta-dpdk/LICENSE
@@ -0,0 +1,5 @@
1All metadata files (including, but not limited to bb, bbappend,
2bbclass, inc and conf files) are MIT licensed unless otherwise stated.
3Source code included in tree for individual recipes is under the
4LICENSE stated in the associated recipe (.bb file) unless otherwise
5stated.
diff --git a/meta-dpdk/README b/meta-dpdk/README
new file mode 100644
index 00000000..81703cfb
--- /dev/null
+++ b/meta-dpdk/README
@@ -0,0 +1,72 @@
1meta-dpdk
2=========
3
4This README file contains information on building the DPDK package.
5
6
7Dependencies
8============
9
10This layer depends on:
11
12 URI: git://git.openembedded.org/bitbake
13 branch: master
14
15 URI: git://git.openembedded.org/openembedded-core
16 layers: meta
17 branch: master
18
19
20Guidelines for submitting patches
21====================================
22
23Please submit any patches against meta-dpdk to the meta-intel
24mailing list (meta-intel@lists.yoctoproject.org). Also, if your patches are
25available via a public git repository, please also include a URL to
26the repo and branch containing your patches as that makes it easier
27for maintainers to grab and test your patches.
28
29There are patch submission scripts available that will, among other
30things, automatically include the repo URL and branch as mentioned.
31Please see the Yocto Project Development Manual sections entitled
32'Using Scripts to Push a Change Upstream and Request a Pull' and
33'Using Email to Submit a Patch' for details.
34
35Regardless of how you submit a patch or patchset, the patches should
36at minimum follow the suggestions outlined in the 'Submitting a Change
37to the Yocto Project' section in the Yocto Project Development Manual.
38Specifically, they should:
39
40 - Include a 'Signed-off-by:' line. A commit can't legally be pulled
41 in without this.
42
43 - Provide a single-line, short summary of the change. This short
44 description should be prefixed by the BSP or recipe name, as
45 appropriate, followed by a colon. Capitalize the first character
46 of the summary (following the colon).
47
48 - For the body of the commit message, provide detailed information
49 that describes what you changed, why you made the change, and the
50 approach you used.
51
52 - If the change addresses a specific bug or issue that is associated
53 with a bug-tracking ID, include a reference to that ID in your
54 detailed description in the following format: [YOCTO #<bug-id>].
55
56 - Pay attention to line length - please don't allow any particular
57 line in the commit message to stretch past 72 characters.
58
59 - For any non-trivial patch, provide information about how you
60 tested the patch, and for any non-trivial or non-obvious testing
61 setup, provide details of that setup.
62
63Doing a quick 'git log' in meta-dpdk will provide you with many
64examples of good example commits if you have questions about any
65aspect of the preferred format.
66
67The meta-dpdk maintainers will do their best to review and/or pull in
68a patch or patchset within 24 hours of the time it was posted. For
69larger and/or more involved patches and patchsets, the review process
70may take longer.
71
72Maintainer: Anuj Mittal <anuj.mittal@intel.com>
diff --git a/meta-dpdk/conf/layer.conf b/meta-dpdk/conf/layer.conf
new file mode 100644
index 00000000..45e5bd9d
--- /dev/null
+++ b/meta-dpdk/conf/layer.conf
@@ -0,0 +1,22 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have recipes-* directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7
8BBFILE_COLLECTIONS += "dpdk"
9BBFILE_PATTERN_dpdk := "^${LAYERDIR}/"
10BBFILE_PRIORITY_dpdk = "5"
11
12LAYERDEPENDS_dpdk = "core"
13
14# This should only be incremented on significant changes that will
15# cause compatibility issues with other layers
16LAYERVERSION_dpdk = "1"
17LAYERSERIES_COMPAT_dpdk = "kirkstone langdale"
18
19BBFILES_DYNAMIC += " \
20 clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \
21 clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bbappend \
22"
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch
new file mode 100644
index 00000000..32a88b20
--- /dev/null
+++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch
@@ -0,0 +1,46 @@
1From 53f8a8dffa571de99b50f1a7b757cfd7d8c24d21 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Mon, 17 Oct 2022 15:44:16 +0800
4Subject: [PATCH 1/4] configure: skip toolchain checks
5
6Current logic fetch full command line along with the tool. i.e
7gcc -m64 -march=skylake -mtune=generic ...
8
9Which throws ERROR: Cannot find tool -m64
10
11So need to re-write for loop, so it can work in cross-compilation
12environment too.
13
14Upstream-Status: Inappropriate
15
16Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
17---
18 configure | 12 ++++++------
19 1 file changed, 6 insertions(+), 6 deletions(-)
20
21diff --git a/configure b/configure
22index 70fdfdf..48d1ea5 100755
23--- a/configure
24+++ b/configure
25@@ -38,12 +38,12 @@ check_toolchain()
26 : ${EMACS=emacs}
27 : ${ARCH_INCLUDES=}
28
29- for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do
30- if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then
31- echo "*** ERROR: Cannot find tool ${TOOL}" ;
32- exit 1;
33- fi;
34- done
35+ #for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do
36+ # if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then
37+ # echo "*** ERROR: Cannot find tool ${TOOL}" ;
38+ # exit 1;
39+ # fi;
40+ #done
41
42 clang_version=$($CLANG --version | grep -Po '(?<=clang version )[[:digit:]]+')
43 echo "Found clang binary '$CLANG' with version $clang_version (from '$($CLANG --version | head -n 1)')"
44--
452.25.1
46
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch
new file mode 100644
index 00000000..2e667836
--- /dev/null
+++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch
@@ -0,0 +1,44 @@
1From 2840cf0b89497f545fae2eed7ece3f3c5fc558e3 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Mon, 17 Oct 2022 15:50:34 +0800
4Subject: [PATCH 2/4] Makefile: It does not detect libbpf header from sysroot
5
6So adding sysroot headers path.
7
8Upstream-Status: OE-Specific
9
10Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
11---
12 lib/common.mk | 2 +-
13 lib/libxdp/Makefile | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/lib/common.mk b/lib/common.mk
17index 56c0406..ab0bad8 100644
18--- a/lib/common.mk
19+++ b/lib/common.mk
20@@ -55,7 +55,7 @@ LIBXDP_SOURCES := $(wildcard $(LIBXDP_DIR)/*.[ch] $(LIBXDP_DIR)/*.in)
21 KERN_USER_H ?= $(wildcard common_kern_user.h)
22
23 CFLAGS += -I$(HEADER_DIR) -I$(LIB_DIR)/util $(ARCH_INCLUDES)
24-BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES)
25+BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) -I${STAGING_INCDIR}/
26
27 BPF_HEADERS := $(wildcard $(HEADER_DIR)/bpf/*.h) $(wildcard $(HEADER_DIR)/xdp/*.h)
28
29diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
30index 358b751..8f459d8 100644
31--- a/lib/libxdp/Makefile
32+++ b/lib/libxdp/Makefile
33@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
34 TEMPLATED_SOURCES := xdp-dispatcher.c
35
36 CFLAGS += -I$(HEADER_DIR)
37-BPF_CFLAGS += -I$(HEADER_DIR)
38+BPF_CFLAGS += -I$(HEADER_DIR) -I${STAGING_INCDIR}/
39
40
41 ifndef BUILD_STATIC_ONLY
42--
432.25.1
44
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch
new file mode 100644
index 00000000..41c57f6e
--- /dev/null
+++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch
@@ -0,0 +1,31 @@
1From 157546fbc4f18751c52b3c8788879c05cf253331 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Mon, 17 Oct 2022 16:02:46 +0800
4Subject: [PATCH 3/4] Makefile: fix KeyError failure
5
6Error:
7Exception: KeyError: 'getpwuid(): uid not found: 11857215'
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
12---
13 lib/libxdp/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
17index 8f459d8..9a340a3 100644
18--- a/lib/libxdp/Makefile
19+++ b/lib/libxdp/Makefile
20@@ -55,7 +55,7 @@ install: all
21 $(Q)install -d -m 0755 $(DESTDIR)$(BPF_OBJECT_DIR)
22 $(Q)install -m 0644 $(LIB_HEADERS) $(DESTDIR)$(HDRDIR)/
23 $(Q)install -m 0644 $(PC_FILE) $(DESTDIR)$(LIBDIR)/pkgconfig/
24- $(Q)cp -fpR $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR)
25+ $(Q)cp -fpR --no-preserve=ownership $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR)
26 $(Q)install -m 0755 $(XDP_OBJS) $(DESTDIR)$(BPF_OBJECT_DIR)
27 $(if $(MAN_FILES),$(Q)install -m 0755 -d $(DESTDIR)$(MANDIR)/man3)
28 $(if $(MAN_FILES),$(Q)install -m 0644 $(MAN_FILES) $(DESTDIR)$(MANDIR)/man3)
29--
302.25.1
31
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch
new file mode 100644
index 00000000..b1e15e52
--- /dev/null
+++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch
@@ -0,0 +1,34 @@
1From 46b3ff797135574aa0ee42f633a281d44f48da95 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Mon, 17 Oct 2022 16:05:15 +0800
4Subject: [PATCH 4/4] Makefile: fix libxdp.pc error
5
6Error:
7do_populate_sysroot: QA Issue: libxdp.pc failed sanity test (tmpdir) in
8path ... xdp-tools/1.2.8-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig]
9
10Upstream-Status: Inappropriate
11
12Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
13---
14 lib/libxdp/Makefile | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile
18index 9a340a3..bc39177 100644
19--- a/lib/libxdp/Makefile
20+++ b/lib/libxdp/Makefile
21@@ -76,8 +76,8 @@ $(OBJDIR)/libxdp.so.$(LIBXDP_VERSION): $(SHARED_OBJS)
22 $^ $(LDFLAGS) $(LDLIBS) -o $@
23
24 $(OBJDIR)/libxdp.pc:
25- $(Q)sed -e "s|@PREFIX@|$(PREFIX)|" \
26- -e "s|@LIBDIR@|$(LIBDIR)|" \
27+ $(Q)sed -e "s|@PREFIX@|$(prefix)|" \
28+ -e "s|@LIBDIR@|$(libdir)|" \
29 -e "s|@VERSION@|$(TOOLS_VERSION)|" \
30 < libxdp.pc.template > $@
31
32--
332.25.1
34
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb
new file mode 100644
index 00000000..7cd49a0b
--- /dev/null
+++ b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb
@@ -0,0 +1,37 @@
1SUMMARY = "Utilities and example programs for use with XDP"
2HOMEPAGE = "https://github.com/xdp-project/xdp-tools"
3LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=9ee53f8d06bbdb4c11b1557ecc4f8cd5 \
5 file://LICENSES/GPL-2.0;md5=994331978b428511800bfbd17eea3001 \
6 file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \
7 file://LICENSES/BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927"
8
9DEPENDS += " libbpf clang-native zlib elfutils libpcap"
10
11SRC_URI = "git://github.com/xdp-project/xdp-tools.git;branch=v1.2;protocol=https \
12 file://0001-configure-skip-toolchain-checks.patch \
13 file://0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch \
14 file://0003-Makefile-fix-KeyError-failure.patch \
15 file://0004-Makefile-fix-libxdp.pc-error.patch \
16 "
17
18SRCREV = "d4ff1f9bcf8b03556b625ab6e16958598482e861"
19
20S = "${WORKDIR}/git"
21
22inherit pkgconfig
23
24EXTRA_OEMAKE += "PREFIX=${D}${prefix} LIBDIR=${D}${libdir} BUILD_STATIC_ONLY=1 PRODUCTION=1"
25
26CFLAGS += "-fPIC"
27
28export STAGING_INCDIR
29
30do_install () {
31 oe_runmake install
32
33 # Remove object files *.o
34 rm -rf ${D}/${libdir}/bpf
35}
36
37RDEPENDS:${PN} += "bash"
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb b/meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb
new file mode 100644
index 00000000..e929d5b7
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk-kmods_git.bb
@@ -0,0 +1,29 @@
1SUMMARY = "DPDK Kernel Module igb_uio"
2DESCRIPTION = "UIO driver for Intel IGB PCI cards"
3HOMEPAGE = "http://git.dpdk.org/dpdk-kmods/"
4
5FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
6
7LICENSE = "GPL-2.0-only"
8LIC_FILES_CHKSUM = "file://igb_uio.c;beginline=1;endline=4;md5=a05cd72f85021e22ff6b2632b437450b"
9
10SRC_URI = "git://dpdk.org/git/dpdk-kmods;protocol=https;branch=main \
11 file://0001-support-5.18-kernel-ABI.patch;patchdir=../.. \
12 "
13SRCREV = "4a589f7bed00fc7009c93d430bd214ac7ad2bb6b"
14
15S = "${WORKDIR}/git/linux/igb_uio"
16
17PV = "1.0"
18
19inherit module
20
21EXTRA_OEMAKE += "KSRC='${STAGING_KERNEL_DIR}'"
22
23do_install() {
24 if [ -e "${S}/igb_uio.ko" ]
25 then
26 install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/
27 install -m 0644 ${S}/igb_uio.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/
28 fi
29}
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb b/meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb
new file mode 100644
index 00000000..307ff407
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk-module_21.11.2.bb
@@ -0,0 +1,58 @@
1include dpdk.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
4
5SRC_URI += " \
6 file://0001-Makefile-add-makefile.patch \
7"
8STABLE = "-stable"
9BRANCH = "21.11"
10SRCREV = "7bcd45ce824d0ea2a9f30d16855613a93521851b"
11S = "${WORKDIR}/git"
12
13inherit module
14
15#kernel module needs 'rte_build_config.h', which is generated at buid time
16DEPENDS += "dpdk"
17
18COMPATIBLE_MACHINE = "null"
19COMPATIBLE_HOST:libc-musl:class-target = "null"
20COMPATIBLE_HOST:linux-gnux32 = "null"
21
22export S
23export STAGING_KERNEL_DIR
24export STAGING_INCDIR
25export INSTALL_MOD_DIR="dpdk"
26
27do_configure[noexec] = "1"
28
29do_compile() {
30 cd ${S}/kernel/linux/kni
31 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
32 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
33 KERNEL_VERSION=${KERNEL_VERSION} \
34 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
35 AR="${KERNEL_AR}" \
36 O=${STAGING_KERNEL_BUILDDIR} \
37 KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
38 ${MAKE_TARGETS}
39}
40
41do_install() {
42 cd ${S}/kernel/linux/kni
43 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
44 oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
45 INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \
46 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
47 O=${STAGING_KERNEL_BUILDDIR} \
48 ${MODULES_INSTALL_TARGET}
49}
50
51# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1
52# NVD database is incomplete
53# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1
54# NVD database is incomplete
55CVE_CHECK_IGNORE += "\
56 CVE-2021-3839 \
57 CVE-2022-0669 \
58"
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb b/meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb
new file mode 100644
index 00000000..3fcbf1ec
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk-module_22.07.0.bb
@@ -0,0 +1,58 @@
1include dpdk.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
4
5SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \
6 file://0001-Makefile-add-makefile.patch \
7"
8
9BRANCH = "releases"
10SRCREV = "4fceceed5b5e9fbf04acffd66239c79d81e79260"
11S = "${WORKDIR}/git"
12
13inherit module
14
15#kernel module needs 'rte_build_config.h', which is generated at buid time
16DEPENDS += "dpdk"
17
18COMPATIBLE_MACHINE = "null"
19COMPATIBLE_HOST:libc-musl:class-target = "null"
20COMPATIBLE_HOST:linux-gnux32 = "null"
21
22export S
23export STAGING_KERNEL_DIR
24export STAGING_INCDIR
25export INSTALL_MOD_DIR="dpdk"
26
27do_configure[noexec] = "1"
28
29do_compile() {
30 cd ${S}/kernel/linux/kni
31 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
32 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
33 KERNEL_VERSION=${KERNEL_VERSION} \
34 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
35 AR="${KERNEL_AR}" \
36 O=${STAGING_KERNEL_BUILDDIR} \
37 KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
38 ${MAKE_TARGETS}
39}
40
41do_install() {
42 cd ${S}/kernel/linux/kni
43 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
44 oe_runmake DEPMOD=echo MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" \
45 INSTALL_FW_PATH="${D}${nonarch_base_libdir}/firmware" \
46 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
47 O=${STAGING_KERNEL_BUILDDIR} \
48 ${MODULES_INSTALL_TARGET}
49}
50
51# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1
52# NVD database is incomplete
53# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1
54# NVD database is incomplete
55CVE_CHECK_IGNORE += "\
56 CVE-2021-3839 \
57 CVE-2022-0669 \
58"
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk.inc b/meta-dpdk/recipes-extended/dpdk/dpdk.inc
new file mode 100644
index 00000000..b5c14984
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk.inc
@@ -0,0 +1,12 @@
1DESCRIPTION = "Intel(r) Data Plane Development Kit"
2HOMEPAGE = "http://dpdk.org"
3
4LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
6 file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \
7 file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444"
8
9SRC_URI = "git://dpdk.org/dpdk${STABLE};branch=${BRANCH} \
10"
11
12CVE_PRODUCT = "data_plane_development_kit"
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch
new file mode 100644
index 00000000..18b75fb6
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch
@@ -0,0 +1,74 @@
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/meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch
new file mode 100644
index 00000000..a74869de
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch
@@ -0,0 +1,38 @@
1From 9aeb0bedf63f0f8f132194705b63ed0045452354 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 8 Dec 2021 11:48:27 +0800
4Subject: [PATCH] meson.build:-march and -mcpu already passed by Yocto
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
9---
10 config/meson.build | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
12
13diff --git a/config/meson.build b/config/meson.build
14index 805d5d51d0..620331a736 100644
15--- a/config/meson.build
16+++ b/config/meson.build
17@@ -127,12 +127,12 @@ dpdk_conf.set('RTE_MACHINE', cpu_instruction_set)
18 machine_args = []
19
20 # ppc64 does not support -march= at all, use -mcpu and -mtune for that
21-if host_machine.cpu_family().startswith('ppc')
22- machine_args += '-mcpu=' + cpu_instruction_set
23- machine_args += '-mtune=' + cpu_instruction_set
24-else
25- machine_args += '-march=' + cpu_instruction_set
26-endif
27+#if host_machine.cpu_family().startswith('ppc')
28+# machine_args += '-mcpu=' + cpu_instruction_set
29+# machine_args += '-mtune=' + cpu_instruction_set
30+#else
31+# machine_args += '-march=' + cpu_instruction_set
32+#endif
33
34 toolchain = cc.get_id()
35 dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
36--
372.17.1
38
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch
new file mode 100644
index 00000000..bada7bdd
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch
@@ -0,0 +1,42 @@
1From 5f2d8db6692e257b16f1c5204efaaac2362f34ab Mon Sep 17 00:00:00 2001
2From: Andrea Righi <andrea.righi@canonical.com>
3Date: Tue, 15 Nov 2022 13:56:45 +0800
4Subject: [PATCH] support 5.18+ kernel ABI
5
6Upstream-Status: Pending [Taken from Ubuntu Source, https://git.launchpad.net/ubuntu/+source/dpdk-kmods/commit/debian/patches?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd]
7
8Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
9Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
10---
11 linux/igb_uio/igb_uio.c | 13 ++++++++++++-
12 1 file changed, 12 insertions(+), 1 deletion(-)
13
14diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
15index 33e0e02..89b5262 100644
16--- a/linux/igb_uio/igb_uio.c
17+++ b/linux/igb_uio/igb_uio.c
18@@ -30,9 +30,20 @@ enum rte_intr_mode {
19 #define RTE_INTR_MODE_MSI_NAME "msi"
20 #define RTE_INTR_MODE_MSIX_NAME "msix"
21
22-
23 #include "compat.h"
24
25+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
26+static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
27+{
28+ return dma_set_mask(&dev->dev, mask);
29+}
30+
31+static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
32+{
33+ return dma_set_coherent_mask(&dev->dev, mask);
34+}
35+#endif
36+
37 /**
38 * A structure describing the private information for a uio device.
39 */
40--
412.25.1
42
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb
new file mode 100644
index 00000000..bb812e12
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk_21.11.2.bb
@@ -0,0 +1,77 @@
1include dpdk.inc
2
3SRC_URI += " \
4 file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \
5"
6
7STABLE = "-stable"
8BRANCH = "21.11"
9SRCREV = "7bcd45ce824d0ea2a9f30d16855613a93521851b"
10S = "${WORKDIR}/git"
11
12# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1
13# NVD database is incomplete
14# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1
15# NVD database is incomplete
16CVE_CHECK_IGNORE += "\
17 CVE-2021-3839 \
18 CVE-2022-0669 \
19"
20
21# kernel module is provide by dpdk-module recipe, so disable here
22EXTRA_OEMESON = " -Denable_kmods=false \
23 -Dexamples=all \
24"
25
26COMPATIBLE_MACHINE = "null"
27COMPATIBLE_HOST:libc-musl:class-target = "null"
28COMPATIBLE_HOST:linux-gnux32 = "null"
29
30PACKAGECONFIG ??= " "
31PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools"
32PACKAGECONFIG[libvirt] = ",,libvirt"
33
34RDEPENDS:${PN} += "pciutils python3-core"
35RDEPENDS:${PN}-examples += "bash"
36DEPENDS = "numactl python3-pyelftools-native"
37
38inherit meson pkgconfig
39
40INSTALL_PATH = "${prefix}/share/dpdk"
41
42do_install:append(){
43 # remove source files
44 rm -rf ${D}/${INSTALL_PATH}/examples/*
45
46 # Install examples
47 install -m 0755 -d ${D}/${INSTALL_PATH}/examples/
48 for dirname in ${B}/examples/dpdk-*
49 do
50 if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then
51 install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/
52 fi
53 done
54
55}
56
57PACKAGES =+ "${PN}-examples ${PN}-tools"
58
59FILES:${PN} += " ${bindir}/dpdk-testpmd \
60 ${bindir}/dpdk-proc-info \
61 ${libdir}/*.so* \
62 ${libdir}/dpdk/pmds-22.0/*.so* \
63 "
64FILES:${PN}-examples = " \
65 ${prefix}/share/dpdk/examples/* \
66 "
67
68FILES:${PN}-tools = " \
69 ${bindir}/dpdk-pdump \
70 ${bindir}/dpdk-test \
71 ${bindir}/dpdk-test-* \
72 ${bindir}/dpdk-*.py \
73 "
74
75CVE_PRODUCT = "data_plane_development_kit"
76
77INSANE_SKIP:${PN} = "dev-so"
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb
new file mode 100644
index 00000000..9f1843bb
--- /dev/null
+++ b/meta-dpdk/recipes-extended/dpdk/dpdk_22.07.0.bb
@@ -0,0 +1,76 @@
1include dpdk.inc
2
3SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \
4 file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \
5"
6
7BRANCH = "releases"
8SRCREV = "4fceceed5b5e9fbf04acffd66239c79d81e79260"
9S = "${WORKDIR}/git"
10
11# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1
12# NVD database is incomplete
13# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1
14# NVD database is incomplete
15CVE_CHECK_IGNORE += "\
16 CVE-2021-3839 \
17 CVE-2022-0669 \
18"
19
20# kernel module is provide by dpdk-module recipe, so disable here
21EXTRA_OEMESON = " -Denable_kmods=false \
22 -Dexamples=all \
23"
24
25COMPATIBLE_MACHINE = "null"
26COMPATIBLE_HOST:libc-musl:class-target = "null"
27COMPATIBLE_HOST:linux-gnux32 = "null"
28
29PACKAGECONFIG ??= " "
30PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools"
31PACKAGECONFIG[libvirt] = ",,libvirt"
32
33RDEPENDS:${PN} += "pciutils python3-core"
34RDEPENDS:${PN}-examples += "bash"
35DEPENDS = "numactl python3-pyelftools-native"
36
37inherit meson pkgconfig
38
39INSTALL_PATH = "${prefix}/share/dpdk"
40
41do_install:append(){
42 # remove source files
43 rm -rf ${D}/${INSTALL_PATH}/examples/*
44
45 # Install examples
46 install -m 0755 -d ${D}/${INSTALL_PATH}/examples/
47 for dirname in ${B}/examples/dpdk-*
48 do
49 if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then
50 install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/
51 fi
52 done
53
54}
55
56PACKAGES =+ "${PN}-examples ${PN}-tools"
57
58FILES:${PN} += " ${bindir}/dpdk-testpmd \
59 ${bindir}/dpdk-proc-info \
60 ${libdir}/*.so* \
61 ${libdir}/dpdk/pmds-22.0/*.so* \
62 "
63FILES:${PN}-examples = " \
64 ${prefix}/share/dpdk/examples/* \
65 "
66
67FILES:${PN}-tools = " \
68 ${bindir}/dpdk-pdump \
69 ${bindir}/dpdk-test \
70 ${bindir}/dpdk-test-* \
71 ${bindir}/dpdk-*.py \
72 "
73
74CVE_PRODUCT = "data_plane_development_kit"
75
76INSANE_SKIP:${PN} = "dev-so"