diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-30 16:11:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-02 00:19:17 -0700 |
commit | 1485348d2424e1131ea42efc033cbd9366462b01 (patch) | |
tree | 706d69b398cbd109fd3a9806fa485150d043cc52 /net/core/sock.c | |
parent | 7e6d06f0de3f74ca929441add094518ae332257c (diff) | |
download | kernel_goldelico_gta04-1485348d2424e1131ea42efc033cbd9366462b01.zip kernel_goldelico_gta04-1485348d2424e1131ea42efc033cbd9366462b01.tar.gz kernel_goldelico_gta04-1485348d2424e1131ea42efc033cbd9366462b01.tar.bz2 |
tcp: Apply device TSO segment limit earlier
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>
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 6b654b3..8f67ced 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1458,6 +1458,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; } } } |