diff options
author | Eric Dumazet <edumazet@google.com> | 2014-10-05 13:11:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-06 17:56:28 -0400 |
commit | fcbeb976d7ce783fd58e63e61c196d9a8912b3be (patch) | |
tree | c6dde6923e5316b2bfc4bdb04bd6643515cc1598 /include/linux/netdevice.h | |
parent | 9d31a7b9f9963e97e067e72ef13492e6ace7d345 (diff) |
net: introduce netdevice gso_min_segs attribute
Some TSO engines might have a too heavy setup cost, that impacts
performance on hosts sending small bursts (2 MSS per packet).
This patch adds a device gso_min_segs, allowing drivers to set
a minimum segment size for TSO packets, according to the NIC
performance.
Tested on a mlx4 NIC, this allows to get a ~110% increase of
throughput when sending 2 MSS per packet.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 22d54b9b700d..2df86f50261c 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1416,6 +1416,8 @@ enum netdev_priv_flags { | |||
1416 | * @gso_max_size: Maximum size of generic segmentation offload | 1416 | * @gso_max_size: Maximum size of generic segmentation offload |
1417 | * @gso_max_segs: Maximum number of segments that can be passed to the | 1417 | * @gso_max_segs: Maximum number of segments that can be passed to the |
1418 | * NIC for GSO | 1418 | * NIC for GSO |
1419 | * @gso_min_segs: Minimum number of segments that can be passed to the | ||
1420 | * NIC for GSO | ||
1419 | * | 1421 | * |
1420 | * @dcbnl_ops: Data Center Bridging netlink ops | 1422 | * @dcbnl_ops: Data Center Bridging netlink ops |
1421 | * @num_tc: Number of traffic classes in the net device | 1423 | * @num_tc: Number of traffic classes in the net device |
@@ -1666,7 +1668,7 @@ struct net_device { | |||
1666 | unsigned int gso_max_size; | 1668 | unsigned int gso_max_size; |
1667 | #define GSO_MAX_SEGS 65535 | 1669 | #define GSO_MAX_SEGS 65535 |
1668 | u16 gso_max_segs; | 1670 | u16 gso_max_segs; |
1669 | 1671 | u16 gso_min_segs; | |
1670 | #ifdef CONFIG_DCB | 1672 | #ifdef CONFIG_DCB |
1671 | const struct dcbnl_rtnl_ops *dcbnl_ops; | 1673 | const struct dcbnl_rtnl_ops *dcbnl_ops; |
1672 | #endif | 1674 | #endif |