[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <621185c7-be06-12a8-fe75-f544b392fb06@gmail.com>
Date: Tue, 25 Jan 2022 16:49:03 -0700
From: David Ahern <dsahern@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: Adjust sk_gso_max_size once when set
On 1/25/22 10:20 AM, Eric Dumazet wrote:
>> The git history does not explain why MAX_TCP_HEADER is used to lower
>> sk_gso_max_size. Do you recall the history on it?
>
> Simply that max IP datagram size is 64K
>
> And TCP is sizing its payload size there (eg in tcp_tso_autosize()),
> when skb only contains payload.
>
> Headers are added later in various xmit layers.
>
> MAX_TCP_HEADER is chosen to avoid re-allocs of skb->head in typical workload.
>From what I can tell skb->head is allocated based on MAX_TCP_HEADER, and
payload is added as frags for TSO.
I was just curious because I noticed a few MTUs (I only looked multiples
of 100 from 1500 to 9000) can get an extra segment in a TSO packet and
stay under the 64kB limit if that offset had better information of the
actual header size needed (if any beyond network + tcp).
Powered by blists - more mailing lists