* [PATCH 0/2] uapi: script and header update
@ 2025-06-10 15:11 Stephen Hemminger
2025-06-10 15:11 ` [PATCH 1/2] devtools/linux-uapi: conform to kernel headers install Stephen Hemminger
2025-06-10 15:11 ` [PATCH 2/2] uapi: update headers to 6.15 kernel Stephen Hemminger
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Hemminger @ 2025-06-10 15:11 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Make the script do what "make headers install" does and
update existing headers.
Stephen Hemminger (2):
devtools/linux-uapi: conform to kernel headers install
uapi: update headers to 6.15 kernel
devtools/linux-uapi.sh | 16 ++++++++++++++--
kernel/linux/uapi/linux/vduse.h | 6 +++---
kernel/linux/uapi/version | 2 +-
3 files changed, 18 insertions(+), 6 deletions(-)
--
2.47.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] devtools/linux-uapi: conform to kernel headers install
2025-06-10 15:11 [PATCH 0/2] uapi: script and header update Stephen Hemminger
@ 2025-06-10 15:11 ` Stephen Hemminger
2025-06-10 15:11 ` [PATCH 2/2] uapi: update headers to 6.15 kernel Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2025-06-10 15:11 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The Linux kernel has an existing script to sanitize headers which
uses more steps to clean up the header file. Make the DPDK header
import script use the same regular expression. The kernel script
is GPL-2.0 so ok.
Not necessary for current vduse.h header only but useful if more
headers are added later. Want the distro and DPDK header to
be exact match.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
devtools/linux-uapi.sh | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/devtools/linux-uapi.sh b/devtools/linux-uapi.sh
index ccd8b6816e..e739bdb1f4 100755
--- a/devtools/linux-uapi.sh
+++ b/devtools/linux-uapi.sh
@@ -79,9 +79,21 @@ import_header()
fixup_includes()
{
local path=$1
+ local tmpfile=$path.tmp
- sed -i "s|^#include <linux/compiler.h>||g" $path
- sed -i "s|\<__user[[:space:]]||" $path
+ # script to sanitize see kernel script
+ # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/headers_install.sh
+
+ sed -E -e '
+ s/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g
+ s/__attribute_const__([[:space:]]|$)/\1/g
+ s@^#include <linux/compiler(|_types).h>@@
+ s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g
+ s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g
+ s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @' $path >$tmpfile
+
+ unifdef -U__KERNEL__ -D__EXPORTED_HEADERS $tmpfile >$path
+ rm $tmpfile
# Prepend include path with "uapi/" if the header is imported
for include in $(sed -ne 's/^#include <\(.*\)>$/\1/p' $path); do
--
2.47.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] uapi: update headers to 6.15 kernel
2025-06-10 15:11 [PATCH 0/2] uapi: script and header update Stephen Hemminger
2025-06-10 15:11 ` [PATCH 1/2] devtools/linux-uapi: conform to kernel headers install Stephen Hemminger
@ 2025-06-10 15:11 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2025-06-10 15:11 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The header contents does not change, but version and wrapper
ifdef does change.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
kernel/linux/uapi/linux/vduse.h | 6 +++---
kernel/linux/uapi/version | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/linux/uapi/linux/vduse.h b/kernel/linux/uapi/linux/vduse.h
index 68a627d04a..f46269af34 100644
--- a/kernel/linux/uapi/linux/vduse.h
+++ b/kernel/linux/uapi/linux/vduse.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
-#ifndef _UAPI_VDUSE_H_
-#define _UAPI_VDUSE_H_
+#ifndef _VDUSE_H_
+#define _VDUSE_H_
#include <linux/types.h>
@@ -350,4 +350,4 @@ struct vduse_dev_response {
};
};
-#endif /* _UAPI_VDUSE_H_ */
+#endif /* _VDUSE_H_ */
diff --git a/kernel/linux/uapi/version b/kernel/linux/uapi/version
index 3c68968f92..ca6d638260 100644
--- a/kernel/linux/uapi/version
+++ b/kernel/linux/uapi/version
@@ -1 +1 @@
-v6.14
+v6.15
--
2.47.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-10 15:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-10 15:11 [PATCH 0/2] uapi: script and header update Stephen Hemminger
2025-06-10 15:11 ` [PATCH 1/2] devtools/linux-uapi: conform to kernel headers install Stephen Hemminger
2025-06-10 15:11 ` [PATCH 2/2] uapi: update headers to 6.15 kernel Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).