From 617ca40b421f0b0ce4e3ba996688bbac2c68b14b Mon Sep 17 00:00:00 2001 From: Lee Chee Yang Date: Thu, 7 Dec 2023 15:38:08 +0800 Subject: dpdk: 23.07 -> 23.11 (LTS) drop the dpdk-module, kni driver now dropped. https://github.com/DPDK/dpdk/commit/f78c100bc87119c6a94130a6689d773afdaa9d98 EXTRA_OEMESON remove enable_kmods. set the cpu_instruction_set through EXTRA_OEMESON. Signed-off-by: Lee Chee Yang Signed-off-by: Anuj Mittal --- recipes-extended/dpdk/dpdk-module_23.07.bb | 50 ---------------- ...n-get-cpu_instruction_set-from-meson-opti.patch | 32 ++++++++++ recipes-extended/dpdk/dpdk_23.07.bb | 67 --------------------- recipes-extended/dpdk/dpdk_23.11.bb | 68 ++++++++++++++++++++++ 4 files changed, 100 insertions(+), 117 deletions(-) delete mode 100644 recipes-extended/dpdk/dpdk-module_23.07.bb create mode 100644 recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch delete mode 100644 recipes-extended/dpdk/dpdk_23.07.bb create mode 100644 recipes-extended/dpdk/dpdk_23.11.bb diff --git a/recipes-extended/dpdk/dpdk-module_23.07.bb b/recipes-extended/dpdk/dpdk-module_23.07.bb deleted file mode 100644 index c76ed87..0000000 --- a/recipes-extended/dpdk/dpdk-module_23.07.bb +++ /dev/null @@ -1,50 +0,0 @@ -include dpdk.inc - -FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:" - -SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \ - file://0001-Makefile-add-makefile.patch \ -" - -BRANCH = "releases" -SRCREV = "12fcafcd62286933e6b167b14856d21f642efa5f" -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} -} - 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 0000000..92e3523 --- /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 +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 +--- + 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_23.07.bb b/recipes-extended/dpdk/dpdk_23.07.bb deleted file mode 100644 index 3a1b0a8..0000000 --- a/recipes-extended/dpdk/dpdk_23.07.bb +++ /dev/null @@ -1,67 +0,0 @@ -include dpdk.inc - -SRC_URI = "git://dpdk.org/git/dpdk;branch=${BRANCH};protocol=https \ - file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \ -" - -BRANCH = "releases" -SRCREV = "12fcafcd62286933e6b167b14856d21f642efa5f" -S = "${WORKDIR}/git" - -# 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 0000000..5f0f9ec --- /dev/null +++ b/recipes-extended/dpdk/dpdk_23.11.bb @@ -0,0 +1,68 @@ +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')).group(1) + return march + +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" -- cgit v1.2.3-54-g00ecf