netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: shironeko@tesaguri.club
Cc: Jose Alonso <joalonsof@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org,
	 Soheil Hassas Yeganeh <soheil@google.com>,
	Neal Cardwell <ncardwell@google.com>,
	 Yuchung Cheng <ycheng@google.com>,
	eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] tcp: get rid of sysctl_tcp_adv_win_scale
Date: Sat, 6 Apr 2024 09:07:04 +0200	[thread overview]
Message-ID: <CANn89iLWkJrth7jLTSp-jFK-UUTFMN6UxHc_HcDGkSNFN2kXQQ@mail.gmail.com> (raw)
In-Reply-To: <CANn89iKoaTjaK7s_66EOHAYw+drT3XTEhT5xBcFU1iHTYr_aug@mail.gmail.com>

On Sat, Apr 6, 2024 at 8:11 AM Eric Dumazet <edumazet@google.com> wrote:
>
> On Sat, Apr 6, 2024 at 2:22 AM <shironeko@tesaguri.club> wrote:
> >
> > The patch seems to be working, no more dmesg errors or network cut-outs. Thank you!
> >
> > There is however this line printed yesterday afternoon, so seem there's still some weirdness.
> > > TCP: eth0: Driver has suspect GRO implementation, TCP performance may be compromised.
>
> This is great, could you add the following to get some details from the skb ?
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 1b6cd384001202df5f8e8e8c73adff0db89ece63..e30895a9cc8627cf423c3c5a783d525db0b2db8e
> 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -209,9 +209,11 @@ static __cold void tcp_gro_dev_warn(const struct
> sock *sk, const struct sk_buff
>
>         rcu_read_lock();
>         dev = dev_get_by_index_rcu(sock_net(sk), skb->skb_iif);
> -       if (!dev || len >= READ_ONCE(dev->mtu))
> +       if (!dev || len >= READ_ONCE(dev->mtu)) {
> +               skb_dump(KERN_ERR, skb, false);
>                 pr_warn("%s: Driver has suspect GRO implementation,
> TCP performance may be compromised.\n",
>                         dev ? dev->name : "Unknown driver");
> +       }
>         rcu_read_unlock();
>  }

Thinking more about this, I  think this (old) issue comes from the
large skb->head allocated by usbnet,
allowing tcp_add_backlog/skb_try_coalesce() to aggregate multiple
non-gro packets into a single skb.

We could fix this generically from usbnet_skb_return(), instead of
'fixing' all usbnet drivers.

      reply	other threads:[~2024-04-06  7:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 15:29 [PATCH net-next] tcp: get rid of sysctl_tcp_adv_win_scale Eric Dumazet
2023-07-17 16:52 ` Soheil Hassas Yeganeh
2023-07-17 17:17   ` Eric Dumazet
2023-07-17 17:20     ` Soheil Hassas Yeganeh
2023-07-19  2:10 ` patchwork-bot+netdevbpf
2023-07-20 15:41 ` Paolo Abeni
2023-07-20 15:50   ` Eric Dumazet
2023-11-03  6:10 ` Jiri Slaby
2023-11-03  6:56   ` Jiri Slaby
2023-11-03  7:07     ` Jiri Slaby
2023-11-03  8:17       ` Eric Dumazet
2023-11-03  9:27         ` Michal Kubecek
2023-11-03  9:53           ` Eric Dumazet
2023-11-03 10:14         ` Jiri Slaby
2023-11-03 10:27           ` Eric Dumazet
2023-11-03 11:07             ` Jiri Slaby
2024-04-02 15:28 ` shironeko
2024-04-02 15:50   ` Eric Dumazet
2024-04-02 16:23     ` Eric Dumazet
2024-04-02 16:29       ` shironeko
2024-04-06  0:22         ` shironeko
2024-04-06  6:11           ` Eric Dumazet
2024-04-06  7:07             ` Eric Dumazet [this message]

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=CANn89iLWkJrth7jLTSp-jFK-UUTFMN6UxHc_HcDGkSNFN2kXQQ@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=joalonsof@gmail.com \
    --cc=kuba@kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shironeko@tesaguri.club \
    --cc=soheil@google.com \
    --cc=ycheng@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;
as well as URLs for NNTP newsgroup(s).