tcp: call tcp_set_skb_tso_segs() from tcp_write_xmit()
authorEric Dumazet <edumazet@google.com>
Thu, 18 Apr 2024 21:45:59 +0000 (21:45 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 22 Apr 2024 21:25:27 +0000 (14:25 -0700)
commitd5b38a71d3334bc87931997f1b0a16464bbbe2ba
treed363786cfa5dea6aedf448c4c41d6b1a03e03ee6
parent22555032c513e62fe744d4cdd553539897e8e922
tcp: call tcp_set_skb_tso_segs() from tcp_write_xmit()

tcp_write_xmit() calls tcp_init_tso_segs()
to set gso_size and gso_segs on the packet.

tcp_init_tso_segs() requires the stack to maintain
an up to date tcp_skb_pcount(), and this makes sense
for packets in rtx queue. Not so much for packets
still in the write queue.

In the following patch, we don't want to deal with
tcp_skb_pcount() when moving payload from 2nd
skb to 1st skb in the write queue.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240418214600.1291486-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_output.c