io_uring: add support for passing fixed file descriptors
[linux-2.6-microblaze.git] / include / uapi / linux / io_uring.h
index 8fe0275..f378eab 100644 (file)
@@ -51,6 +51,7 @@ struct io_uring_sqe {
                __u32           unlink_flags;
                __u32           hardlink_flags;
                __u32           xattr_flags;
+               __u32           msg_ring_flags;
        };
        __u64   user_data;      /* data to be passed back at completion time */
        /* pack this to avoid bogus arm OABI complaints */
@@ -270,6 +271,22 @@ enum io_uring_op {
  */
 #define IORING_ACCEPT_MULTISHOT        (1U << 0)
 
+/*
+ * IORING_OP_MSG_RING command types, stored in sqe->addr
+ */
+enum {
+       IORING_MSG_DATA,        /* pass sqe->len as 'res' and off as user_data */
+       IORING_MSG_SEND_FD,     /* send a registered fd to another ring */
+};
+
+/*
+ * IORING_OP_MSG_RING flags (sqe->msg_ring_flags)
+ *
+ * IORING_MSG_RING_CQE_SKIP    Don't post a CQE to the target ring. Not
+ *                             applicable for IORING_MSG_DATA, obviously.
+ */
+#define IORING_MSG_RING_CQE_SKIP       (1U << 0)
+
 /*
  * IO completion data structure (Completion Queue Entry)
  */