MFC 301932: Use sbused() instead of sbspace() to avoid signed issues.
Inserting a full mbuf with an external cluster into the socket buffer
resulted in sbspace() returning -MLEN. However, since sb_hiwat is
unsigned, the -MLEN value was converted to unsigned in comparisons. As a
result, the socket buffer was never autosized. Note that sb_lowat is signed
to permit direct comparisons with sbspace(), but sb_hiwat is unsigned.
Follow suit with what tcp_output() does and compare the value of sbused()
with sb_hiwat instead.
Note: Since stable/10 does not include sbused(), this uses sb->sb_cc
instead.
Sponsored by: Chelsio Communications
git-svn-id: svn://svn.freebsd.org/base/stable/10@308283
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f