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/netinet/tcp_output.c | |
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/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index c0e2230..b6f4b30 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -803,9 +803,9 @@ send: max_len = (if_hw_tsomax - hdrlen); if (max_len <= 0) { len = 0; - } else if (len > (u_int)max_len) { + } else if (len > max_len) { sendalot = 1; - len = (u_int)max_len; + len = max_len; } } @@ -818,7 +818,7 @@ send: max_len = 0; mb = sbsndmbuf(&so->so_snd, off, &moff); - while (mb != NULL && (u_int)max_len < len) { + while (mb != NULL && max_len < len) { u_int mlen; u_int frags; @@ -852,9 +852,9 @@ send: } if (max_len <= 0) { len = 0; - } else if (len > (u_int)max_len) { + } else if (len > max_len) { sendalot = 1; - len = (u_int)max_len; + len = max_len; } } @@ -865,7 +865,7 @@ send: */ max_len = (tp->t_maxopd - optlen); if ((off + len) < so->so_snd.sb_cc) { - moff = len % (u_int)max_len; + moff = len % max_len; if (moff != 0) { len -= moff; sendalot = 1; @@ -876,8 +876,8 @@ send: * In case there are too many small fragments * don't use TSO: */ - if (len <= (u_int)max_len) { - len = (u_int)max_len; + if (len <= max_len) { + len = max_len; sendalot = 1; tso = 0; } |