path: root/sys/sys
diff options
authorHans Petter Selasky <hselasky@FreeBSD.org>2014-09-22 08:27:27 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2014-09-22 08:27:27 +0000
commit9fd573c39d61153ea00229a22d52293017a35a9e (patch)
tree0022e54c289be9c8abb1f440ebe83025dce57741 /sys/sys
parent2f872218e723d313dbbe8672788eae694d0d17ad (diff)
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
Notes: svn path=/head/; revision=271946
Diffstat (limited to 'sys/sys')
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h
index 877b5307ee2e..ef80e9c14571 100644
--- a/sys/sys/sockbuf.h
+++ b/sys/sys/sockbuf.h
@@ -158,6 +158,8 @@ int sbreserve_locked(struct sockbuf *sb, u_long cc, struct socket *so,
struct thread *td);
struct mbuf *
sbsndptr(struct sockbuf *sb, u_int off, u_int len, u_int *moff);
+struct mbuf *
+ sbsndmbuf(struct sockbuf *sb, u_int off, u_int *moff);
void sbtoxsockbuf(struct sockbuf *sb, struct xsockbuf *xsb);
int sbwait(struct sockbuf *sb);
int sblock(struct sockbuf *sb, int flags);