aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/linux-headers/linux/vhost.h
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-11-11 02:21:37 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-11-11 02:40:39 +0300
commitc9eb66546bc5c72ff6a4424f5c73ada67d0aeaa8 (patch)
tree4a18f83f5979766f6a360805a97500e9b2beeb75 /contrib/libs/linux-headers/linux/vhost.h
parent638336990198a7f36d43cfd21a42b25d9dcb6efc (diff)
downloadydb-c9eb66546bc5c72ff6a4424f5c73ada67d0aeaa8.tar.gz
Update contrib/libs/linux-headers to 6.5.9
Diffstat (limited to 'contrib/libs/linux-headers/linux/vhost.h')
-rw-r--r--contrib/libs/linux-headers/linux/vhost.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/libs/linux-headers/linux/vhost.h b/contrib/libs/linux-headers/linux/vhost.h
index 92e1b700b5..f5c48b61ab 100644
--- a/contrib/libs/linux-headers/linux/vhost.h
+++ b/contrib/libs/linux-headers/linux/vhost.h
@@ -45,6 +45,25 @@
#define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64)
/* Specify an eventfd file descriptor to signal on log write. */
#define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int)
+/* By default, a device gets one vhost_worker that its virtqueues share. This
+ * command allows the owner of the device to create an additional vhost_worker
+ * for the device. It can later be bound to 1 or more of its virtqueues using
+ * the VHOST_ATTACH_VRING_WORKER command.
+ *
+ * This must be called after VHOST_SET_OWNER and the caller must be the owner
+ * of the device. The new thread will inherit caller's cgroups and namespaces,
+ * and will share the caller's memory space. The new thread will also be
+ * counted against the caller's RLIMIT_NPROC value.
+ *
+ * The worker's ID used in other commands will be returned in
+ * vhost_worker_state.
+ */
+#define VHOST_NEW_WORKER _IOR(VHOST_VIRTIO, 0x8, struct vhost_worker_state)
+/* Free a worker created with VHOST_NEW_WORKER if it's not attached to any
+ * virtqueue. If userspace is not able to call this for workers its created,
+ * the kernel will free all the device's workers when the device is closed.
+ */
+#define VHOST_FREE_WORKER _IOW(VHOST_VIRTIO, 0x9, struct vhost_worker_state)
/* Ring setup. */
/* Set number of descriptors in ring. This parameter can not
@@ -70,6 +89,18 @@
#define VHOST_VRING_BIG_ENDIAN 1
#define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state)
#define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state)
+/* Attach a vhost_worker created with VHOST_NEW_WORKER to one of the device's
+ * virtqueues.
+ *
+ * This will replace the virtqueue's existing worker. If the replaced worker
+ * is no longer attached to any virtqueues, it can be freed with
+ * VHOST_FREE_WORKER.
+ */
+#define VHOST_ATTACH_VRING_WORKER _IOW(VHOST_VIRTIO, 0x15, \
+ struct vhost_vring_worker)
+/* Return the vring worker's ID */
+#define VHOST_GET_VRING_WORKER _IOWR(VHOST_VIRTIO, 0x16, \
+ struct vhost_vring_worker)
/* The following ioctls use eventfd file descriptors to signal and poll
* for events. */