Date: Fri, 11 Jan 2008 17:44:29 GMT From: Steve Wise <swise@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 133057 for review Message-ID: <200801111744.m0BHiTYx019112@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133057 Change 133057 by swise@swise:vic10:iwarp on 2008/01/11 17:43:32 Don't post TID_RELEASE message The LLD does this for us in cxgb3_remove_tid(). Also fixed active open failure cases where we also shouldn't be releasing the TID. Affected files ... .. //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#11 edit Differences ... ==== //depot/projects/iwarp/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_iwch_cm.c#11 (text+ko) ==== @@ -309,8 +309,6 @@ cxgb_remove_tid(ep->com.tdev, (void *)ep, ep->hwtid); RTFREE(ep->dst); l2t_release(L2DATA(ep->com.tdev), ep->l2t); - if (ep->com.tdev->type == T3B) - release_tid(ep->com.tdev, ep->hwtid, NULL); put_ep(&ep->com); } @@ -1181,6 +1179,16 @@ return CPL_RET_BUF_DONE; } +/* + * Return whether a failed active open has allocated a TID + */ +static inline int act_open_has_tid(int status) +{ + return status != CPL_ERR_TCAM_FULL && status != CPL_ERR_CONN_EXIST && + status != CPL_ERR_ARP_MISS; +} + + static int act_open_rpl(struct t3cdev *tdev, struct mbuf *m, void *ctx) { @@ -1191,7 +1199,7 @@ status2errno(rpl->status)); connect_reply_upcall(ep, status2errno(rpl->status)); state_set(&ep->com, DEAD); - if (ep->com.tdev->type == T3B) + if (ep->com.tdev->type == T3B && act_open_has_tid(rpl->status)) release_tid(ep->com.tdev, GET_TID(rpl), NULL); cxgb_free_atid(ep->com.tdev, ep->atid); RTFREE(ep->dst);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801111744.m0BHiTYx019112>