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>
This commit is contained in:
committed by
David S. Miller
parent
7e6d06f0de
commit
1485348d24
@@ -218,6 +218,7 @@ struct cg_proto;
|
||||
* @sk_route_nocaps: forbidden route capabilities (e.g NETIF_F_GSO_MASK)
|
||||
* @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4)
|
||||
* @sk_gso_max_size: Maximum GSO segment size to build
|
||||
* @sk_gso_max_segs: Maximum number of GSO segments
|
||||
* @sk_lingertime: %SO_LINGER l_linger setting
|
||||
* @sk_backlog: always used with the per-socket spinlock held
|
||||
* @sk_callback_lock: used with the callbacks in the end of this struct
|
||||
@@ -338,6 +339,7 @@ struct sock {
|
||||
netdev_features_t sk_route_nocaps;
|
||||
int sk_gso_type;
|
||||
unsigned int sk_gso_max_size;
|
||||
u16 sk_gso_max_segs;
|
||||
int sk_rcvlowat;
|
||||
unsigned long sk_lingertime;
|
||||
struct sk_buff_head sk_error_queue;
|
||||
|
||||
Reference in New Issue
Block a user