diff options
22 files changed, 626 insertions, 380 deletions
@@ -21,7 +21,7 @@ Guidelines for submitting patches ==================================== Please submit any patches against meta-dpdk to the meta-intel -mailing list (meta-intel@yoctoproject.org). Also, if your patches are +mailing list (meta-intel@lists.yoctoproject.org). Also, if your patches are available via a public git repository, please also include a URL to the repo and branch containing your patches as that makes it easier for maintainers to grab and test your patches. diff --git a/conf/layer.conf b/conf/layer.conf index 0be65238..016f9aef 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -14,4 +14,9 @@ LAYERDEPENDS_dpdk = "core" # This should only be incremented on significant changes that will # cause compatibility issues with other layers LAYERVERSION_dpdk = "1" -LAYERSERIES_COMPAT_dpdk = "sumo thud warrior" +LAYERSERIES_COMPAT_dpdk = "kirkstone nanbield scarthgap" + +BBFILES_DYNAMIC += " \ + clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \ + clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bbappend \ +" diff --git a/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch b/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch new file mode 100644 index 00000000..0c891528 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch @@ -0,0 +1,44 @@ +From 9c9dce2e5f04de65b7b00321f96fff6071546ea1 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Mon, 17 Oct 2022 15:44:16 +0800 +Subject: [PATCH] configure: skip toolchain checks + +Current logic fetch full command line along with the tool. i.e +gcc -m64 -march=skylake -mtune=generic ... + +Which throws ERROR: Cannot find tool -m64 + +So need to re-write for loop, so it can work in cross-compilation +environment too. + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> + +--- + configure | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure b/configure +index b4e824f..10618fc 100755 +--- a/configure ++++ b/configure +@@ -69,12 +69,12 @@ check_toolchain() + CLANG=$(find_tool clang "$CLANG") + LLC=$(find_tool llc "$LLC") + +- for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do +- if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then +- echo "*** ERROR: Cannot find tool ${TOOL}" ; +- exit 1; +- fi; +- done ++ #for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do ++ # if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then ++ # echo "*** ERROR: Cannot find tool ${TOOL}" ; ++ # exit 1; ++ # fi; ++ #done + + clang_version=$($CLANG --version | grep -Po '(?<=clang version )[[:digit:]]+') + if [ "$?" -ne "0" ]; then diff --git a/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch b/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/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 @@ +From 2840cf0b89497f545fae2eed7ece3f3c5fc558e3 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Mon, 17 Oct 2022 15:50:34 +0800 +Subject: [PATCH 2/4] Makefile: It does not detect libbpf header from sysroot + +So adding sysroot headers path. + +Upstream-Status: OE-Specific + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + lib/common.mk | 2 +- + lib/libxdp/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/common.mk b/lib/common.mk +index 56c0406..ab0bad8 100644 +--- a/lib/common.mk ++++ b/lib/common.mk +@@ -55,7 +55,7 @@ LIBXDP_SOURCES := $(wildcard $(LIBXDP_DIR)/*.[ch] $(LIBXDP_DIR)/*.in) + KERN_USER_H ?= $(wildcard common_kern_user.h) + + CFLAGS += -I$(HEADER_DIR) -I$(LIB_DIR)/util $(ARCH_INCLUDES) +-BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) ++BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) -I${STAGING_INCDIR}/ + + BPF_HEADERS := $(wildcard $(HEADER_DIR)/bpf/*.h) $(wildcard $(HEADER_DIR)/xdp/*.h) + +diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile +index 358b751..8f459d8 100644 +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc + TEMPLATED_SOURCES := xdp-dispatcher.c + + CFLAGS += -I$(HEADER_DIR) +-BPF_CFLAGS += -I$(HEADER_DIR) ++BPF_CFLAGS += -I$(HEADER_DIR) -I${STAGING_INCDIR}/ + + + ifndef BUILD_STATIC_ONLY +-- +2.25.1 + diff --git a/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch b/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/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch @@ -0,0 +1,31 @@ +From 157546fbc4f18751c52b3c8788879c05cf253331 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Mon, 17 Oct 2022 16:02:46 +0800 +Subject: [PATCH 3/4] Makefile: fix KeyError failure + +Error: +Exception: KeyError: 'getpwuid(): uid not found: 11857215' + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + lib/libxdp/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile +index 8f459d8..9a340a3 100644 +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -55,7 +55,7 @@ install: all + $(Q)install -d -m 0755 $(DESTDIR)$(BPF_OBJECT_DIR) + $(Q)install -m 0644 $(LIB_HEADERS) $(DESTDIR)$(HDRDIR)/ + $(Q)install -m 0644 $(PC_FILE) $(DESTDIR)$(LIBDIR)/pkgconfig/ +- $(Q)cp -fpR $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) ++ $(Q)cp -fpR --no-preserve=ownership $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) + $(Q)install -m 0755 $(XDP_OBJS) $(DESTDIR)$(BPF_OBJECT_DIR) + $(if $(MAN_FILES),$(Q)install -m 0755 -d $(DESTDIR)$(MANDIR)/man3) + $(if $(MAN_FILES),$(Q)install -m 0644 $(MAN_FILES) $(DESTDIR)$(MANDIR)/man3) +-- +2.25.1 + diff --git a/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch b/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/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch @@ -0,0 +1,34 @@ +From 46b3ff797135574aa0ee42f633a281d44f48da95 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Mon, 17 Oct 2022 16:05:15 +0800 +Subject: [PATCH 4/4] Makefile: fix libxdp.pc error + +Error: +do_populate_sysroot: QA Issue: libxdp.pc failed sanity test (tmpdir) in +path ... xdp-tools/1.2.8-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig] + +Upstream-Status: Inappropriate + +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + lib/libxdp/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile +index 9a340a3..bc39177 100644 +--- a/lib/libxdp/Makefile ++++ b/lib/libxdp/Makefile +@@ -76,8 +76,8 @@ $(OBJDIR)/libxdp.so.$(LIBXDP_VERSION): $(SHARED_OBJS) + $^ $(LDFLAGS) $(LDLIBS) -o $@ + + $(OBJDIR)/libxdp.pc: +- $(Q)sed -e "s|@PREFIX@|$(PREFIX)|" \ +- -e "s|@LIBDIR@|$(LIBDIR)|" \ ++ $(Q)sed -e "s|@PREFIX@|$(prefix)|" \ ++ -e "s|@LIBDIR@|$(libdir)|" \ + -e "s|@VERSION@|$(TOOLS_VERSION)|" \ + < libxdp.pc.template > $@ + +-- +2.25.1 + diff --git a/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.10.bb b/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.10.bb new file mode 100644 index 00000000..bd3182d1 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.10.bb @@ -0,0 +1,37 @@ +SUMMARY = "Utilities and example programs for use with XDP" +HOMEPAGE = "https://github.com/xdp-project/xdp-tools" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9ee53f8d06bbdb4c11b1557ecc4f8cd5 \ + file://LICENSES/GPL-2.0;md5=994331978b428511800bfbd17eea3001 \ + file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \ + file://LICENSES/BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927" + +DEPENDS += " libbpf clang-native zlib elfutils libpcap" + +SRC_URI = "git://github.com/xdp-project/xdp-tools.git;branch=v1.2;protocol=https \ + file://0001-configure-skip-toolchain-checks.patch \ + file://0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch \ + file://0003-Makefile-fix-KeyError-failure.patch \ + file://0004-Makefile-fix-libxdp.pc-error.patch \ + " + +SRCREV = "57a139f9bf6ef644f9c1deb4f7df4bb4c76d6179" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +EXTRA_OEMAKE += "PREFIX=${D}${prefix} LIBDIR=${D}${libdir} BUILD_STATIC_ONLY=1 PRODUCTION=1" + +CFLAGS += "-fPIC" + +export STAGING_INCDIR + +do_install () { + oe_runmake install + + # Remove object files *.o + rm -rf ${D}/${libdir}/bpf +} + +RDEPENDS:${PN} += "bash" diff --git a/recipes-extended/dpdk/dpdk-kmods_git.bb b/recipes-extended/dpdk/dpdk-kmods_git.bb new file mode 100644 index 00000000..b7c540ff --- /dev/null +++ b/recipes-extended/dpdk/dpdk-kmods_git.bb @@ -0,0 +1,29 @@ +SUMMARY = "DPDK Kernel Module igb_uio" +DESCRIPTION = "UIO driver for Intel IGB PCI cards" +HOMEPAGE = "http://git.dpdk.org/dpdk-kmods/" + +FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://igb_uio.c;beginline=1;endline=4;md5=a05cd72f85021e22ff6b2632b437450b" + +SRC_URI = "git://dpdk.org/git/dpdk-kmods;protocol=https;branch=main \ + file://0001-support-5.18-kernel-ABI.patch;patchdir=../.. \ + " +SRCREV = "e721c733cd24206399bebb8f0751b0387c4c1595" + +S = "${WORKDIR}/git/linux/igb_uio" + +PV = "1.0" + +inherit module + +EXTRA_OEMAKE += "KSRC='${STAGING_KERNEL_DIR}'" + +do_install() { + if [ -e "${S}/igb_uio.ko" ] + then + install -d ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/ + install -m 0644 ${S}/igb_uio.ko ${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/ + fi +} diff --git a/recipes-extended/dpdk/dpdk-module_21.11.5.bb b/recipes-extended/dpdk/dpdk-module_21.11.5.bb new file mode 100644 index 00000000..7f733c89 --- /dev/null +++ b/recipes-extended/dpdk/dpdk-module_21.11.5.bb @@ -0,0 +1,58 @@ +include dpdk.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" + +SRC_URI += " \ + file://0001-Makefile-add-makefile.patch \ +" +STABLE = "-stable" +BRANCH = "21.11" +SRCREV = "4e50ad4469f7c037e32de5aa3535d1cd25de0741" +S = "${WORKDIR}/git" + +inherit module + +#kernel module needs 'rte_build_config.h', which is generated at buid time +DEPENDS += "dpdk" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST:libc-musl:class-target = "null" +COMPATIBLE_HOST:linux-gnux32 = "null" + +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} +} + +# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 +# NVD database is incomplete +# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 +# NVD database is incomplete +CVE_CHECK_IGNORE += "\ + CVE-2021-3839 \ + CVE-2022-0669 \ +" diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc index a0e081a3..41618e09 100644 --- a/recipes-extended/dpdk/dpdk.inc +++ b/recipes-extended/dpdk/dpdk.inc @@ -1,181 +1,12 @@ DESCRIPTION = "Intel(r) Data Plane Development Kit" HOMEPAGE = "http://dpdk.org" -STABLE = "" -BRANCH = "master" -S = "${WORKDIR}/git" +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://dpdk.org/dpdk${STABLE};branch=${BRANCH} \ - file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ - file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \ - " +SRC_URI = "git://dpdk.org/git/dpdk${STABLE};protocol=https;branch=${BRANCH} \ +" -COMPATIBLE_MACHINE = "null" -COMPATIBLE_HOST_libc-musl_class-target = "null" -COMPATIBLE_HOST_linux-gnux32 = "null" - -# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. -# fuse is in meta-filesystems and qat is not yet upstreamed. -# So adding mechanism to explicitly disable the use of fuse and qat. -# To enable, uncomment the below line or include in .bbappend. -# PACKAGECONFIG ?= " dpdk_qat vhost libvirt" - -PACKAGECONFIG[dpdk_qat] = ",,virtual/qat" -PACKAGECONFIG[vhost] = ",,fuse" -PACKAGECONFIG[libvirt] = ",,libvirt" -PACKAGECONFIG[numa] = ",,numactl" - -export CONFIG_EXAMPLE_DPDK_QAT = "${@bb.utils.contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" -export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@bb.utils.contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" -export CONFIG_VHOST_ENABLED = "${@bb.utils.contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" -export CONFIG_HAVE_NUMA = "${@bb.utils.contains('PACKAGECONFIG', 'numa', 'y', 'n', d)}" - -# Don't use the default value of datadir and let the dpdk set it to a dpdk -# specific directory -datadir[unexport] = "1" - -RDEPENDS_${PN} += "python-subprocess" -DEPENDS = "virtual/kernel" -do_configure[depends] += "virtual/kernel:do_shared_workdir" - -inherit module - -export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" -export RTE_SDK = "${S}" - -export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include" -export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" -export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" -export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" -export INSTALL_PATH = "${prefix}/share/dpdk" -export RTE_OUTPUT = "${S}/${RTE_TARGET}" -export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/" -export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}" -export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}" -export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" - -export EXAMPLES_BUILD_DIR = "${RTE_TARGET}" -export ARCHDIR = "generic" - -DPDK_RTE_TARGET_x86-64 = "x86_64-native-linuxapp-gcc" -DPDK_RTE_TARGET_x86 = "i686-native-linuxapp-gcc" -DPDK_RTE_TARGET_aarch64 = "arm64-${DPDK_TARGET_MACH}-linuxapp-gcc" -export RTE_TARGET = "${DPDK_RTE_TARGET}" - -# The list of intel Comms platforms and their target machine -# process mapping. The supported target machine is listed under -# dpdk/mk/machine -def get_dpdk_target_mach(bb, d): - target_arch = d.getVar('DPDK_TARGET_MACHINE', True) - if target_arch: - return target_arch - return "default" - -do_configure () { - ############################################################# - ### default value for prefix is "usr", unsetting it, so it - ### will not be concatenated in ${RTE_TARGET}/Makefile - ### which will cause compilation failure - ############################################################# - unset prefix - - # Fix-up CONFIG_RTE_MACHINE based on target machine - sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_${RTE_TARGET} - - # Fix-up vhost configs based on package config - sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp - sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp - sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp - sed -e "s#CONFIG_RTE_LIBRTE_VHOST_NUMA=.*#CONFIG_RTE_LIBRTE_VHOST_NUMA=${CONFIG_HAVE_NUMA}#" -i ${S}/config/common_linuxapp - sed -e "s#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=.*#CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=${CONFIG_HAVE_NUMA}#" -i ${S}/config/common_linuxapp - - # Fix-up CONFIG_RTE_LIBRTE_POWER based on package config for libvirt - sed -e "s#CONFIG_RTE_LIBRTE_POWER=y#CONFIG_RTE_LIBRTE_POWER=${CONFIG_EXAMPLE_VM_POWER_MANAGER}#" -i ${S}/config/common_linuxapp - - make O=$RTE_TARGET T=$RTE_TARGET config -} - -do_compile () { - unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS - - cd ${S}/${RTE_TARGET} - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \ - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ - CROSS="${TARGET_PREFIX}" \ - prefix="" LDFLAGS="${TUNE_LDARGS}" WERROR_FLAGS="-w" V=1 - - cd ${S}/examples/ - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ - CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/" - - cd ${S}/test/ - oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ - CROSS="${TARGET_PREFIX}" O="${S}/test/$@/" -} - -do_install () { - oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D} - oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR} - oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D} - - # Install examples - for dirname in ${S}/examples/* - do - install -m 0755 -d ${D}/${INSTALL_PATH}/examples/`basename ${dirname}` - - for appname in `find ${dirname} -regex ".*${EXAMPLES_BUILD_DIR}\/app\/[-0-9a-zA-Z0-9/_]*$"` - do - install -m 755 ${appname} ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`/ - done - done - - # Install test - for dirname in ${S}/test/app/* - do - install -m 0755 -d ${D}/${INSTALL_PATH}/test - - for appname in `find ${dirname} -regex ".*test\/app\/[-0-9a-zA-Z0-9/_]*$"` - do - install -m 755 ${appname} ${D}/${INSTALL_PATH}/test - done - done - - cp -r ${S}/mk ${D}${INSTALL_PATH}/ -} - -PACKAGES += "${PN}-examples ${PN}-test" - -FILES_${PN}-dbg += " \ - ${INSTALL_PATH}/.debug \ - ${INSTALL_PATH}/examples/*/.debug \ - " - -FILES_${PN}-doc += "\ - ${INSTALL_PATH}/doc \ - " - -FILES_${PN}-dev += " \ - ${INSTALL_PATH}/${RTE_TARGET}/.config \ - ${includedir} \ - ${includedir}/${ARCHDIR} \ - ${includedir}/exec-env \ - ${INSTALL_PATH}/buildtools/ \ - ${INSTALL_PATH}/${RTE_TARGET}/include \ - ${INSTALL_PATH}/${RTE_TARGET}/lib \ - ${INSTALL_PATH}/mk \ - " - -FILES_${PN} += " ${INSTALL_PATH}/usertools/ \ - ${prefix}/sbin/ \ - ${prefix}/bin/ \ - ${libdir}/ \ - " -FILES_${PN}-examples += " \ - ${INSTALL_PATH}/examples/* \ - " - -FILES_${PN}-test += " \ - ${INSTALL_PATH}/test \ - " +CVE_PRODUCT = "data_plane_development_kit" diff --git a/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch b/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch new file mode 100644 index 00000000..0fc849b7 --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch @@ -0,0 +1,75 @@ +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)/lib/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/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch b/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch new file mode 100644 index 00000000..92e3523c --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch @@ -0,0 +1,32 @@ +From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang <chee.yang.lee@intel.com> +Date: Wed, 6 Dec 2023 16:58:10 +0800 +Subject: [PATCH] config/meson: get cpu_instruction_set from meson option + +Workaround error: +| ../git/config/meson.build:178:8: ERROR: Problem encountered: Compiler +does not support "x86_64" arch flag. + +Upstream-Status: Inappropriate [ yocto specific to set cpu_instruction_set ] + +Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> +--- + config/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/meson.build b/config/meson.build +index a9ccd56deb..f310c7adf6 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -105,7 +105,7 @@ platform = get_option('platform') + + # set the cpu_instruction_set and cflags for it + if meson.is_cross_build() +- cpu_instruction_set = host_machine.cpu() ++ cpu_instruction_set = get_option('cpu_instruction_set') + else + cpu_instruction_set = get_option('cpu_instruction_set') + machine = get_option('machine') +-- +2.37.3 + diff --git a/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch b/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/recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch @@ -0,0 +1,38 @@ +From 9aeb0bedf63f0f8f132194705b63ed0045452354 Mon Sep 17 00:00:00 2001 +From: Naveen Saini <naveen.kumar.saini@intel.com> +Date: Wed, 8 Dec 2021 11:48:27 +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 805d5d51d0..620331a736 100644 +--- a/config/meson.build ++++ b/config/meson.build +@@ -127,12 +127,12 @@ dpdk_conf.set('RTE_MACHINE', cpu_instruction_set) + 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=' + cpu_instruction_set +- machine_args += '-mtune=' + cpu_instruction_set +-else +- machine_args += '-march=' + cpu_instruction_set +-endif ++#if host_machine.cpu_family().startswith('ppc') ++# machine_args += '-mcpu=' + cpu_instruction_set ++# machine_args += '-mtune=' + cpu_instruction_set ++#else ++# machine_args += '-march=' + cpu_instruction_set ++#endif + + toolchain = cc.get_id() + dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) +-- +2.17.1 + diff --git a/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch b/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch new file mode 100644 index 00000000..bada7bdd --- /dev/null +++ b/recipes-extended/dpdk/dpdk/0001-support-5.18-kernel-ABI.patch @@ -0,0 +1,42 @@ +From 5f2d8db6692e257b16f1c5204efaaac2362f34ab Mon Sep 17 00:00:00 2001 +From: Andrea Righi <andrea.righi@canonical.com> +Date: Tue, 15 Nov 2022 13:56:45 +0800 +Subject: [PATCH] support 5.18+ kernel ABI + +Upstream-Status: Pending [Taken from Ubuntu Source, https://git.launchpad.net/ubuntu/+source/dpdk-kmods/commit/debian/patches?id=9d628c02c169d8190bc2cb6afd81e4d364c382cd] + +Signed-off-by: Andrea Righi <andrea.righi@canonical.com> +Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> +--- + linux/igb_uio/igb_uio.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c +index 33e0e02..89b5262 100644 +--- a/linux/igb_uio/igb_uio.c ++++ b/linux/igb_uio/igb_uio.c +@@ -30,9 +30,20 @@ enum rte_intr_mode { + #define RTE_INTR_MODE_MSI_NAME "msi" + #define RTE_INTR_MODE_MSIX_NAME "msix" + +- + #include "compat.h" + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) ++{ ++ return dma_set_mask(&dev->dev, mask); ++} ++ ++static inline int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) ++{ ++ return dma_set_coherent_mask(&dev->dev, mask); ++} ++#endif ++ + /** + * A structure describing the private information for a uio device. + */ +-- +2.25.1 + diff --git a/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch deleted file mode 100644 index 603bd32c..00000000 --- a/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 0808b30cd00f307f182007d21a8be3a0866ccf83 Mon Sep 17 00:00:00 2001 -From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> -Date: Fri, 18 Dec 2015 18:30:47 +0800 -Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build - artifact - -Introduce RTE_KERNELDIR_OUT to be the path to which kernel build -artifacts are located. This is for matching the workflow change -since Yocto Project v1.8 onwards whereby tmp/work-shared contains -separate directories for kernel source and kernel artifacts. - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> - ---- - mk/rte.module.mk | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/mk/rte.module.mk b/mk/rte.module.mk -index 1ada528a00b1..da0538cd5321 100644 ---- a/mk/rte.module.mk -+++ b/mk/rte.module.mk -@@ -48,7 +48,7 @@ build: _postbuild - # build module - $(MODULE).ko: $(SRCS_LINKS) - @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi -- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ -+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ - CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) - - # install module in $(RTE_OUTPUT)/kmod -@@ -59,7 +59,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko - - # install module - modules_install: -- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ -+ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ - modules_install - - .PHONY: clean -@@ -69,7 +69,7 @@ clean: _postclean - .PHONY: doclean - doclean: - @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi -- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean -+ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean - @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ - if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) - @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi diff --git a/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch b/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch deleted file mode 100644 index 18b761c7..00000000 --- a/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch +++ /dev/null @@ -1,30 +0,0 @@ -From d08d11c8b6fdfe73884d67a94d907000afd136ed Mon Sep 17 00:00:00 2001 -From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> -Date: Fri, 19 Aug 2016 11:57:49 +0800 -Subject: [PATCH] dpdk: add --sysroot option within app makefile - -Upstream-Status: Inappropriate [configuration] - -rte.app.mk has been changed to add -Wl, to all items listed -under EXTRA_LDFLAGS. It causes --sysroot=<path> to not setup -correctly when we depends on gcc to setup for GNU ld. - -Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> - ---- - mk/rte.app.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mk/rte.app.mk b/mk/rte.app.mk -index 3eb41d176d21..9ab6688718db 100644 ---- a/mk/rte.app.mk -+++ b/mk/rte.app.mk -@@ -300,7 +300,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) - ifeq ($(LINK_USING_CC),1) - O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $(OBJS-y) $(call linkerprefix, \ - $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ -- $(MAPFLAGS)) -+ $(MAPFLAGS)) $(SYSROOTPATH) - else - O_TO_EXE = $(LD) -o $@ $(OBJS-y) \ - $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ diff --git a/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch b/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch deleted file mode 100644 index 55f0c15f..00000000 --- a/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 4a86048d44cae812b227b857772aeeb839502706 Mon Sep 17 00:00:00 2001 -From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> -Date: Fri, 2 Sep 2016 15:48:52 +0800 -Subject: [PATCH] dpdk: fix for parellel make issue - -To make sure that the path of libraries should be correct and -libraries will be build before, And available at the time of -linking example apps. - -Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> - ---- - examples/Makefile | 1 + - examples/ethtool/ethtool-app/Makefile | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/examples/Makefile b/examples/Makefile -index 17ecf7f64cda..2a8e805b85a7 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -41,6 +41,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_BBDEV) += bbdev_app - DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bond - DIRS-y += cmdline - DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor -+DEPDIRS-y += examples/ethtool/lib - DIRS-y += ethtool - DIRS-y += exception_path - DIRS-$(CONFIG_RTE_LIBRTE_EFD) += server_node_efd -diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile -index 4cd9efdd574b..d3c709ab2fef 100644 ---- a/examples/ethtool/ethtool-app/Makefile -+++ b/examples/ethtool/ethtool-app/Makefile -@@ -19,6 +19,7 @@ SRCS-y := main.c ethapp.c - CFLAGS += -O3 -D_GNU_SOURCE -pthread -I$(SRCDIR)/../lib - CFLAGS += $(WERROR_FLAGS) - -+LDLIBS += -L$(ETHTOOL_LIB_PATH)/ - LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib - LDLIBS += -lrte_ethtool - diff --git a/recipes-extended/dpdk/dpdk/dpdk-17.11-mk-disable-warning-for-packed-member-pointer.patch b/recipes-extended/dpdk/dpdk/dpdk-17.11-mk-disable-warning-for-packed-member-pointer.patch deleted file mode 100644 index 70a8decf..00000000 --- a/recipes-extended/dpdk/dpdk/dpdk-17.11-mk-disable-warning-for-packed-member-pointer.patch +++ /dev/null @@ -1,48 +0,0 @@ -From a385972c3675dd2b4792ab5b3cf7a536e6f9846c Mon Sep 17 00:00:00 2001 -From: Reshma Pattan <reshma.pattan@intel.com> -Date: Thu, 2 May 2019 10:33:34 +0100 -Subject: [PATCH] mk: disable warning for packed member pointer -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -gcc 9 on Fedora 30 gives an error -"taking address of packed member may result in an -unaligned pointer value" warnings. - -For clang builds this warning is already disabled, -so disable "-Waddress-of-packed-member" for gcc builds -also. - -Snippet of build error: -lib/librte_eal/linux/eal/eal_memalloc.c: In function ‘alloc_seg_walk’: -lib/librte_eal/linux/eal/eal_memalloc.c:768:12: error: -taking address of packed member of ‘struct rte_mem_config’ may result -in an unaligned pointer value [-Werror=address-of-packed-member] - 768 | cur_msl = &mcfg->memsegs[msl_idx]; - | ^~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> -Tested-by: David Marchand <david.marchand@redhat.com> -Upstream-Status: Backport -Signed-off-by: He Zhe <zhe.he@windriver.com> ---- - mk/toolchain/gcc/rte.vars.mk | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk -index d8b99fa..b852fcf 100644 ---- a/mk/toolchain/gcc/rte.vars.mk -+++ b/mk/toolchain/gcc/rte.vars.mk -@@ -87,5 +87,8 @@ WERROR_FLAGS += -Wimplicit-fallthrough=2 - WERROR_FLAGS += -Wno-format-truncation - endif - -+# disable packed member unalign warnings -+WERROR_FLAGS += -Wno-address-of-packed-member -+ - export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF - export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS --- -2.7.4 - diff --git a/recipes-extended/dpdk/dpdk_17.11.6.bb b/recipes-extended/dpdk/dpdk_17.11.6.bb deleted file mode 100644 index 01bacd6b..00000000 --- a/recipes-extended/dpdk/dpdk_17.11.6.bb +++ /dev/null @@ -1,19 +0,0 @@ -include dpdk.inc - -STABLE = "-stable" -BRANCH = "17.11" -SRCREV = "63d5c53b845d8360c0106374ce76eef9b5478c60" - -LICENSE = "LGPLv2 & GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe\ - file://LICENSE.LGPL;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI += "\ - file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \ - file://dpdk-17.11-mk-disable-warning-for-packed-member-pointer.patch \ -" - -do_install_append () { - # Remove the unneeded dir - rm -rf ${D}/${INSTALL_PATH}/${RTE_TARGET}/app -} diff --git a/recipes-extended/dpdk/dpdk_18.11.2.bb b/recipes-extended/dpdk/dpdk_18.11.2.bb deleted file mode 100644 index 7a3dcdbd..00000000 --- a/recipes-extended/dpdk/dpdk_18.11.2.bb +++ /dev/null @@ -1,15 +0,0 @@ -include dpdk.inc - -STABLE = "-stable" -BRANCH = "18.11" -SRCREV = "06c4b12a5968caea61e96f7d6bd29d2726fbe255" - -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" - -do_install_append () { - # Remove the unneeded dir - rm -rf ${D}/${INSTALL_PATH}/${RTE_TARGET}/app -} diff --git a/recipes-extended/dpdk/dpdk_21.11.5.bb b/recipes-extended/dpdk/dpdk_21.11.5.bb new file mode 100644 index 00000000..0d460123 --- /dev/null +++ b/recipes-extended/dpdk/dpdk_21.11.5.bb @@ -0,0 +1,77 @@ +include dpdk.inc + +SRC_URI += " \ + file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ +" + +STABLE = "-stable" +BRANCH = "21.11" +SRCREV = "4e50ad4469f7c037e32de5aa3535d1cd25de0741" +S = "${WORKDIR}/git" + +# CVE-2021-3839 has been fixed by commit 4c40d30d2b in 21.11.1 +# NVD database is incomplete +# CVE-2022-0669 has been fixed by commit 6cb68162e4 in 21.11.1 +# NVD database is incomplete +CVE_CHECK_IGNORE += "\ + CVE-2021-3839 \ + CVE-2022-0669 \ +" + +# kernel module is provide by dpdk-module recipe, so disable here +EXTRA_OEMESON = " -Denable_kmods=false \ + -Dexamples=all \ +" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST:libc-musl:class-target = "null" +COMPATIBLE_HOST:linux-gnux32 = "null" + +PACKAGECONFIG ??= " " +PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools" +PACKAGECONFIG[libvirt] = ",,libvirt" + +RDEPENDS:${PN} += "pciutils python3-core" +RDEPENDS:${PN}-examples += "bash" +DEPENDS = "numactl python3-pyelftools-native" + +inherit meson pkgconfig + +INSTALL_PATH = "${prefix}/share/dpdk" + +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 + +} + +PACKAGES =+ "${PN}-examples ${PN}-tools" + +FILES:${PN} += " ${bindir}/dpdk-testpmd \ + ${bindir}/dpdk-proc-info \ + ${libdir}/*.so* \ + ${libdir}/dpdk/pmds-22.0/*.so* \ + " +FILES:${PN}-examples = " \ + ${prefix}/share/dpdk/examples/* \ + " + +FILES:${PN}-tools = " \ + ${bindir}/dpdk-pdump \ + ${bindir}/dpdk-test \ + ${bindir}/dpdk-test-* \ + ${bindir}/dpdk-*.py \ + " + +CVE_PRODUCT = "data_plane_development_kit" + +INSANE_SKIP:${PN} = "dev-so" diff --git a/recipes-extended/dpdk/dpdk_23.11.bb b/recipes-extended/dpdk/dpdk_23.11.bb new file mode 100644 index 00000000..fc2796a0 --- /dev/null +++ b/recipes-extended/dpdk/dpdk_23.11.bb @@ -0,0 +1,71 @@ +include dpdk.inc + +SRC_URI += " file://0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch " + +STABLE = "-stable" +BRANCH = "23.11" +SRCREV = "eeb0605f118dae66e80faa44f7b3e88748032353" +S = "${WORKDIR}/git" + +def get_cpu_instruction_set(bb, d): + import re + march = re.search(r'-march=([^\s]*)', d.getVar('CC')) + if march: + return march.group(1) + else: + return "core2" + +EXTRA_OEMESON = " -Dexamples=all -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)} " + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST:libc-musl:class-target = "null" +COMPATIBLE_HOST:linux-gnux32 = "null" + +PACKAGECONFIG ??= " " +PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools" +PACKAGECONFIG[libvirt] = ",,libvirt" + +RDEPENDS:${PN} += "pciutils python3-core" +RDEPENDS:${PN}-examples += "bash" +DEPENDS = "numactl python3-pyelftools-native" + +inherit meson pkgconfig + +INSTALL_PATH = "${prefix}/share/dpdk" + +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 + +} + +PACKAGES =+ "${PN}-examples ${PN}-tools" + +FILES:${PN} += " ${bindir}/dpdk-testpmd \ + ${bindir}/dpdk-proc-info \ + ${libdir}/*.so* \ + ${libdir}/dpdk/pmds-22.0/*.so* \ + " +FILES:${PN}-examples = " \ + ${prefix}/share/dpdk/examples/* \ + " + +FILES:${PN}-tools = " \ + ${bindir}/dpdk-pdump \ + ${bindir}/dpdk-test \ + ${bindir}/dpdk-test-* \ + ${bindir}/dpdk-*.py \ + " + +CVE_PRODUCT = "data_plane_development_kit" + +INSANE_SKIP:${PN} = "dev-so" |