Date: Sun, 10 Feb 2008 01:06:01 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135132 for review Message-ID: <200802100106.m1A1610O026116@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135132 Change 135132 by kmacy@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802100106.m1A1610O026116>