[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f89705b-f4a8-4635-afd0-55dffe84ab22@redhat.com>
Date: Tue, 18 Mar 2025 13:44:34 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>
Cc: 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 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?
Thanks,
Paolo
Powered by blists - more mailing lists