diff mbox series

[for-next,1/1] io_uring/notif: add constant for ubuf_info flags

Message ID 2906468a8216414414e8e5c06dc06b474dff517a.1681563798.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series [for-next,1/1] io_uring/notif: add constant for ubuf_info flags | expand

Commit Message

Pavel Begunkov April 15, 2023, 1:20 p.m. UTC
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>
---
 io_uring/notif.c | 2 +-
 io_uring/notif.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Jens Axboe April 15, 2023, 8:37 p.m. UTC | #1
On 4/15/23 7:20 AM, Pavel Begunkov wrote:
> 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.

Applied, thanks.
diff mbox series

Patch

diff --git a/io_uring/notif.c b/io_uring/notif.c
index e1846a25dde1..d3e703c37aba 100644
--- a/io_uring/notif.c
+++ b/io_uring/notif.c
@@ -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;
diff --git a/io_uring/notif.h b/io_uring/notif.h
index 6dd1b30a468f..86d32bd9f856 100644
--- a/io_uring/notif.h
+++ b/io_uring/notif.h
@@ -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 {