Skip to contentSkip to conversation

io_uring/net: drop unused 'fast_iov_one' entry

PATCH In review Jens Axboe 2 participants 3 messages Mar 19, 2024 – Mar 20, 2024 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io_uring/net: drop unused 'fast_iov_one' entry

Doesn't really matter at this point, as the fast_iov entries dominate the size of io_async_msghdr. But that may not always be the case, so drop this unused member. It turns out it got added in a previous commit, but never actually used for anything.

Fixes 9bb66906f23e ("io_uring: support multishot in recvmsg")

---

io_uring/net.h +0 -1
index 191009979bcb..9d7962f65f26 100644
@@ -10,7 +10,6 @@ struct io_async_msghdr {
 	union {
 		struct iovec		fast_iov[UIO_FASTIOV];
 		struct {
-			struct iovec	fast_iov_one;
 			__kernel_size_t	controllen;
 			int		namelen;
 			__kernel_size_t	payloadlen;
Signature · 1 line
Jens Axboe
#1 lore raw
Quoted 17 lines · Jens Axboe

Doesn't really matter at this point, as the fast_iov entries dominate the size of io_async_msghdr. But that may not always be the case, so drop this unused member. It turns out it got added in a previous commit, but never actually used for anything.

Fixes 9bb66906f23e ("io_uring: support multishot in recvmsg")

---

io_uring/net.h +0 -0
index 191009979bcb..9d7962f65f26 100644

io_uring/net.h struct io_async_msghdr { · line 15

Quoted 7 lines
io_uring/net.h +0 -1
@@ -10,7 +10,6 @@ struct io_async_msghdr {
        union {
                struct iovec            fast_iov[UIO_FASTIOV];
                struct {
-                       struct iovec    fast_iov_one;
                        __kernel_size_t controllen;
                        int             namelen;
                        __kernel_size_t payloadlen;

I "believe" this is used in the async paths, where fast_iov[0] gets used (since multishot always has exactly one iovec) and so fast_iov_one is just a placeholder.
I think that means it's not safe to remove until after your async patches.

Although I haven't verified this by testing.

Dylan

author maintainer
#2 lore raw
Quoted 22 lines · Dylan Yudaken
Quoted 21 lines · On Tue, Mar 19, 2024 at 11:37?PM Jens Axboe <[email protected]> wrote:

Doesn't really matter at this point, as the fast_iov entries dominate the size of io_async_msghdr. But that may not always be the case, so drop this unused member. It turns out it got added in a previous commit, but never actually used for anything.

Fixes 9bb66906f23e ("io_uring: support multishot in recvmsg")

---

io_uring/net.h +0 -1
index 191009979bcb..9d7962f65f26 100644
@@ -10,7 +10,6 @@ struct io_async_msghdr {
        union {
                struct iovec            fast_iov[UIO_FASTIOV];
                struct {
-                       struct iovec    fast_iov_one;
                        __kernel_size_t controllen;
Quoted 8 lines

io_uring/net.h struct io_async_msghdr { · line 15

Quoted 3 lines
io_uring/net.h +0 -0
                        int             namelen;
                        __kernel_size_t payloadlen;

I "believe" this is used in the async paths, where fast_iov[0] gets used (since multishot always has exactly one iovec) and so fast_iov_one is just a placeholder.
I think that means it's not safe to remove until after your async patches.

Oh that's nasty, no comment about that, nor any direct use of it. Poor shame on whoever wrote that code :-)

I'll double check.

Signature · 1 line
Jens Axboe