Skip to contentSkip to conversation

dpdk: upgrade 22.11.7 -> 25.11.0

PATCH In review Ruiqiang Hao 2 participants 2 messages Dec 23, 2025 – Dec 24, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 dpdk: upgrade 22.11.7 -> 25.11.0

From: Ruiqiang Hao <[email protected]>

Upgrade to DPDK 25.11 LTS release.

- Update SRCREV and branch references
- Update library path to pmds-26.0
- Remove dpdk-module
- Remove patches that are no longer needed in 25.11.0:
* 0001-Makefile-add-makefile.patch
* 0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch
- Set the cpu_instruction_set through EXTRA_OEMESON

---
 recipes-extended/dpdk/dpdk-module_22.11.7.bb  | 49 ------------
 .../dpdk/0001-Makefile-add-makefile.patch     | 75 -------------------
 ...d-mcpu-already-passed-by-Yocto-21.11.patch | 38 ----------
 .../dpdk/{dpdk_22.11.7.bb => dpdk_25.11.0.bb} | 23 +++---
 4 files changed, 13 insertions(+), 172 deletions(-)
 delete mode 100644 recipes-extended/dpdk/dpdk-module_22.11.7.bb
 delete mode 100644 recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch
 delete mode 100644 recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch
 rename recipes-extended/dpdk/{dpdk_22.11.7.bb => dpdk_25.11.0.bb} (72%)
recipes-extended/dpdk/dpdk-module_22.11.7.bb deleted +0 -49
deleted file mode 100644
index 1ce396c..0000000
@@ -1,49 +0,0 @@
-include dpdk.inc
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
-
-SRC_URI += " \
-            file://0001-Makefile-add-makefile.patch \
-"
-STABLE = "-stable"
-BRANCH = "22.11"
-SRCREV = "077a7044cc5b2533410f691c8db6fb4f6667b1ca"
-
-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}
-}
-
recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch deleted +0 -75

75 lines not on this page · raw message

recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch deleted +0 -38
deleted file mode 100644
index a74869d..0000000
@@ -1,38 +0,0 @@
-From 9aeb0bedf63f0f8f132194705b63ed0045452354 Mon Sep 17 00:00:00 2001
-From: Naveen Saini <[email protected]>
-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 <[email protected]>
----
- 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
-
recipes-extended/dpdk/dpdk_25.11.0.bb renamed from recipes-extended/dpdk/dpdk_22.11.7.bb +13 -10
similarity index 72%
rename from recipes-extended/dpdk/dpdk_22.11.7.bb
rename to recipes-extended/dpdk/dpdk_25.11.0.bb
index e69a2df..0978004 100644
@@ -1,17 +1,20 @@
 include dpdk.inc
 
-SRC_URI += " \
-            file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \
-"
+SRC_URI += " file://0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch"
 
 STABLE = "-stable"
-BRANCH = "22.11"
-SRCREV = "077a7044cc5b2533410f691c8db6fb4f6667b1ca"
+BRANCH = "25.11"
+SRCREV = "ed957165eadbe60a47d5ec223578cdd1c13d0bd9"
 
-# kernel module is provide by dpdk-module recipe, so disable here
-EXTRA_OEMESON = " -Denable_kmods=false \
-                -Dexamples=all \
-"
+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"
@@ -49,7 +52,7 @@ PACKAGES =+ "${PN}-examples ${PN}-tools"
 FILES:${PN} += " ${bindir}/dpdk-testpmd \
 		 ${bindir}/dpdk-proc-info \
 		 ${libdir}/*.so* \
-		 ${libdir}/dpdk/pmds-23.0/*.so* \
+		 ${libdir}/dpdk/pmds-26.0/*.so* \
 		 "
 FILES:${PN}-examples = " \
 	${prefix}/share/dpdk/examples/* \
Signature · 1 line
2.46.2
#1 lore raw

Thank you for the rework. I've merged this.

Quoted 254 lines · Ruiqiang Hao

From: Ruiqiang Hao <[email protected]>

Upgrade to DPDK 25.11 LTS release.

- Update SRCREV and branch references
- Update library path to pmds-26.0
- Remove dpdk-module
- Remove patches that are no longer needed in 25.11.0:
* 0001-Makefile-add-makefile.patch
* 0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch
- Set the cpu_instruction_set through EXTRA_OEMESON

---
 recipes-extended/dpdk/dpdk-module_22.11.7.bb  | 49 ------------
 .../dpdk/0001-Makefile-add-makefile.patch     | 75 -------------------
 ...d-mcpu-already-passed-by-Yocto-21.11.patch | 38 ----------
 .../dpdk/{dpdk_22.11.7.bb => dpdk_25.11.0.bb} | 23 +++---
 4 files changed, 13 insertions(+), 172 deletions(-)
 delete mode 100644 recipes-extended/dpdk/dpdk-module_22.11.7.bb
 delete mode 100644 recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch
 delete mode 100644 recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch
 rename recipes-extended/dpdk/{dpdk_22.11.7.bb => dpdk_25.11.0.bb} (72%)
recipes-extended/dpdk/dpdk-module_22.11.7.bb deleted +0 -49
deleted file mode 100644
index 1ce396c..0000000
@@ -1,49 +0,0 @@
-include dpdk.inc
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
-
-SRC_URI += " \
-            file://0001-Makefile-add-makefile.patch \
-"
-STABLE = "-stable"
-BRANCH = "22.11"
-SRCREV = "077a7044cc5b2533410f691c8db6fb4f6667b1ca"
-
-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}
-}
-
recipes-extended/dpdk/dpdk/0001-Makefile-add-makefile.patch deleted +0 -75
deleted file mode 100644
index 0fc849b..0000000
@@ -1,75 +0,0 @@
-From 768cef60957d5e840071d1d6514d4add3f3c2904 Mon Sep 17 00:00:00 2001
-From: Naveen Saini <[email protected]>
-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 <[email protected]>
----
- 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 <[email protected]>
--
--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
-
recipes-extended/dpdk/dpdk/0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch deleted +0 -38
deleted file mode 100644
index a74869d..0000000
@@ -1,38 +0,0 @@
-From 9aeb0bedf63f0f8f132194705b63ed0045452354 Mon Sep 17 00:00:00 2001
-From: Naveen Saini <[email protected]>
-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 <[email protected]>
----
- 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
-
recipes-extended/dpdk/dpdk_25.11.0.bb renamed from recipes-extended/dpdk/dpdk_22.11.7.bb +13 -11
similarity index 72%
rename from recipes-extended/dpdk/dpdk_22.11.7.bb
rename to recipes-extended/dpdk/dpdk_25.11.0.bb
index e69a2df..0978004 100644
@@ -1,17 +1,20 @@
 include dpdk.inc
 
-SRC_URI += " \
-            file://0001-meson.build-march-and-mcpu-already-passed-by-Yocto-21.11.patch \
-"
+SRC_URI += " file://0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch"
 
 STABLE = "-stable"
-BRANCH = "22.11"
-SRCREV = "077a7044cc5b2533410f691c8db6fb4f6667b1ca"
+BRANCH = "25.11"
+SRCREV = "ed957165eadbe60a47d5ec223578cdd1c13d0bd9"
 
-# kernel module is provide by dpdk-module recipe, so disable here
-EXTRA_OEMESON = " -Denable_kmods=false \
-                -Dexamples=all \
-"
+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"
@@ -49,7 +52,7 @@ PACKAGES =+ "${PN}-examples ${PN}-tools"
 FILES:${PN} += " ${bindir}/dpdk-testpmd \
                 ${bindir}/dpdk-proc-info \
                 ${libdir}/*.so* \
-                ${libdir}/dpdk/pmds-23.0/*.so* \
+                ${libdir}/dpdk/pmds-26.0/*.so* \
                 "
 FILES:${PN}-examples = " \
        ${prefix}/share/dpdk/examples/* \
--

2.46.2