Hi, I fiddled a bit with the v3 repo, and came up with what I think is a better solution. Basically we split the io_uring_sqe into a header part, and then a main part. io_uring_sqe remains the same, obviously, but io_uring_cmd_sqe is then the sqe for these kinds of passthrough payloads. In turn, consumers of that can then overlay on io_uring_cmd_sqe. Since I think we need the personality in there, we may as well add op and len as most/all will want that too. That leaves 40 bytes that can be used freely. That may not seem like much, but remember that's 40 bytes outside of the fd, len, and command op. I updated and tested the block ioctl example, but didn't update the net side outside of needing a tweak on the net command. Outside of that, it should work like before. I'd be interested in feedback on this approach. My main goal is to make this flexible enough to be useful, but also fast enough to be useful. That means no extra allocations if at all avoidable, and even being wary of adding extra branches to the io_uring hot path. With this series, we don't do the nasty split in io_init_req() anymore, which I really disliked in the previous series. This is by no means perfect yet, but I do think it's better than v3 by quite a lot. So please send feedback and comments, I'd like to get this moving forward as we have various folks already lined up to use it... Kanchan, can you try and address the NVMe feedback and rebase on top of this branch? Thanks! You can also find this branch here: https://git.kernel.dk/cgit/linux-block/log/?h=io_uring-fops.v4 block/blk-mq.c | 11 +++ fs/block_dev.c | 30 ++++++ fs/io_uring.c | 181 ++++++++++++++++++++++++---------- include/linux/blk-mq.h | 6 ++ include/linux/blkdev.h | 13 +++ include/linux/fs.h | 11 +++ include/linux/io_uring.h | 16 +++ include/linux/net.h | 2 + include/net/raw.h | 3 + include/net/sock.h | 6 ++ include/net/tcp.h | 2 + include/net/udp.h | 2 + include/uapi/linux/io_uring.h | 21 ++++ include/uapi/linux/net.h | 17 ++++ net/core/sock.c | 17 +++- net/dccp/ipv4.c | 1 + net/ipv4/af_inet.c | 3 + net/ipv4/raw.c | 27 +++++ net/ipv4/tcp.c | 36 +++++++ net/ipv4/tcp_ipv4.c | 1 + net/ipv4/udp.c | 18 ++++ net/ipv6/raw.c | 1 + net/ipv6/tcp_ipv6.c | 1 + net/ipv6/udp.c | 1 + net/l2tp/l2tp_ip.c | 1 + net/mptcp/protocol.c | 1 + net/sctp/protocol.c | 1 + net/socket.c | 13 +++ 28 files changed, 391 insertions(+), 52 deletions(-) -- Jens Axboe