[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJL8AD-JOw7oMbBehLmHbncwAJmhyNS+Y-YEx-+MwkRAA@mail.gmail.com>
Date: Tue, 18 Mar 2025 14:06:20 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>, Kuniyuki Iwashima <kuniyu@...zon.com>,
Simon Horman <horms@...nel.org>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] tcp: cache RTAX_QUICKACK metric in a hot cache line
On Tue, Mar 18, 2025 at 1:44 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 3/12/25 9:39 AM, Eric Dumazet wrote:
> > diff --git a/net/core/sock.c b/net/core/sock.c
> > index a0598518ce898f53825f15ec78249103a3ff8306..323892066def8ba517ff59f98f2e4ab47edd4e63 100644
> > --- a/net/core/sock.c
> > +++ b/net/core/sock.c
> > @@ -2565,8 +2565,12 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
> > u32 max_segs = 1;
> >
> > sk->sk_route_caps = dst->dev->features;
> > - if (sk_is_tcp(sk))
> > + if (sk_is_tcp(sk)) {
> > + struct inet_connection_sock *icsk = inet_csk(sk);
> > +
> > sk->sk_route_caps |= NETIF_F_GSO;
> > + icsk->icsk_ack.dst_quick_ack = dst_metric(dst, RTAX_QUICKACK);
> > + }
> > if (sk->sk_route_caps & NETIF_F_GSO)
> > sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE;
> > if (unlikely(sk->sk_gso_disabled))
>
> Not strictly related with this patch, but I'm wondering if in case of
> ipv4_sk_update_pmtu() racing with a re-route, we could end-up with the
> first updating the sk dst cache instead of the latter, missing the sk
> status update. Should ipv4_sk_update_pmtu() call sk_setup_caps() instead?
This indeed looks strange. IPv6 seems fine at a first glance.
Powered by blists - more mailing lists