From: KARN JYE LAU <karn.jye....@intel.com>

Kernel source have removed strlcpy() in 6.8 kernels and
above, update to fix kni compilation in scargapth.

Signed-off-by: KARN JYE LAU <karn.jye....@intel.com>
---
 recipes-extended/dpdk/dpdk-module_22.11.5.bb  |  2 ++
 ...fix-build-with-kernels-6.8-and-above.patch | 31 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 
recipes-extended/dpdk/dpdk/0001-kni-fix-build-with-kernels-6.8-and-above.patch

diff --git a/recipes-extended/dpdk/dpdk-module_22.11.5.bb 
b/recipes-extended/dpdk/dpdk-module_22.11.5.bb
index 6b45e21..43345ab 100644
--- a/recipes-extended/dpdk/dpdk-module_22.11.5.bb
+++ b/recipes-extended/dpdk/dpdk-module_22.11.5.bb
@@ -4,7 +4,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/dpdk:"
 
 SRC_URI += " \
             file://0001-Makefile-add-makefile.patch \
+            file://0001-kni-fix-build-with-kernels-6.8-and-above.patch \
 "
+
 STABLE = "-stable"
 BRANCH = "22.11"
 SRCREV = "dbd8f39c7c0fc66dfb49d2c6459bba20545c45d8"
diff --git 
a/recipes-extended/dpdk/dpdk/0001-kni-fix-build-with-kernels-6.8-and-above.patch
 
b/recipes-extended/dpdk/dpdk/0001-kni-fix-build-with-kernels-6.8-and-above.patch
new file mode 100644
index 0000000..42a43bc
--- /dev/null
+++ 
b/recipes-extended/dpdk/dpdk/0001-kni-fix-build-with-kernels-6.8-and-above.patch
@@ -0,0 +1,31 @@
+From 77b6e1a0edf2a9cbe095ddce68d3b1df3c717169 Mon Sep 17 00:00:00 2001
+From: KARN JYE LAU <karn.jye....@intel.com>
+Date: Fri, 22 Nov 2024 08:04:30 +0530
+Subject: [PATCH] kni: fix build with kernels 6.8 and above
+
+strlcpy() was removed in commit d26270061ae6 (string: Remove strlcpy()),
+use strscpy() instead.
+
+Upstream-Status: Backport
+[https://git.dpdk.org/dpdk-stable/commit/?h=22.11&id=15658afda05f50e69805b891ebb4d2d5c1966d44]
+
+Signed-off-by: KARN JYE LAU <karn.jye....@intel.com>
+---
+ kernel/linux/kni/kni_net.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
+index 779ee3451a..c115a728f0 100644
+--- a/kernel/linux/kni/kni_net.c
++++ b/kernel/linux/kni/kni_net.c
+@@ -832,8 +832,8 @@ static const struct net_device_ops kni_net_netdev_ops = {
+ static void kni_get_drvinfo(struct net_device *dev,
+                           struct ethtool_drvinfo *info)
+ {
+-      strlcpy(info->version, KNI_VERSION, sizeof(info->version));
+-      strlcpy(info->driver, "kni", sizeof(info->driver));
++      strscpy(info->version, KNI_VERSION, sizeof(info->version));
++      strscpy(info->driver, "kni", sizeof(info->driver));
+ }
+ 
+ static const struct ethtool_ops kni_net_ethtool_ops = {
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8450): 
https://lists.yoctoproject.org/g/meta-intel/message/8450
Mute This Topic: https://lists.yoctoproject.org/mt/109716800/21656
Group Owner: meta-intel+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to