PERFORCE change 135132 for review
Kip Macy
kmacy at FreeBSD.org
Sat Feb 9 17:06:03 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135132
Change 135132 by kmacy at kmacy:storage:toehead on 2008/02/10 01:05:03
t3_cancel_ubuf should be checking against SBS_CANTRCVMORE
Affected files ...
.. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#10 edit
Differences ...
==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#10 (text+ko) ====
@@ -384,13 +384,14 @@
struct ddp_state *p = &toep->tp_ddp_state;
int ubuf_pending = t3_ddp_ubuf_pending(toep);
struct socket *so = toeptoso(toep);
+ int err = 0, count=0;
if (p->ubuf == NULL)
return;
SOCKBUF_LOCK_ASSERT(&so->so_rcv);
p->cancel_ubuf = 1;
- while (ubuf_pending && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) {
+ while (ubuf_pending && !(so->so_rcv.sb_state & SBS_CANTRCVMORE)) {
#ifdef T3_TRACE
T3_TRACE3(TB(p),
"t3_cancel_ubuf: flags0 0x%x flags1 0x%x get_tcb_count %d",
@@ -405,17 +406,18 @@
p->get_tcb_count);
if (p->get_tcb_count == 0)
t3_cancel_ddpbuf(toep, p->cur_buf);
- else {
- int err = 0, count=0;
- while (p->get_tcb_count && !(so->so_state & (SS_ISDISCONNECTING|SS_ISDISCONNECTED))) {
- if (count & 0xffff)
- CTR4(KTR_TCB, "waiting err=%d get_tcb_count=%d timeo=%d so=%p\n",
- err, p->get_tcb_count, so->so_rcv.sb_timeo, so);
- count++;
- err = sbwait(&so->so_rcv);
- }
+ else
+ CTR5(KTR_TOM, "waiting err=%d get_tcb_count=%d timeo=%d so=%p SBS_CANTRCVMORE=%d",
+ err, p->get_tcb_count, so->so_rcv.sb_timeo, so,
+ !!(so->so_rcv.sb_state & SBS_CANTRCVMORE));
+
+ while (p->get_tcb_count && !(so->so_rcv.sb_state & SBS_CANTRCVMORE)) {
+ if (count & 0xfffffff)
+ CTR5(KTR_TOM, "waiting err=%d get_tcb_count=%d timeo=%d so=%p count=%d",
+ err, p->get_tcb_count, so->so_rcv.sb_timeo, so, count);
+ count++;
+ err = sbwait(&so->so_rcv);
}
-
ubuf_pending = t3_ddp_ubuf_pending(toep);
}
p->cancel_ubuf = 0;
More information about the p4-projects
mailing list