Lines Matching refs:qp
254 static void put_qp_read(struct ib_qp *qp) in put_qp_read() argument
256 put_uobj_read(qp->uobject); in put_qp_read()
259 static void put_qp_write(struct ib_qp *qp) in put_qp_write() argument
261 put_uobj_write(qp->uobject); in put_qp_write()
1602 tmp.qp_num = wc->qp->qp_num; in copy_wc_to_user()
1763 struct ib_qp *qp; in create_qp() local
1862 qp = ib_create_qp(pd, &attr); in create_qp()
1864 qp = device->create_qp(pd, &attr, uhw); in create_qp()
1866 if (IS_ERR(qp)) { in create_qp()
1867 ret = PTR_ERR(qp); in create_qp()
1872 qp->real_qp = qp; in create_qp()
1873 qp->device = device; in create_qp()
1874 qp->pd = pd; in create_qp()
1875 qp->send_cq = attr.send_cq; in create_qp()
1876 qp->recv_cq = attr.recv_cq; in create_qp()
1877 qp->srq = attr.srq; in create_qp()
1878 qp->event_handler = attr.event_handler; in create_qp()
1879 qp->qp_context = attr.qp_context; in create_qp()
1880 qp->qp_type = attr.qp_type; in create_qp()
1881 atomic_set(&qp->usecnt, 0); in create_qp()
1889 qp->uobject = &obj->uevent.uobject; in create_qp()
1891 obj->uevent.uobject.object = qp; in create_qp()
1897 resp.base.qpn = qp->qp_num; in create_qp()
1941 ib_destroy_qp(qp); in create_qp()
2076 struct ib_qp *qp; in ib_uverbs_open_qp() local
2112 qp = ib_open_qp(xrcd, &attr); in ib_uverbs_open_qp()
2113 if (IS_ERR(qp)) { in ib_uverbs_open_qp()
2114 ret = PTR_ERR(qp); in ib_uverbs_open_qp()
2118 qp->uobject = &obj->uevent.uobject; in ib_uverbs_open_qp()
2120 obj->uevent.uobject.object = qp; in ib_uverbs_open_qp()
2126 resp.qpn = qp->qp_num; in ib_uverbs_open_qp()
2153 ib_destroy_qp(qp); in ib_uverbs_open_qp()
2168 struct ib_qp *qp; in ib_uverbs_query_qp() local
2183 qp = idr_read_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_query_qp()
2184 if (!qp) { in ib_uverbs_query_qp()
2189 ret = ib_query_qp(qp, attr, cmd.attr_mask, init_attr); in ib_uverbs_query_qp()
2191 put_qp_read(qp); in ib_uverbs_query_qp()
2283 struct ib_qp *qp; in ib_uverbs_modify_qp() local
2297 qp = idr_read_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_modify_qp()
2298 if (!qp) { in ib_uverbs_modify_qp()
2349 if (qp->real_qp == qp) { in ib_uverbs_modify_qp()
2350 ret = ib_resolve_eth_dmac(qp, attr, &cmd.attr_mask); in ib_uverbs_modify_qp()
2353 ret = qp->device->modify_qp(qp, attr, in ib_uverbs_modify_qp()
2354 modify_qp_mask(qp->qp_type, cmd.attr_mask), &udata); in ib_uverbs_modify_qp()
2356 ret = ib_modify_qp(qp, attr, modify_qp_mask(qp->qp_type, cmd.attr_mask)); in ib_uverbs_modify_qp()
2365 put_qp_read(qp); in ib_uverbs_modify_qp()
2381 struct ib_qp *qp; in ib_uverbs_destroy_qp() local
2393 qp = uobj->object; in ib_uverbs_destroy_qp()
2401 ret = ib_destroy_qp(qp); in ib_uverbs_destroy_qp()
2447 struct ib_qp *qp; in ib_uverbs_post_send() local
2467 qp = idr_read_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_post_send()
2468 if (!qp) in ib_uverbs_post_send()
2471 is_ud = qp->qp_type == IB_QPT_UD; in ib_uverbs_post_send()
2597 ret = qp->device->post_send(qp->real_qp, wr, &bad_wr); in ib_uverbs_post_send()
2610 put_qp_read(qp); in ib_uverbs_post_send()
2719 struct ib_qp *qp; in ib_uverbs_post_recv() local
2731 qp = idr_read_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_post_recv()
2732 if (!qp) in ib_uverbs_post_recv()
2736 ret = qp->device->post_recv(qp->real_qp, wr, &bad_wr); in ib_uverbs_post_recv()
2738 put_qp_read(qp); in ib_uverbs_post_recv()
2946 struct ib_qp *qp; in ib_uverbs_attach_mcast() local
2954 qp = idr_write_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_attach_mcast()
2955 if (!qp) in ib_uverbs_attach_mcast()
2958 obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); in ib_uverbs_attach_mcast()
2976 ret = ib_attach_mcast(qp, &mcast->gid, cmd.mlid); in ib_uverbs_attach_mcast()
2983 put_qp_write(qp); in ib_uverbs_attach_mcast()
2995 struct ib_qp *qp; in ib_uverbs_detach_mcast() local
3002 qp = idr_write_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_detach_mcast()
3003 if (!qp) in ib_uverbs_detach_mcast()
3006 ret = ib_detach_mcast(qp, (union ib_gid *) cmd.gid, cmd.mlid); in ib_uverbs_detach_mcast()
3010 obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject); in ib_uverbs_detach_mcast()
3021 put_qp_write(qp); in ib_uverbs_detach_mcast()
3080 struct ib_qp *qp; in ib_uverbs_ex_create_flow() local
3141 qp = idr_read_qp(cmd.qp_handle, file->ucontext); in ib_uverbs_ex_create_flow()
3142 if (!qp) { in ib_uverbs_ex_create_flow()
3181 flow_id = ib_create_flow(qp, flow_attr, IB_FLOW_DOMAIN_USER); in ib_uverbs_ex_create_flow()
3186 flow_id->qp = qp; in ib_uverbs_ex_create_flow()
3202 put_qp_read(qp); in ib_uverbs_ex_create_flow()
3221 put_qp_read(qp); in ib_uverbs_ex_create_flow()