2010/4/16 Sean Hefty <[email protected]>: >>static void jm_cq_comp_handler(struct ib_cq *cq, void *context) { >> struct jm_rdma_conn *conn = context; >> struct ib_wc wc; >> struct jm_send_ctx *send; >> >> /* No idea why it should be called twice. */ >> printk("cq comp for id %p\n", conn->jc_id); >> ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); >> while (ib_poll_cq(cq, 1, &wc) == 1) { >> if (wc.opcode != IB_WC_RDMA_WRITE) { >> printk("completed unknown opcode %d\n", wc.opcode); >> /* continue; */ >> } >> send = (struct jm_send_ctx *)wc.wr_id; >> printk("got send=%p\n", send); >> printk("completed RDMA_WRITE of IO(%Lu, %u)\n", >> send->s_offset, send->s_size); >> send->s_done = wc.status == IB_WC_SUCCESS ? 1 : -EIO; >> wake_up_all(&send->s_wait); >> } >> ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); > > unrelated to your problem, but this second call to ib_req_notify_cq isn't > necessary. > >>static int jm_rdma_cm_event_handler(struct rdma_cm_id *id, struct >>rdma_cm_event >>*event) { > .. >> case RDMA_CM_EVENT_DISCONNECTED: >> connstate = -ECONNABORTED; >> goto connected; > .. >>connected: >> printk("%pI4:%u (event 0x%x)\n", >> &conn->jc_remoteaddr.sin_addr.s_addr, >> ntohs(conn->jc_remoteaddr.sin_port), >> event->event << 11); >> conn->jc_connstate = connstate; >> wake_up_all(&conn->jc_connect_wait); >> break; > > How quickly do you respond to the disconnect event? The remote side will wait > until it receives a response or times out, which may be several seconds or > minutes. > Thanks a lot, I think the problem lays here. > - Sean > >
-- Ding Dinghua -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
