Lines Matching refs:rc

225 	int budget, count, rc;  in rpcrdma_sendcq_poll()  local
231 rc = ib_poll_cq(cq, RPCRDMA_POLLSIZE, wcs); in rpcrdma_sendcq_poll()
232 if (rc <= 0) in rpcrdma_sendcq_poll()
233 return rc; in rpcrdma_sendcq_poll()
235 count = rc; in rpcrdma_sendcq_poll()
238 } while (rc == RPCRDMA_POLLSIZE && --budget); in rpcrdma_sendcq_poll()
254 int rc; in rpcrdma_sendcq_upcall() local
256 rc = rpcrdma_sendcq_poll(cq, ep); in rpcrdma_sendcq_upcall()
257 if (rc) { in rpcrdma_sendcq_upcall()
259 __func__, rc); in rpcrdma_sendcq_upcall()
263 rc = ib_req_notify_cq(cq, in rpcrdma_sendcq_upcall()
265 if (rc == 0) in rpcrdma_sendcq_upcall()
267 if (rc < 0) { in rpcrdma_sendcq_upcall()
269 __func__, rc); in rpcrdma_sendcq_upcall()
315 int budget, count, rc; in rpcrdma_recvcq_poll() local
322 rc = ib_poll_cq(cq, RPCRDMA_POLLSIZE, wcs); in rpcrdma_recvcq_poll()
323 if (rc <= 0) in rpcrdma_recvcq_poll()
326 count = rc; in rpcrdma_recvcq_poll()
329 } while (rc == RPCRDMA_POLLSIZE && --budget); in rpcrdma_recvcq_poll()
330 rc = 0; in rpcrdma_recvcq_poll()
334 return rc; in rpcrdma_recvcq_poll()
353 int rc; in rpcrdma_recvcq_upcall() local
355 rc = rpcrdma_recvcq_poll(cq, ep); in rpcrdma_recvcq_upcall()
356 if (rc) { in rpcrdma_recvcq_upcall()
358 __func__, rc); in rpcrdma_recvcq_upcall()
362 rc = ib_req_notify_cq(cq, in rpcrdma_recvcq_upcall()
364 if (rc == 0) in rpcrdma_recvcq_upcall()
366 if (rc < 0) { in rpcrdma_recvcq_upcall()
368 __func__, rc); in rpcrdma_recvcq_upcall()
508 int rc; in rpcrdma_create_id() local
514 rc = PTR_ERR(id); in rpcrdma_create_id()
516 __func__, rc); in rpcrdma_create_id()
521 rc = rdma_resolve_addr(id, NULL, addr, RDMA_RESOLVE_TIMEOUT); in rpcrdma_create_id()
522 if (rc) { in rpcrdma_create_id()
524 __func__, rc); in rpcrdma_create_id()
529 rc = ia->ri_async_rc; in rpcrdma_create_id()
530 if (rc) in rpcrdma_create_id()
534 rc = rdma_resolve_route(id, RDMA_RESOLVE_TIMEOUT); in rpcrdma_create_id()
535 if (rc) { in rpcrdma_create_id()
537 __func__, rc); in rpcrdma_create_id()
542 rc = ia->ri_async_rc; in rpcrdma_create_id()
543 if (rc) in rpcrdma_create_id()
550 return ERR_PTR(rc); in rpcrdma_create_id()
582 int rc, mem_priv; in rpcrdma_ia_open() local
588 rc = PTR_ERR(ia->ri_id); in rpcrdma_ia_open()
594 rc = PTR_ERR(ia->ri_pd); in rpcrdma_ia_open()
596 __func__, rc); in rpcrdma_ia_open()
600 rc = ib_query_device(ia->ri_id->device, devattr); in rpcrdma_ia_open()
601 if (rc) { in rpcrdma_ia_open()
603 __func__, rc); in rpcrdma_ia_open()
660 rc = -ENOMEM; in rpcrdma_ia_open()
667 rc = -ENOMEM; in rpcrdma_ia_open()
686 return rc; in rpcrdma_ia_open()
697 int rc; in rpcrdma_ia_close() local
701 rc = ib_dereg_mr(ia->ri_bind_mem); in rpcrdma_ia_close()
703 __func__, rc); in rpcrdma_ia_close()
712 rc = ib_dealloc_pd(ia->ri_pd); in rpcrdma_ia_close()
714 __func__, rc); in rpcrdma_ia_close()
727 int rc, err; in rpcrdma_ep_create() local
737 rc = ia->ri_ops->ro_open(ia, ep, cdata); in rpcrdma_ep_create()
738 if (rc) in rpcrdma_ep_create()
739 return rc; in rpcrdma_ep_create()
778 rc = PTR_ERR(sendcq); in rpcrdma_ep_create()
780 __func__, rc); in rpcrdma_ep_create()
784 rc = ib_req_notify_cq(sendcq, IB_CQ_NEXT_COMP); in rpcrdma_ep_create()
785 if (rc) { in rpcrdma_ep_create()
787 __func__, rc); in rpcrdma_ep_create()
795 rc = PTR_ERR(recvcq); in rpcrdma_ep_create()
797 __func__, rc); in rpcrdma_ep_create()
801 rc = ib_req_notify_cq(recvcq, IB_CQ_NEXT_COMP); in rpcrdma_ep_create()
802 if (rc) { in rpcrdma_ep_create()
804 __func__, rc); in rpcrdma_ep_create()
839 return rc; in rpcrdma_ep_create()
852 int rc; in rpcrdma_ep_destroy() local
868 rc = ib_destroy_cq(ep->rep_attr.recv_cq); in rpcrdma_ep_destroy()
869 if (rc) in rpcrdma_ep_destroy()
871 __func__, rc); in rpcrdma_ep_destroy()
874 rc = ib_destroy_cq(ep->rep_attr.send_cq); in rpcrdma_ep_destroy()
875 if (rc) in rpcrdma_ep_destroy()
877 __func__, rc); in rpcrdma_ep_destroy()
887 int rc = 0; in rpcrdma_ep_connect() local
904 rc = -EHOSTUNREACH; in rpcrdma_ep_connect()
918 rc = -ENETUNREACH; in rpcrdma_ep_connect()
922 rc = rdma_create_qp(id, ia->ri_pd, &ep->rep_attr); in rpcrdma_ep_connect()
923 if (rc) { in rpcrdma_ep_connect()
925 __func__, rc); in rpcrdma_ep_connect()
927 rc = -ENETUNREACH; in rpcrdma_ep_connect()
940 rc = rdma_create_qp(ia->ri_id, ia->ri_pd, &ep->rep_attr); in rpcrdma_ep_connect()
941 if (rc) { in rpcrdma_ep_connect()
943 __func__, rc); in rpcrdma_ep_connect()
951 rc = rdma_connect(ia->ri_id, &ep->rep_remote_cma); in rpcrdma_ep_connect()
952 if (rc) { in rpcrdma_ep_connect()
954 __func__, rc); in rpcrdma_ep_connect()
984 rc = ep->rep_connected; in rpcrdma_ep_connect()
990 if (rc) in rpcrdma_ep_connect()
991 ep->rep_connected = rc; in rpcrdma_ep_connect()
992 return rc; in rpcrdma_ep_connect()
1007 int rc; in rpcrdma_ep_disconnect() local
1010 rc = rdma_disconnect(ia->ri_id); in rpcrdma_ep_disconnect()
1011 if (!rc) { in rpcrdma_ep_disconnect()
1018 dprintk("RPC: %s: rdma_disconnect %i\n", __func__, rc); in rpcrdma_ep_disconnect()
1019 ep->rep_connected = rc; in rpcrdma_ep_disconnect()
1042 int rc; in rpcrdma_create_rep() local
1044 rc = -ENOMEM; in rpcrdma_create_rep()
1052 rc = PTR_ERR(rep->rr_rdmabuf); in rpcrdma_create_rep()
1062 return ERR_PTR(rc); in rpcrdma_create_rep()
1073 int i, rc; in rpcrdma_buffer_create() local
1091 rc = -ENOMEM; in rpcrdma_buffer_create()
1101 rc = ia->ri_ops->ro_init(r_xprt); in rpcrdma_buffer_create()
1102 if (rc) in rpcrdma_buffer_create()
1113 rc = PTR_ERR(req); in rpcrdma_buffer_create()
1122 rc = PTR_ERR(rep); in rpcrdma_buffer_create()
1131 return rc; in rpcrdma_buffer_create()
1228 int rc; in rpcrdma_retry_local_inv() local
1245 rc = ib_post_send(ia->ri_id->qp, &invalidate_wr, &bad_wr); in rpcrdma_retry_local_inv()
1247 if (rc) { in rpcrdma_retry_local_inv()
1251 __func__, rc); in rpcrdma_retry_local_inv()
1453 int rc; in rpcrdma_register_internal() local
1487 rc = PTR_ERR(mr); in rpcrdma_register_internal()
1488 dprintk("RPC: %s: failed with %i\n", __func__, rc); in rpcrdma_register_internal()
1492 rc = 0; in rpcrdma_register_internal()
1495 return rc; in rpcrdma_register_internal()
1502 int rc; in rpcrdma_deregister_internal() local
1510 rc = ib_dereg_mr(mr); in rpcrdma_deregister_internal()
1511 if (rc) in rpcrdma_deregister_internal()
1512 dprintk("RPC: %s: ib_dereg_mr failed %i\n", __func__, rc); in rpcrdma_deregister_internal()
1513 return rc; in rpcrdma_deregister_internal()
1535 int rc; in rpcrdma_alloc_regbuf() local
1537 rc = -ENOMEM; in rpcrdma_alloc_regbuf()
1544 rc = rpcrdma_register_internal(ia, rb->rg_base, size, in rpcrdma_alloc_regbuf()
1546 if (rc) in rpcrdma_alloc_regbuf()
1554 return ERR_PTR(rc); in rpcrdma_alloc_regbuf()
1583 int rc; in rpcrdma_ep_post() local
1586 rc = rpcrdma_ep_post_recv(ia, ep, rep); in rpcrdma_ep_post()
1587 if (rc) in rpcrdma_ep_post()
1615 rc = ib_post_send(ia->ri_id->qp, &send_wr, &send_wr_fail); in rpcrdma_ep_post()
1616 if (rc) in rpcrdma_ep_post()
1618 rc); in rpcrdma_ep_post()
1620 return rc; in rpcrdma_ep_post()
1632 int rc; in rpcrdma_ep_post_recv() local
1644 rc = ib_post_recv(ia->ri_id->qp, &recv_wr, &recv_wr_fail); in rpcrdma_ep_post_recv()
1646 if (rc) in rpcrdma_ep_post_recv()
1648 rc); in rpcrdma_ep_post_recv()
1649 return rc; in rpcrdma_ep_post_recv()