aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-07-30 12:11:42 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-02 03:19:17 -0400
commit1485348d2424e1131ea42efc033cbd9366462b01 (patch)
tree706d69b398cbd109fd3a9806fa485150d043cc52 /include/net/sock.h
parent7e6d06f0de3f74ca929441add094518ae332257c (diff)
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 'include/net/sock.h')
-rw-r--r--include/net/sock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index b3730239bf18..72132aef53fc 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -218,6 +218,7 @@ struct cg_proto;
218 * @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK) 218 * @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK)
219 * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4) 219 * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4)
220 * @sk_gso_max_size: Maximum GSO segment size to build 220 * @sk_gso_max_size: Maximum GSO segment size to build
221 * @sk_gso_max_segs: Maximum number of GSO segments
221 * @sk_lingertime: %SO_LINGER l_linger setting 222 * @sk_lingertime: %SO_LINGER l_linger setting
222 * @sk_backlog: always used with the per-socket spinlock held 223 * @sk_backlog: always used with the per-socket spinlock held
223 * @sk_callback_lock: used with the callbacks in the end of this struct 224 * @sk_callback_lock: used with the callbacks in the end of this struct
@@ -338,6 +339,7 @@ struct sock {
338 netdev_features_t sk_route_nocaps; 339 netdev_features_t sk_route_nocaps;
339 int sk_gso_type; 340 int sk_gso_type;
340 unsigned int sk_gso_max_size; 341 unsigned int sk_gso_max_size;
342 u16 sk_gso_max_segs;
341 int sk_rcvlowat; 343 int sk_rcvlowat;
342 unsigned long sk_lingertime; 344 unsigned long sk_lingertime;
343 struct sk_buff_head sk_error_queue; 345 struct sk_buff_head sk_error_queue;