DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/4] Linux Kernel uAPI headers import
@ 2025-04-16 12:34 Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 1/4] license: add exception for Linux Kernel uAPI headers Maxime Coquelin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Maxime Coquelin @ 2025-04-16 12:34 UTC (permalink / raw)
  To: dev, david.marchand, thomas; +Cc: Maxime Coquelin

This series documents the license exception granted by both
the technical and governing boards to import uAPI header
files.

It also imports VDUSE uAPI header file from Kernel v6.14.

David Marchand (1):
  ci: check licenses

Maxime Coquelin (3):
  license: add exception for Linux Kernel uAPI headers
  uapi: import VDUSE header from v6.14 kernel
  vhost: use imported VDUSE uAPI header

 .github/workflows/build.yml     |   1 +
 devtools/check-spdx-tag.sh      |   2 +-
 kernel/linux/uapi/linux/vduse.h | 353 ++++++++++++++++++++++++++++++++
 kernel/linux/uapi/version       |   2 +-
 lib/vhost/meson.build           |   5 +-
 lib/vhost/vduse.c               |   2 +-
 lib/vhost/vduse.h               |  22 --
 license/Linux-syscall-note      |  25 +++
 license/exceptions.txt          |  17 +-
 9 files changed, 392 insertions(+), 37 deletions(-)
 create mode 100644 kernel/linux/uapi/linux/vduse.h
 create mode 100644 license/Linux-syscall-note

-- 
2.49.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] license: add exception for Linux Kernel uAPI headers
  2025-04-16 12:34 [PATCH 0/4] Linux Kernel uAPI headers import Maxime Coquelin
@ 2025-04-16 12:34 ` Maxime Coquelin
  2025-04-17  5:08   ` Hemant Agrawal
  2025-04-16 12:34 ` [PATCH 2/4] uapi: import VDUSE header from v6.14 kernel Maxime Coquelin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Maxime Coquelin @ 2025-04-16 12:34 UTC (permalink / raw)
  To: dev, david.marchand, thomas; +Cc: Maxime Coquelin

As approved by both Technical and Governing boards, Linux
Kernel uAPI header files can now be imported into the
kernel/linux/uapi directory.

This patch also fix the SPDX tags checker script to take
into account dual-licensed files.

The process to import such headers is documented in
doc/guides/contributing/linux_uapi.rst

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 devtools/check-spdx-tag.sh |  2 +-
 license/Linux-syscall-note | 25 +++++++++++++++++++++++++
 license/exceptions.txt     | 17 +++++++++--------
 3 files changed, 35 insertions(+), 9 deletions(-)
 create mode 100644 license/Linux-syscall-note

diff --git a/devtools/check-spdx-tag.sh b/devtools/check-spdx-tag.sh
index 1fd0d579d3..984825026e 100755
--- a/devtools/check-spdx-tag.sh
+++ b/devtools/check-spdx-tag.sh
@@ -48,7 +48,7 @@ check_licenses() {
     fi
     exceptions=$(build_exceptions_list)
     git grep -l SPDX-License-Identifier: -- $no_license_list $exceptions |
-    xargs grep -L -E 'SPDX-License-Identifier:[[:space:]]*\(?BSD-3-Clause' > $tmpfile
+    xargs grep -L -E 'SPDX-License-Identifier:[[:space:]]*(\(?|.* OR )BSD-3-Clause' > $tmpfile
 
     wrong_license=$(wc -l < $tmpfile)
     $quiet || cat $tmpfile
diff --git a/license/Linux-syscall-note b/license/Linux-syscall-note
new file mode 100644
index 0000000000..9abdad71fa
--- /dev/null
+++ b/license/Linux-syscall-note
@@ -0,0 +1,25 @@
+SPDX-Exception-Identifier: Linux-syscall-note
+SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html
+SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+, GPL-2.0-only, GPL-2.0-or-later
+Usage-Guide:
+  This exception is used together with one of the above SPDX-Licenses
+  to mark user space API (uapi) header files so they can be included
+  into non GPL compliant user space application code.
+  To use this exception add it with the keyword WITH to one of the
+  identifiers in the SPDX-Licenses tag:
+    SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note
+License-Text:
+
+   NOTE! This copyright does *not* cover user programs that use kernel
+ services by normal system calls - this is merely considered normal use
+ of the kernel, and does *not* fall under the heading of "derived work".
+ Also note that the GPL below is copyrighted by the Free Software
+ Foundation, but the instance of code that it refers to (the Linux
+ kernel) is copyrighted by me and others who actually wrote it.
+
+ Also note that the only valid version of the GPL as far as the kernel
+ is concerned is _this_ particular version of the license (ie v2, not
+ v2.2 or v3.x or whatever), unless explicitly otherwise stated.
+
+			Linus Torvalds
+
diff --git a/license/exceptions.txt b/license/exceptions.txt
index d12fac2034..cf2034747d 100644
--- a/license/exceptions.txt
+++ b/license/exceptions.txt
@@ -9,11 +9,12 @@ Note that following licenses are not exceptions:-
 	- BSD-3-Clause OR LGPL-2.1
 	- GPL-2.0  (*Only for kernel code*)
 
----------------------------------------------------------------------------------------------------
-SPDX Identifier      | TB Approval Date | GB Approval Date | File name
----------------------------------------------------------------------------------------------------
-MIT                  | 10/23/2019       | 02/10/2020       | lib/eal/windows/include/dirent.h
-BSD-2-Clause         | 10/23/2019       | 12/18/2019       | lib/eal/windows/include/getopt.h
-ISC AND BSD-2-Clause | 10/23/2019       | 12/18/2019       | lib/eal/windows/getopt.c
-MIT                  | 10/19/2022       | 10/18/2022       | drivers/net/gve/base/*
----------------------------------------------------------------------------------------------------
+---------------------------------------------------------------------------------------------------------
+SPDX Identifier                 | TB Approval Date | GB Approval Date | File name
+---------------------------------------------------------------------------------------------------------
+MIT                             | 10/23/2019       | 02/10/2020       | lib/eal/windows/include/dirent.h
+BSD-2-Clause                    | 10/23/2019       | 12/18/2019       | lib/eal/windows/include/getopt.h
+ISC AND BSD-2-Clause            | 10/23/2019       | 12/18/2019       | lib/eal/windows/getopt.c
+MIT                             | 10/19/2022       | 10/18/2022       | drivers/net/gve/base/*
+GPL-2.0 WITH Linux-syscall-note | 12/11/2024       | 04/14/2025       | kernel/linux/uapi/linux/*
+---------------------------------------------------------------------------------------------------------
-- 
2.49.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/4] uapi: import VDUSE header from v6.14 kernel
  2025-04-16 12:34 [PATCH 0/4] Linux Kernel uAPI headers import Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 1/4] license: add exception for Linux Kernel uAPI headers Maxime Coquelin
@ 2025-04-16 12:34 ` Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 3/4] vhost: use imported VDUSE uAPI header Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 4/4] ci: check licenses Maxime Coquelin
  3 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2025-04-16 12:34 UTC (permalink / raw)
  To: dev, david.marchand, thomas; +Cc: Maxime Coquelin

This header will be used by the Vhost library.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 kernel/linux/uapi/linux/vduse.h | 353 ++++++++++++++++++++++++++++++++
 kernel/linux/uapi/version       |   2 +-
 2 files changed, 354 insertions(+), 1 deletion(-)
 create mode 100644 kernel/linux/uapi/linux/vduse.h

diff --git a/kernel/linux/uapi/linux/vduse.h b/kernel/linux/uapi/linux/vduse.h
new file mode 100644
index 0000000000..68a627d04a
--- /dev/null
+++ b/kernel/linux/uapi/linux/vduse.h
@@ -0,0 +1,353 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+#ifndef _UAPI_VDUSE_H_
+#define _UAPI_VDUSE_H_
+
+#include <linux/types.h>
+
+#define VDUSE_BASE	0x81
+
+/* The ioctls for control device (/dev/vduse/control) */
+
+#define VDUSE_API_VERSION	0
+
+/*
+ * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION).
+ * This is used for future extension.
+ */
+#define VDUSE_GET_API_VERSION	_IOR(VDUSE_BASE, 0x00, __u64)
+
+/* Set the version of VDUSE API that userspace supported. */
+#define VDUSE_SET_API_VERSION	_IOW(VDUSE_BASE, 0x01, __u64)
+
+/**
+ * struct vduse_dev_config - basic configuration of a VDUSE device
+ * @name: VDUSE device name, needs to be NUL terminated
+ * @vendor_id: virtio vendor id
+ * @device_id: virtio device id
+ * @features: virtio features
+ * @vq_num: the number of virtqueues
+ * @vq_align: the allocation alignment of virtqueue's metadata
+ * @reserved: for future use, needs to be initialized to zero
+ * @config_size: the size of the configuration space
+ * @config: the buffer of the configuration space
+ *
+ * Structure used by VDUSE_CREATE_DEV ioctl to create VDUSE device.
+ */
+struct vduse_dev_config {
+#define VDUSE_NAME_MAX	256
+	char name[VDUSE_NAME_MAX];
+	__u32 vendor_id;
+	__u32 device_id;
+	__u64 features;
+	__u32 vq_num;
+	__u32 vq_align;
+	__u32 reserved[13];
+	__u32 config_size;
+	__u8 config[];
+};
+
+/* Create a VDUSE device which is represented by a char device (/dev/vduse/$NAME) */
+#define VDUSE_CREATE_DEV	_IOW(VDUSE_BASE, 0x02, struct vduse_dev_config)
+
+/*
+ * Destroy a VDUSE device. Make sure there are no more references
+ * to the char device (/dev/vduse/$NAME).
+ */
+#define VDUSE_DESTROY_DEV	_IOW(VDUSE_BASE, 0x03, char[VDUSE_NAME_MAX])
+
+/* The ioctls for VDUSE device (/dev/vduse/$NAME) */
+
+/**
+ * struct vduse_iotlb_entry - entry of IOTLB to describe one IOVA region [start, last]
+ * @offset: the mmap offset on returned file descriptor
+ * @start: start of the IOVA region
+ * @last: last of the IOVA region
+ * @perm: access permission of the IOVA region
+ *
+ * Structure used by VDUSE_IOTLB_GET_FD ioctl to find an overlapped IOVA region.
+ */
+struct vduse_iotlb_entry {
+	__u64 offset;
+	__u64 start;
+	__u64 last;
+#define VDUSE_ACCESS_RO 0x1
+#define VDUSE_ACCESS_WO 0x2
+#define VDUSE_ACCESS_RW 0x3
+	__u8 perm;
+};
+
+/*
+ * Find the first IOVA region that overlaps with the range [start, last]
+ * and return the corresponding file descriptor. Return -EINVAL means the
+ * IOVA region doesn't exist. Caller should set start and last fields.
+ */
+#define VDUSE_IOTLB_GET_FD	_IOWR(VDUSE_BASE, 0x10, struct vduse_iotlb_entry)
+
+/*
+ * Get the negotiated virtio features. It's a subset of the features in
+ * struct vduse_dev_config which can be accepted by virtio driver. It's
+ * only valid after FEATURES_OK status bit is set.
+ */
+#define VDUSE_DEV_GET_FEATURES	_IOR(VDUSE_BASE, 0x11, __u64)
+
+/**
+ * struct vduse_config_data - data used to update configuration space
+ * @offset: the offset from the beginning of configuration space
+ * @length: the length to write to configuration space
+ * @buffer: the buffer used to write from
+ *
+ * Structure used by VDUSE_DEV_SET_CONFIG ioctl to update device
+ * configuration space.
+ */
+struct vduse_config_data {
+	__u32 offset;
+	__u32 length;
+	__u8 buffer[];
+};
+
+/* Set device configuration space */
+#define VDUSE_DEV_SET_CONFIG	_IOW(VDUSE_BASE, 0x12, struct vduse_config_data)
+
+/*
+ * Inject a config interrupt. It's usually used to notify virtio driver
+ * that device configuration space has changed.
+ */
+#define VDUSE_DEV_INJECT_CONFIG_IRQ	_IO(VDUSE_BASE, 0x13)
+
+/**
+ * struct vduse_vq_config - basic configuration of a virtqueue
+ * @index: virtqueue index
+ * @max_size: the max size of virtqueue
+ * @reserved: for future use, needs to be initialized to zero
+ *
+ * Structure used by VDUSE_VQ_SETUP ioctl to setup a virtqueue.
+ */
+struct vduse_vq_config {
+	__u32 index;
+	__u16 max_size;
+	__u16 reserved[13];
+};
+
+/*
+ * Setup the specified virtqueue. Make sure all virtqueues have been
+ * configured before the device is attached to vDPA bus.
+ */
+#define VDUSE_VQ_SETUP		_IOW(VDUSE_BASE, 0x14, struct vduse_vq_config)
+
+/**
+ * struct vduse_vq_state_split - split virtqueue state
+ * @avail_index: available index
+ */
+struct vduse_vq_state_split {
+	__u16 avail_index;
+};
+
+/**
+ * struct vduse_vq_state_packed - packed virtqueue state
+ * @last_avail_counter: last driver ring wrap counter observed by device
+ * @last_avail_idx: device available index
+ * @last_used_counter: device ring wrap counter
+ * @last_used_idx: used index
+ */
+struct vduse_vq_state_packed {
+	__u16 last_avail_counter;
+	__u16 last_avail_idx;
+	__u16 last_used_counter;
+	__u16 last_used_idx;
+};
+
+/**
+ * struct vduse_vq_info - information of a virtqueue
+ * @index: virtqueue index
+ * @num: the size of virtqueue
+ * @desc_addr: address of desc area
+ * @driver_addr: address of driver area
+ * @device_addr: address of device area
+ * @split: split virtqueue state
+ * @packed: packed virtqueue state
+ * @ready: ready status of virtqueue
+ *
+ * Structure used by VDUSE_VQ_GET_INFO ioctl to get virtqueue's information.
+ */
+struct vduse_vq_info {
+	__u32 index;
+	__u32 num;
+	__u64 desc_addr;
+	__u64 driver_addr;
+	__u64 device_addr;
+	union {
+		struct vduse_vq_state_split split;
+		struct vduse_vq_state_packed packed;
+	};
+	__u8 ready;
+};
+
+/* Get the specified virtqueue's information. Caller should set index field. */
+#define VDUSE_VQ_GET_INFO	_IOWR(VDUSE_BASE, 0x15, struct vduse_vq_info)
+
+/**
+ * struct vduse_vq_eventfd - eventfd configuration for a virtqueue
+ * @index: virtqueue index
+ * @fd: eventfd, -1 means de-assigning the eventfd
+ *
+ * Structure used by VDUSE_VQ_SETUP_KICKFD ioctl to setup kick eventfd.
+ */
+struct vduse_vq_eventfd {
+	__u32 index;
+#define VDUSE_EVENTFD_DEASSIGN -1
+	int fd;
+};
+
+/*
+ * Setup kick eventfd for specified virtqueue. The kick eventfd is used
+ * by VDUSE kernel module to notify userspace to consume the avail vring.
+ */
+#define VDUSE_VQ_SETUP_KICKFD	_IOW(VDUSE_BASE, 0x16, struct vduse_vq_eventfd)
+
+/*
+ * Inject an interrupt for specific virtqueue. It's used to notify virtio driver
+ * to consume the used vring.
+ */
+#define VDUSE_VQ_INJECT_IRQ	_IOW(VDUSE_BASE, 0x17, __u32)
+
+/**
+ * struct vduse_iova_umem - userspace memory configuration for one IOVA region
+ * @uaddr: start address of userspace memory, it must be aligned to page size
+ * @iova: start of the IOVA region
+ * @size: size of the IOVA region
+ * @reserved: for future use, needs to be initialized to zero
+ *
+ * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM
+ * ioctls to register/de-register userspace memory for IOVA regions
+ */
+struct vduse_iova_umem {
+	__u64 uaddr;
+	__u64 iova;
+	__u64 size;
+	__u64 reserved[3];
+};
+
+/* Register userspace memory for IOVA regions */
+#define VDUSE_IOTLB_REG_UMEM	_IOW(VDUSE_BASE, 0x18, struct vduse_iova_umem)
+
+/* De-register the userspace memory. Caller should set iova and size field. */
+#define VDUSE_IOTLB_DEREG_UMEM	_IOW(VDUSE_BASE, 0x19, struct vduse_iova_umem)
+
+/**
+ * struct vduse_iova_info - information of one IOVA region
+ * @start: start of the IOVA region
+ * @last: last of the IOVA region
+ * @capability: capability of the IOVA regsion
+ * @reserved: for future use, needs to be initialized to zero
+ *
+ * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of
+ * one IOVA region.
+ */
+struct vduse_iova_info {
+	__u64 start;
+	__u64 last;
+#define VDUSE_IOVA_CAP_UMEM (1 << 0)
+	__u64 capability;
+	__u64 reserved[3];
+};
+
+/*
+ * Find the first IOVA region that overlaps with the range [start, last]
+ * and return some information on it. Caller should set start and last fields.
+ */
+#define VDUSE_IOTLB_GET_INFO	_IOWR(VDUSE_BASE, 0x1a, struct vduse_iova_info)
+
+/* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */
+
+/**
+ * enum vduse_req_type - request type
+ * @VDUSE_GET_VQ_STATE: get the state for specified virtqueue from userspace
+ * @VDUSE_SET_STATUS: set the device status
+ * @VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping for
+ *                      specified IOVA range via VDUSE_IOTLB_GET_FD ioctl
+ */
+enum vduse_req_type {
+	VDUSE_GET_VQ_STATE,
+	VDUSE_SET_STATUS,
+	VDUSE_UPDATE_IOTLB,
+};
+
+/**
+ * struct vduse_vq_state - virtqueue state
+ * @index: virtqueue index
+ * @split: split virtqueue state
+ * @packed: packed virtqueue state
+ */
+struct vduse_vq_state {
+	__u32 index;
+	union {
+		struct vduse_vq_state_split split;
+		struct vduse_vq_state_packed packed;
+	};
+};
+
+/**
+ * struct vduse_dev_status - device status
+ * @status: device status
+ */
+struct vduse_dev_status {
+	__u8 status;
+};
+
+/**
+ * struct vduse_iova_range - IOVA range [start, last]
+ * @start: start of the IOVA range
+ * @last: last of the IOVA range
+ */
+struct vduse_iova_range {
+	__u64 start;
+	__u64 last;
+};
+
+/**
+ * struct vduse_dev_request - control request
+ * @type: request type
+ * @request_id: request id
+ * @reserved: for future use
+ * @vq_state: virtqueue state, only index field is available
+ * @s: device status
+ * @iova: IOVA range for updating
+ * @padding: padding
+ *
+ * Structure used by read(2) on /dev/vduse/$NAME.
+ */
+struct vduse_dev_request {
+	__u32 type;
+	__u32 request_id;
+	__u32 reserved[4];
+	union {
+		struct vduse_vq_state vq_state;
+		struct vduse_dev_status s;
+		struct vduse_iova_range iova;
+		__u32 padding[32];
+	};
+};
+
+/**
+ * struct vduse_dev_response - response to control request
+ * @request_id: corresponding request id
+ * @result: the result of request
+ * @reserved: for future use, needs to be initialized to zero
+ * @vq_state: virtqueue state
+ * @padding: padding
+ *
+ * Structure used by write(2) on /dev/vduse/$NAME.
+ */
+struct vduse_dev_response {
+	__u32 request_id;
+#define VDUSE_REQ_RESULT_OK	0x00
+#define VDUSE_REQ_RESULT_FAILED	0x01
+	__u32 result;
+	__u32 reserved[4];
+	union {
+		struct vduse_vq_state vq_state;
+		__u32 padding[32];
+	};
+};
+
+#endif /* _UAPI_VDUSE_H_ */
diff --git a/kernel/linux/uapi/version b/kernel/linux/uapi/version
index d06407735c..3c68968f92 100644
--- a/kernel/linux/uapi/version
+++ b/kernel/linux/uapi/version
@@ -1 +1 @@
-v6.10
+v6.14
-- 
2.49.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/4] vhost: use imported VDUSE uAPI header
  2025-04-16 12:34 [PATCH 0/4] Linux Kernel uAPI headers import Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 1/4] license: add exception for Linux Kernel uAPI headers Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 2/4] uapi: import VDUSE header from v6.14 kernel Maxime Coquelin
@ 2025-04-16 12:34 ` Maxime Coquelin
  2025-04-16 12:34 ` [PATCH 4/4] ci: check licenses Maxime Coquelin
  3 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2025-04-16 12:34 UTC (permalink / raw)
  To: dev, david.marchand, thomas; +Cc: Maxime Coquelin

This patch makes use of the imported VDUSE uAPI header, and
remove VDUSE build dependency on the presence of the VDUSE
header on the system.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/meson.build |  5 +----
 lib/vhost/vduse.c     |  2 +-
 lib/vhost/vduse.h     | 22 ----------------------
 3 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/lib/vhost/meson.build b/lib/vhost/meson.build
index 33773b6d21..9c6325aa0e 100644
--- a/lib/vhost/meson.build
+++ b/lib/vhost/meson.build
@@ -33,16 +33,13 @@ sources = files(
         'iotlb.c',
         'socket.c',
         'vdpa.c',
+        'vduse.c',
         'vhost.c',
         'vhost_crypto.c',
         'vhost_user.c',
         'virtio_net.c',
         'virtio_net_ctrl.c',
 )
-if cc.has_header('linux/vduse.h')
-    sources += files('vduse.c')
-    cflags += '-DVHOST_HAS_VDUSE'
-endif
 headers = files(
         'rte_vdpa.h',
         'rte_vhost.h',
diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c
index 801674be42..a2a7d73388 100644
--- a/lib/vhost/vduse.c
+++ b/lib/vhost/vduse.c
@@ -8,7 +8,7 @@
 #include <fcntl.h>
 
 
-#include <linux/vduse.h>
+#include <uapi/linux/vduse.h>
 #include <linux/virtio_net.h>
 
 #include <sys/ioctl.h>
diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h
index 0d8f3f1205..47ca97a064 100644
--- a/lib/vhost/vduse.h
+++ b/lib/vhost/vduse.h
@@ -9,29 +9,7 @@
 
 #define VDUSE_NET_SUPPORTED_FEATURES VIRTIO_NET_SUPPORTED_FEATURES
 
-#ifdef VHOST_HAS_VDUSE
-
 int vduse_device_create(const char *path, bool compliant_ol_flags);
 int vduse_device_destroy(const char *path);
 
-#else
-
-static inline int
-vduse_device_create(const char *path, bool compliant_ol_flags)
-{
-	RTE_SET_USED(compliant_ol_flags);
-
-	VHOST_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");
-	return -1;
-}
-
-static inline int
-vduse_device_destroy(const char *path)
-{
-	VHOST_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");
-	return -1;
-}
-
-#endif /* VHOST_HAS_VDUSE */
-
 #endif /* _VDUSE_H */
-- 
2.49.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/4] ci: check licenses
  2025-04-16 12:34 [PATCH 0/4] Linux Kernel uAPI headers import Maxime Coquelin
                   ` (2 preceding siblings ...)
  2025-04-16 12:34 ` [PATCH 3/4] vhost: use imported VDUSE uAPI header Maxime Coquelin
@ 2025-04-16 12:34 ` Maxime Coquelin
  2025-04-16 18:59   ` Maxime Coquelin
  3 siblings, 1 reply; 7+ messages in thread
From: Maxime Coquelin @ 2025-04-16 12:34 UTC (permalink / raw)
  To: dev, david.marchand, thomas; +Cc: Aaron Conole

From: David Marchand <david.marchand@redhat.com>

Call check-spdx.tag.sh so that all committed files are checked.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .github/workflows/build.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7a6b679fe5..1e289979e3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -31,6 +31,7 @@ jobs:
         failed=
         devtools/check-doc-vs-code.sh upstream/${{ env.REF_GIT_BRANCH }} || failed=true
         devtools/check-meson.py || failed=true
+        devtools/check-spdx-tag.sh || failed=true
         [ -z "$failed" ]
   ubuntu-vm-builds:
     name: ${{ join(matrix.config.*, '-') }}
-- 
2.49.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/4] ci: check licenses
  2025-04-16 12:34 ` [PATCH 4/4] ci: check licenses Maxime Coquelin
@ 2025-04-16 18:59   ` Maxime Coquelin
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2025-04-16 18:59 UTC (permalink / raw)
  To: dev, david.marchand, thomas; +Cc: Aaron Conole



On 4/16/25 2:34 PM, Maxime Coquelin wrote:
> From: David Marchand <david.marchand@redhat.com>
> 
> Call check-spdx.tag.sh so that all committed files are checked.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Aaron Conole <aconole@redhat.com>
> ---
>   .github/workflows/build.yml | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
> index 7a6b679fe5..1e289979e3 100644
> --- a/.github/workflows/build.yml
> +++ b/.github/workflows/build.yml
> @@ -31,6 +31,7 @@ jobs:
>           failed=
>           devtools/check-doc-vs-code.sh upstream/${{ env.REF_GIT_BRANCH }} || failed=true
>           devtools/check-meson.py || failed=true
> +        devtools/check-spdx-tag.sh || failed=true
>           [ -z "$failed" ]
>     ubuntu-vm-builds:
>       name: ${{ join(matrix.config.*, '-') }}

Please ignore this patch, I used it for testing purpose and missed to
remove it before posting.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/4] license: add exception for Linux Kernel uAPI headers
  2025-04-16 12:34 ` [PATCH 1/4] license: add exception for Linux Kernel uAPI headers Maxime Coquelin
@ 2025-04-17  5:08   ` Hemant Agrawal
  0 siblings, 0 replies; 7+ messages in thread
From: Hemant Agrawal @ 2025-04-17  5:08 UTC (permalink / raw)
  To: Maxime Coquelin, dev, david.marchand, thomas


On 16-04-2025 18:04, Maxime Coquelin wrote:
> As approved by both Technical and Governing boards, Linux
> Kernel uAPI header files can now be imported into the
> kernel/linux/uapi directory.
>
> This patch also fix the SPDX tags checker script to take
> into account dual-licensed files.
>
> The process to import such headers is documented in
> doc/guides/contributing/linux_uapi.rst
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>   devtools/check-spdx-tag.sh |  2 +-
>   license/Linux-syscall-note | 25 +++++++++++++++++++++++++
>   license/exceptions.txt     | 17 +++++++++--------
>   3 files changed, 35 insertions(+), 9 deletions(-)
>   create mode 100644 license/Linux-syscall-note
>
> diff --git a/devtools/check-spdx-tag.sh b/devtools/check-spdx-tag.sh
> index 1fd0d579d3..984825026e 100755
> --- a/devtools/check-spdx-tag.sh
> +++ b/devtools/check-spdx-tag.sh
> @@ -48,7 +48,7 @@ check_licenses() {
>       fi
>       exceptions=$(build_exceptions_list)
>       git grep -l SPDX-License-Identifier: -- $no_license_list $exceptions |
> -    xargs grep -L -E 'SPDX-License-Identifier:[[:space:]]*\(?BSD-3-Clause' > $tmpfile
> +    xargs grep -L -E 'SPDX-License-Identifier:[[:space:]]*(\(?|.* OR )BSD-3-Clause' > $tmpfile
>   
>       wrong_license=$(wc -l < $tmpfile)
>       $quiet || cat $tmpfile
> diff --git a/license/Linux-syscall-note b/license/Linux-syscall-note
> new file mode 100644
> index 0000000000..9abdad71fa
> --- /dev/null
> +++ b/license/Linux-syscall-note
> @@ -0,0 +1,25 @@
> +SPDX-Exception-Identifier: Linux-syscall-note
> +SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html
> +SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+, GPL-2.0-only, GPL-2.0-or-later
> +Usage-Guide:
> +  This exception is used together with one of the above SPDX-Licenses
> +  to mark user space API (uapi) header files so they can be included
> +  into non GPL compliant user space application code.
> +  To use this exception add it with the keyword WITH to one of the
> +  identifiers in the SPDX-Licenses tag:
> +    SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note
> +License-Text:
> +
> +   NOTE! This copyright does *not* cover user programs that use kernel
> + services by normal system calls - this is merely considered normal use
> + of the kernel, and does *not* fall under the heading of "derived work".
> + Also note that the GPL below is copyrighted by the Free Software
> + Foundation, but the instance of code that it refers to (the Linux
> + kernel) is copyrighted by me and others who actually wrote it.
> +
> + Also note that the only valid version of the GPL as far as the kernel
> + is concerned is _this_ particular version of the license (ie v2, not
> + v2.2 or v3.x or whatever), unless explicitly otherwise stated.
> +
> +			Linus Torvalds
> +
> diff --git a/license/exceptions.txt b/license/exceptions.txt
> index d12fac2034..cf2034747d 100644
> --- a/license/exceptions.txt
> +++ b/license/exceptions.txt
> @@ -9,11 +9,12 @@ Note that following licenses are not exceptions:-
>   	- BSD-3-Clause OR LGPL-2.1
>   	- GPL-2.0  (*Only for kernel code*)
>   
> ----------------------------------------------------------------------------------------------------
> -SPDX Identifier      | TB Approval Date | GB Approval Date | File name
> ----------------------------------------------------------------------------------------------------
> -MIT                  | 10/23/2019       | 02/10/2020       | lib/eal/windows/include/dirent.h
> -BSD-2-Clause         | 10/23/2019       | 12/18/2019       | lib/eal/windows/include/getopt.h
> -ISC AND BSD-2-Clause | 10/23/2019       | 12/18/2019       | lib/eal/windows/getopt.c
> -MIT                  | 10/19/2022       | 10/18/2022       | drivers/net/gve/base/*
> ----------------------------------------------------------------------------------------------------
> +---------------------------------------------------------------------------------------------------------
> +SPDX Identifier                 | TB Approval Date | GB Approval Date | File name
> +---------------------------------------------------------------------------------------------------------
> +MIT                             | 10/23/2019       | 02/10/2020       | lib/eal/windows/include/dirent.h
> +BSD-2-Clause                    | 10/23/2019       | 12/18/2019       | lib/eal/windows/include/getopt.h
> +ISC AND BSD-2-Clause            | 10/23/2019       | 12/18/2019       | lib/eal/windows/getopt.c
> +MIT                             | 10/19/2022       | 10/18/2022       | drivers/net/gve/base/*
> +GPL-2.0 WITH Linux-syscall-note | 12/11/2024       | 04/14/2025       | kernel/linux/uapi/linux/*
> +---------------------------------------------------------------------------------------------------------

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-04-17  5:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-16 12:34 [PATCH 0/4] Linux Kernel uAPI headers import Maxime Coquelin
2025-04-16 12:34 ` [PATCH 1/4] license: add exception for Linux Kernel uAPI headers Maxime Coquelin
2025-04-17  5:08   ` Hemant Agrawal
2025-04-16 12:34 ` [PATCH 2/4] uapi: import VDUSE header from v6.14 kernel Maxime Coquelin
2025-04-16 12:34 ` [PATCH 3/4] vhost: use imported VDUSE uAPI header Maxime Coquelin
2025-04-16 12:34 ` [PATCH 4/4] ci: check licenses Maxime Coquelin
2025-04-16 18:59   ` Maxime Coquelin

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).