aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgb/ulp/tom
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2013-07-03 09:25:29 +0000
committerNavdeep Parhar <np@FreeBSD.org>2013-07-03 09:25:29 +0000
commitbd85dcc4ec5bce61d07b9624cf50cb9ff6806500 (patch)
tree06f7e8be18ae4c4c0d42376d665b4b38c6f50706 /sys/dev/cxgb/ulp/tom
parenta1e0b6a52a12707aeed424c88b908988019c3703 (diff)
Notes
Diffstat (limited to 'sys/dev/cxgb/ulp/tom')
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
index 16b5394a4be6..49ad0745cb2f 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
@@ -880,10 +880,10 @@ act_open_rpl_status_to_errno(int status)
case CPL_ERR_CONN_TIMEDOUT:
return (ETIMEDOUT);
case CPL_ERR_TCAM_FULL:
- return (ENOMEM);
+ return (EAGAIN);
case CPL_ERR_CONN_EXIST:
log(LOG_ERR, "ACTIVE_OPEN_RPL: 4-tuple in use\n");
- return (EADDRINUSE);
+ return (EAGAIN);
default:
return (EIO);
}
@@ -912,8 +912,7 @@ do_act_open_rpl(struct sge_qset *qs, struct rsp_desc *r, struct mbuf *m)
unsigned int atid = G_TID(ntohl(rpl->atid));
struct toepcb *toep = lookup_atid(&td->tid_maps, atid);
struct inpcb *inp = toep->tp_inp;
- struct tcpcb *tp = intotcpcb(inp);
- int s = rpl->status;
+ int s = rpl->status, rc;
CTR3(KTR_CXGB, "%s: atid %u, status %u ", __func__, atid, s);
@@ -923,17 +922,14 @@ do_act_open_rpl(struct sge_qset *qs, struct rsp_desc *r, struct mbuf *m)
if (act_open_has_tid(s))
queue_tid_release(tod, GET_TID(rpl));
- if (s == CPL_ERR_TCAM_FULL || s == CPL_ERR_CONN_EXIST) {
- INP_WLOCK(inp);
- toe_connect_failed(tod, tp, EAGAIN);
- toepcb_release(toep); /* unlocks inp */
- } else {
+ rc = act_open_rpl_status_to_errno(s);
+ if (rc != EAGAIN)
INP_INFO_WLOCK(&V_tcbinfo);
- INP_WLOCK(inp);
- toe_connect_failed(tod, tp, act_open_rpl_status_to_errno(s));
- toepcb_release(toep); /* unlocks inp */
+ INP_WLOCK(inp);
+ toe_connect_failed(tod, inp, rc);
+ toepcb_release(toep); /* unlocks inp */
+ if (rc != EAGAIN)
INP_INFO_WUNLOCK(&V_tcbinfo);
- }
m_freem(m);
return (0);