tcp: fill shinfo->gso_type at last moment
authorEric Dumazet <edumazet@google.com>
Thu, 11 Jun 2015 16:15:16 +0000 (09:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2015 23:33:11 +0000 (16:33 -0700)
commit51466a7545b73b7ad7bcfb33410d2823ccfaa501
treef12fe132349a599b567efc45a092bbf2f591ea3d
parenta7eea416cb08a514f94c0ca5ff30c18783fab054
tcp: fill shinfo->gso_type at last moment

Our goal is to touch skb_shinfo(skb) only when absolutely needed,
to avoid two cache line misses in TCP output path for last skb
that is considered but not sent because of various conditions
(cwnd, tso defer, receiver window, TSQ...)

A packet is GSO only when skb_shinfo(skb)->gso_size is not zero.

We can set skb_shinfo(skb)->gso_type to sk->sk_gso_type even for
non GSO packets.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c