[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240506131357.lplgpwj2h4nkdxa6@DEN-DL-M31836.microchip.com>
Date: Mon, 6 May 2024 15:13:57 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Eric Dumazet <edumazet@...gle.com>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<soheil@...gle.com>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: tcp: Update the type of scaling_ratio
The 05/06/2024 14:35, Eric Dumazet wrote:
>
> On Mon, May 6, 2024 at 2:04 PM Horatiu Vultur
> <horatiu.vultur@...rochip.com> wrote:
Hi Eric,
> >
> > It was noticed the following issue that sometimes the scaling_ratio was
> > getting a value of 0, meaning that window space was having a value of 0,
> > so then the tcp connection was stopping.
> > The reason why the scaling_ratio was getting a value of 0 is because
> > when it was calculated, it was truncated from a u64 to a u8. So for
> > example if it scaling_ratio was supposed to be 256 it was getting a
> > value of 0.
> > The fix consists in chaning the type of scaling_ratio from u8 to u16.
> >
> > Fixes: dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale")
> > Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> > ---
>
> This is a wrong patch. We need to fix the root cause instead.
>
> By definition, skb->len / skb->truesize must be < 1
>
> If not, a driver is lying to us and this is quite bad.
>
> Please take a look at the following patch for a real fix.
>
> 4ce62d5b2f7aecd4900e7d6115588ad7f9acccca net: usb: ax88179_178a: stop
> lying about skb->truesize
Thanks for explanation and for the suggestion.
I have tried this on a driver that is not yet upstream.
Sorry for the noise.
--
/Horatiu
Powered by blists - more mailing lists