svn commit: r264033 - in projects/sendfile/sys/dev/cxgb/ulp: iw_cxgb tom
Gleb Smirnoff
glebius at FreeBSD.org
Wed Apr 2 09:46:01 UTC 2014
Author: glebius
Date: Wed Apr 2 09:46:00 2014
New Revision: 264033
URL: http://svnweb.freebsd.org/changeset/base/264033
Log:
Fix compilation: use sbused() instead of sb_cc in cxgb(4).
Modified:
projects/sendfile/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
Modified: projects/sendfile/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
==============================================================================
--- projects/sendfile/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Wed Apr 2 06:17:57 2014 (r264032)
+++ projects/sendfile/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c Wed Apr 2 09:46:00 2014 (r264033)
@@ -1515,11 +1515,11 @@ process_data(struct iwch_ep *ep)
process_mpa_request(ep);
break;
default:
- if (ep->com.so->so_rcv.sb_cc)
+ if (sbavail(&ep->com.so->so_rcv))
printf("%s Unexpected streaming data."
" ep %p state %d so %p so_state %x so_rcv.sb_cc %u so_rcv.sb_mb %p\n",
__FUNCTION__, ep, state_read(&ep->com), ep->com.so, ep->com.so->so_state,
- ep->com.so->so_rcv.sb_cc, ep->com.so->so_rcv.sb_mb);
+ sbavail(&ep->com.so->so_rcv), ep->com.so->so_rcv.sb_mb);
break;
}
return;
Modified: projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
==============================================================================
--- projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Apr 2 06:17:57 2014 (r264032)
+++ projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Apr 2 09:46:00 2014 (r264033)
@@ -445,8 +445,8 @@ t3_push_frames(struct socket *so, int re
* Autosize the send buffer.
*/
if (snd->sb_flags & SB_AUTOSIZE && VNET(tcp_do_autosndbuf)) {
- if (snd->sb_cc >= (snd->sb_hiwat / 8 * 7) &&
- snd->sb_cc < VNET(tcp_autosndbuf_max)) {
+ if (sbused(snd) >= (snd->sb_hiwat / 8 * 7) &&
+ sbused(snd) < VNET(tcp_autosndbuf_max)) {
if (!sbreserve_locked(snd, min(snd->sb_hiwat +
VNET(tcp_autosndbuf_inc), VNET(tcp_autosndbuf_max)),
so, curthread))
@@ -597,10 +597,10 @@ t3_rcvd(struct toedev *tod, struct tcpcb
INP_WLOCK_ASSERT(inp);
SOCKBUF_LOCK(so_rcv);
- KASSERT(toep->tp_enqueued >= so_rcv->sb_cc,
- ("%s: so_rcv->sb_cc > enqueued", __func__));
- toep->tp_rx_credits += toep->tp_enqueued - so_rcv->sb_cc;
- toep->tp_enqueued = so_rcv->sb_cc;
+ KASSERT(toep->tp_enqueued >= sbused(so_rcv),
+ ("%s: sbused(so_rcv) > enqueued", __func__));
+ toep->tp_rx_credits += toep->tp_enqueued - sbused(so_rcv);
+ toep->tp_enqueued = sbused(so_rcv);
SOCKBUF_UNLOCK(so_rcv);
must_send = toep->tp_rx_credits + 16384 >= tp->rcv_wnd;
@@ -1768,7 +1768,7 @@ wr_ack(struct toepcb *toep, struct mbuf
so_sowwakeup_locked(so);
}
- if (snd->sb_sndptroff < snd->sb_cc)
+ if (snd->sb_sndptroff < sbused(snd))
t3_push_frames(so, 0);
out_free:
More information about the svn-src-projects
mailing list