io_uring/notif: add constant for ubuf_info flags
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 15 Apr 2023 13:20:08 +0000 (14:20 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 15 Apr 2023 20:21:04 +0000 (14:21 -0600)
Add a constant IO_NOTIF_UBUF_FLAGS for struct ubuf_info flags that
notifications use. That should minimise merge conflicts for planned
changes touching both io_uring and net at the same time.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/notif.c
io_uring/notif.h

index e1846a25dde16369706ca8e8dd6950ab6835e9e3..d3e703c37aba83535a4f199329aae2b482d81e04 100644 (file)
@@ -79,7 +79,7 @@ struct io_kiocb *io_alloc_notif(struct io_ring_ctx *ctx)
        notif->io_task_work.func = io_req_task_complete;
 
        nd = io_notif_to_data(notif);
-       nd->uarg.flags = SKBFL_ZEROCOPY_FRAG | SKBFL_DONT_ORPHAN;
+       nd->uarg.flags = IO_NOTIF_UBUF_FLAGS;
        nd->uarg.callback = io_tx_ubuf_callback;
        refcount_set(&nd->uarg.refcnt, 1);
        return notif;
index 6dd1b30a468f7c12f4232c06471a0c27cce0002a..86d32bd9f856833656de9131179c83be4a08ce59 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "rsrc.h"
 
+#define IO_NOTIF_UBUF_FLAGS    (SKBFL_ZEROCOPY_FRAG | SKBFL_DONT_ORPHAN)
 #define IO_NOTIF_SPLICE_BATCH  32
 
 struct io_notif_data {