tcp: Apply device TSO segment limit earlier
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 30 Jul 2012 16:11:42 +0000 (16:11 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 19 Sep 2012 14:04:46 +0000 (15:04 +0100)
commit9f871e883277cc22c6217db806376dce52401a31
tree91729c13ca26cfc31affbcd952547384204e396f
parent68cb695ccecf949d48949e72f8ce591fdaaa325c
tcp: Apply device TSO segment limit earlier

[ Upstream commit 1485348d2424e1131ea42efc033cbd9366462b01 ]

Cache the device gso_max_segs in sock::sk_gso_max_segs and use it to
limit the size of TSO skbs.  This avoids the need to fall back to
software GSO for local TCP senders.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/net/sock.h
net/core/sock.c
net/ipv4/tcp.c
net/ipv4/tcp_cong.c
net/ipv4/tcp_output.c