diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-30 16:11:42 +0000 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-04-05 09:13:00 +0300 |
commit | d375395fe63775b3750d435ca6be46a2f4ad4cb3 (patch) | |
tree | ab721fddf3a1abf535d0f60bb921bffd7cbd1598 /net/core/sock.c | |
parent | bbc5b279baf44c891e1ddbfad41aa94d2a715e53 (diff) | |
download | kernel-mfld-blackbay-d375395fe63775b3750d435ca6be46a2f4ad4cb3.tar.gz kernel-mfld-blackbay-d375395fe63775b3750d435ca6be46a2f4ad4cb3.tar.bz2 kernel-mfld-blackbay-d375395fe63775b3750d435ca6be46a2f4ad4cb3.zip |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 0531f5c4694..0783e9ae6d4 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1311,6 +1311,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) } else { sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; sk->sk_gso_max_size = dst->dev->gso_max_size; + sk->sk_gso_max_segs = dst->dev->gso_max_segs; } } } |