summaryrefslogtreecommitdiffstats
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2014-09-13 08:26:09 +0000
committerhselasky <hselasky@FreeBSD.org>2014-09-13 08:26:09 +0000
commit3d04a989df2ae6c0fb4728b68f2274714b25fd72 (patch)
treed34b1dd02c73734a9f41558066a1d389f2f3c6f8 /sys/net/if_vlan.c
parentd38ee298689653c70b76d3fe5f498287ca706fa6 (diff)
downloadFreeBSD-src-3d04a989df2ae6c0fb4728b68f2274714b25fd72.zip
FreeBSD-src-3d04a989df2ae6c0fb4728b68f2274714b25fd72.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. MFC after: 1 week Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index f551ffd..fe2560c 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1511,8 +1511,8 @@ vlan_capabilities(struct ifvlan *ifv)
* propagate the hardware-assisted flag. TSO on VLANs
* does not necessarily require hardware VLAN tagging.
*/
- if (p->if_hw_tsomax > 0)
- ifp->if_hw_tsomax = p->if_hw_tsomax;
+ ifp->if_hw_tsomax = if_hw_tsomax_common(ifp->if_hw_tsomax,
+ p->if_hw_tsomax);
if (p->if_capabilities & IFCAP_VLAN_HWTSO)
ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO;
if (p->if_capenable & IFCAP_VLAN_HWTSO) {
OpenPOWER on IntegriCloud