public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>
Subject: [PATCH 3/4] io_uring/kbuf: shrink nr_iovs/mode in struct buf_sel_arg
Date: Mon, 12 Aug 2024 10:55:26 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

nr_iovs is capped at 1024, and mode only has a few low values. We can
safely make them u16, in preparation for adding a few more members.

Signed-off-by: Jens Axboe <[email protected]>
---
 io_uring/kbuf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h
index 1d56092d9286..5625ff0e349d 100644
--- a/io_uring/kbuf.h
+++ b/io_uring/kbuf.h
@@ -59,8 +59,8 @@ struct buf_sel_arg {
 	struct iovec *iovs;
 	size_t out_len;
 	size_t max_len;
-	int nr_iovs;
-	int mode;
+	unsigned short nr_iovs;
+	unsigned short mode;
 };
 
 void __user *io_buffer_select(struct io_kiocb *req, size_t *len,
-- 
2.43.0


  parent reply	other threads:[~2024-08-12 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 16:55 [PATCHSET RFC 0/4] Coalesce provided buffer segments Jens Axboe
2024-08-12 16:55 ` [PATCH 1/4] io_uring/kbuf: have io_provided_buffers_select() take buf_sel_arg Jens Axboe
2024-08-12 16:55 ` [PATCH 2/4] io_uring/net: pass in io_kiocb to io_bundle_nbufs() Jens Axboe
2024-08-12 16:55 ` Jens Axboe [this message]
2024-08-12 16:55 ` [PATCH 4/4] io_uring/net: allow coalescing of mapped segments Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox