* [PATCH] io_uring/net: drop unused 'fast_iov_one' entry
@ 2024-03-19 23:37 Jens Axboe
2024-03-20 13:59 ` Dylan Yudaken
0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2024-03-19 23:37 UTC (permalink / raw)
To: io-uring
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")
Signed-off-by: Jens Axboe <[email protected]>
---
diff --git a/io_uring/net.h b/io_uring/net.h
index 191009979bcb..9d7962f65f26 100644
--- a/io_uring/net.h
+++ b/io_uring/net.h
@@ -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;
--
Jens Axboe
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring/net: drop unused 'fast_iov_one' entry
2024-03-19 23:37 [PATCH] io_uring/net: drop unused 'fast_iov_one' entry Jens Axboe
@ 2024-03-20 13:59 ` Dylan Yudaken
2024-03-20 14:41 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Dylan Yudaken @ 2024-03-20 13:59 UTC (permalink / raw)
To: Jens Axboe; +Cc: io-uring
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")
> Signed-off-by: Jens Axboe <[email protected]>
>
> ---
>
> diff --git a/io_uring/net.h b/io_uring/net.h
> index 191009979bcb..9d7962f65f26 100644
> --- a/io_uring/net.h
> +++ b/io_uring/net.h
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring/net: drop unused 'fast_iov_one' entry
2024-03-20 13:59 ` Dylan Yudaken
@ 2024-03-20 14:41 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-03-20 14:41 UTC (permalink / raw)
To: Dylan Yudaken; +Cc: io-uring
On 3/20/24 7:59 AM, Dylan Yudaken wrote:
> 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")
>> Signed-off-by: Jens Axboe <[email protected]>
>>
>> ---
>>
>> diff --git a/io_uring/net.h b/io_uring/net.h
>> index 191009979bcb..9d7962f65f26 100644
>> --- a/io_uring/net.h
>> +++ b/io_uring/net.h
>> @@ -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.
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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-20 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-19 23:37 [PATCH] io_uring/net: drop unused 'fast_iov_one' entry Jens Axboe
2024-03-20 13:59 ` Dylan Yudaken
2024-03-20 14:41 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox