From: Eric Dumazet <edumazet@google.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
soheil@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: tcp: Update the type of scaling_ratio
Date: Mon, 6 May 2024 14:42:51 +0200 [thread overview]
Message-ID: <CANn89i+QiQEX3DymsVaRMv-DRmcdwtPZ2U_O2VDxShJ0fKqXkA@mail.gmail.com> (raw)
In-Reply-To: <CANn89i+SJiOLLy8azt8NqckUkTLqTS3Wu=16vfTrqCFYLKxTPw@mail.gmail.com>
On Mon, May 6, 2024 at 2:35 PM Eric Dumazet <edumazet@google.com> wrote:
>
> On Mon, May 6, 2024 at 2:04 PM Horatiu Vultur
> <horatiu.vultur@microchip.com> wrote:
> >
> > 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@microchip.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
Remaining buggy drivers would be these USB drivers:
drivers/net/usb/aqc111.c:1154: new_skb->truesize =
SKB_TRUESIZE(new_skb->len);
drivers/net/usb/smsc75xx.c:2237:
skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/smsc75xx.c:2256:
ax_skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/smsc95xx.c:1873:
skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/smsc95xx.c:1891:
ax_skb->truesize = size + sizeof(struct sk_buff);
drivers/net/usb/sr9700.c:424: skb->truesize = len +
sizeof(struct sk_buff);
drivers/net/usb/sr9700.c:436: sr_skb->truesize = len +
sizeof(struct sk_buff);
next prev parent reply other threads:[~2024-05-06 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-06 12:04 Horatiu Vultur
2024-05-06 12:35 ` Eric Dumazet
2024-05-06 12:42 ` Eric Dumazet [this message]
2024-05-06 13:13 ` Horatiu Vultur
2024-05-07 5:13 ` kernel test robot
2024-05-07 6:08 ` kernel test robot
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 \
--in-reply-to=CANn89i+QiQEX3DymsVaRMv-DRmcdwtPZ2U_O2VDxShJ0fKqXkA@mail.gmail.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=soheil@google.com \
/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
all inboxes | Powered by JetHome®