diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-09-22 08:27:27 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-09-22 08:27:27 +0000 |
commit | bdacf9ba4dd91cc0515199d29fd6debec10cee6a (patch) | |
tree | 0022e54c289be9c8abb1f440ebe83025dce57741 /sys/ofed/drivers | |
parent | 724af6b5c3e043d8c23475fb6fdb6767be220dcb (diff) | |
download | FreeBSD-src-bdacf9ba4dd91cc0515199d29fd6debec10cee6a.zip FreeBSD-src-bdacf9ba4dd91cc0515199d29fd6debec10cee6a.tar.gz |
Improve transmit sending offload, TSO, algorithm in general.
The current TSO limitation feature only takes the total number of
bytes in an mbuf chain into account and does not limit by the number
of mbufs in a chain. Some kinds of hardware is limited by two
factors. One is the fragment length and the second is the fragment
count. Both of these limits need to be taken into account when doing
TSO. Else some kinds of hardware might have to drop completely valid
mbuf chains because they cannot loaded into the given hardware's DMA
engine. The new way of doing TSO limitation has been made backwards
compatible as input from other FreeBSD developers and will use
defaults for values not set.
Reviewed by: adrian, rmacklem
Sponsored by: Mellanox Technologies
MFC after: 1 week
Diffstat (limited to 'sys/ofed/drivers')
-rw-r--r-- | sys/ofed/drivers/net/mlx4/en_netdev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_netdev.c b/sys/ofed/drivers/net/mlx4/en_netdev.c index d8b015b..15b576a 100644 --- a/sys/ofed/drivers/net/mlx4/en_netdev.c +++ b/sys/ofed/drivers/net/mlx4/en_netdev.c @@ -673,6 +673,11 @@ int mlx4_en_do_start_port(struct net_device *dev) else priv->rx_csum = 0; + /* set TSO limits so that we don't have to drop TX packets */ + dev->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); + dev->if_hw_tsomaxsegcount = 16; + dev->if_hw_tsomaxsegsize = 65536; /* XXX can do up to 4GByte */ + err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); if (err) { en_err(priv, "Failed to get WoL info, unable to modify\n"); |