[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iJ3o5491wMnJ0Bb8PzHSBoEOV9+K5EZJA6Qk5uTOfwFrA@mail.gmail.com>
Date: Thu, 20 Jul 2023 17:50:04 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Soheil Hassas Yeganeh <soheil@...gle.com>, Neal Cardwell <ncardwell@...gle.com>,
Yuchung Cheng <ycheng@...gle.com>, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] tcp: get rid of sysctl_tcp_adv_win_scale
On Thu, Jul 20, 2023 at 5:43 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> Hi,
>
> On Mon, 2023-07-17 at 15:29 +0000, Eric Dumazet wrote:
> > +static inline void tcp_scaling_ratio_init(struct sock *sk)
> > +{
> > + /* Assume a conservative default of 1200 bytes of payload per 4K page.
> > + * This may be adjusted later in tcp_measure_rcv_mss().
> > + */
> > + tcp_sk(sk)->scaling_ratio = (1200 << TCP_RMEM_TO_WIN_SCALE) /
> > + SKB_TRUESIZE(4096);
>
> I'm giving this patch a closer look because mptcp_rcv_space_adjust
> needs to be updated on top of it. Should SKB_TRUESIZE(4096) be replaced
> with:
>
> 4096 + SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
>
> to be more accurate? The page should already include the shared info,
> right?
>
> Likely not very relevant as the ratio is updated to a more accurate
> value with the first packet, mostly to try to understand the code
> correctly.
Hi Paolo.
As discussed with Soheil, I do not think the initial value for
tp->scaling_ratio is very important,
as long as it is not too small of course (otherwise we would have to
increase tcp_rmem[1] to avoid regressions for the first RTT)
Rationale for not adding sizeof(struct skb_shared_info) is because
with GRO, this extra cost tends to disappear.
(Same idea used in truesize_adjust())
Powered by blists - more mailing lists