diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-11-19 09:03:12 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-11-19 09:03:12 +0000 |
commit | 9fcf944d2ab177691803626c24a94fa931a59d01 (patch) | |
tree | 3bb164c4548be8aa90b8bc3aa5a230a92e4203cc /sys/net | |
parent | 9f12066dfb1bd5648d884b4fe0d4ab8c89bf02ee (diff) | |
download | FreeBSD-src-9fcf944d2ab177691803626c24a94fa931a59d01.zip FreeBSD-src-9fcf944d2ab177691803626c24a94fa931a59d01.tar.gz |
MFC r274376:
Fix some minor TSO issues:
- Improve description of TSO limits.
- Remove a not needed KASSERT()
- Remove some not needed variable casts.
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 7 | ||||
-rw-r--r-- | sys/net/if_var.h | 22 |
2 files changed, 17 insertions, 12 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 2e5d0ab..2fc62ea 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -731,13 +731,6 @@ if_attach_internal(struct ifnet *ifp, int vmove) ifp->if_hw_tsomaxsegsize); } } - /* - * If the "if_hw_tsomax" limit is set, check if it is - * too small: - */ - KASSERT(ifp->if_hw_tsomax == 0 || - ifp->if_hw_tsomax >= (IP_MAXPACKET / 8), - ("%s: if_hw_tsomax is outside of range", __func__)); #endif } #ifdef VIMAGE diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 9312728..e6ed31b 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -210,11 +210,23 @@ struct ifnet { u_int if_fib; /* interface FIB */ u_char if_alloctype; /* if_type at time of allocation */ - u_int if_hw_tsomax; /* TSO total burst length - * limit in bytes. A value of - * zero means no limit. Have - * to find a better place for - * it eventually. */ + /* + * Network adapter TSO limits: + * =========================== + * + * If the "if_hw_tsomax" field is zero the maximum segment + * length limit does not apply. If the "if_hw_tsomaxsegcount" + * or the "if_hw_tsomaxsegsize" field is zero the TSO segment + * count limit does not apply. If all three fields are zero, + * there is no TSO limit. + * + * NOTE: The TSO limits only apply to the data payload part of + * a TCP/IP packet. That means there is no need to subtract + * space for ethernet-, vlan-, IP- or TCP- headers from the + * TSO limits unless the hardware driver in question requires + * so. + */ + u_int if_hw_tsomax; /* * Spare fields are added so that we can modify sensitive data |