[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <248071bc915140d8c58669b288c15c731407fa76.camel@redhat.com>
Date: Tue, 05 Jul 2022 12:31:07 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Leonard Crestez <cdleonard@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>
Cc: Soheil Hassas Yeganeh <soheil@...gle.com>,
Wei Wang <weiwan@...gle.com>,
Joanne Koong <joannelkoong@...il.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: Shrink sock.sk_err sk_err_soft to u16 from int
On Sun, 2022-07-03 at 23:06 +0300, Leonard Crestez wrote:
> These fields hold positive errno values which are limited by
> ERRNO_MAX=4095 so 16 bits is more than enough.
>
> They are also always positive; setting them to a negative errno value
> can result in falsely reporting a successful read/write of incorrect
> size.
>
> Signed-off-by: Leonard Crestez <cdleonard@...il.com>
> ---
> include/net/sock.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> I ran some relatively complex tests without noticing issues but some corner
> case where this breaks might exist.
Could you please explain in length the rationale behind this change?
Note that this additionally changes the struct sock binary layout,
which in turn in quite relevant for high speed data transfer.
Thanks!
Paolo
Powered by blists - more mailing lists