Lines Matching refs:uobj
192 struct ib_uobject *uobj = ufd_get_read(UVERBS_OBJECT_COMP_CHANNEL,
195 if (IS_ERR(uobj))
196 return (void *)uobj;
198 uverbs_uobject_get(uobj);
199 uobj_put_read(uobj);
201 return container_of(uobj, struct ib_uverbs_completion_event_file,
202 uobj);
300 struct ib_uobject *uobj;
311 uobj = uobj_alloc(UVERBS_OBJECT_ASYNC_EVENT, attrs, &ib_dev);
312 if (IS_ERR(uobj)) {
313 ret = PTR_ERR(uobj);
319 .async_fd = uobj->id,
330 container_of(uobj, struct ib_uverbs_async_event_file, uobj));
331 rdma_alloc_commit_uobject(uobj, attrs);
335 rdma_alloc_abort_uobject(uobj, attrs, false);
442 struct ib_uobject *uobj;
451 uobj = uobj_alloc(UVERBS_OBJECT_PD, attrs, &ib_dev);
452 if (IS_ERR(uobj))
453 return PTR_ERR(uobj);
462 pd->uobject = uobj;
473 uobj->object = pd;
474 uobj_finalize_uobj_create(uobj, attrs);
476 resp.pd_handle = uobj->id;
483 uobj_alloc_abort(uobj, attrs);
716 struct ib_uobject *uobj;
729 uobj = uobj_alloc(UVERBS_OBJECT_MR, attrs, &ib_dev);
730 if (IS_ERR(uobj))
731 return PTR_ERR(uobj);
756 mr->uobject = uobj;
765 uobj->object = mr;
767 uobj_finalize_uobj_create(uobj, attrs);
771 resp.mr_handle = uobj->id;
777 uobj_alloc_abort(uobj, attrs);
787 struct ib_uobject *uobj;
808 uobj = uobj_get_write(UVERBS_OBJECT_MR, cmd.mr_handle, attrs);
809 if (IS_ERR(uobj))
810 return PTR_ERR(uobj);
812 mr = uobj->object;
858 new_mr->uobject = uobj;
867 * The new uobj for the new HW object is put into the same spot
868 * in the IDR and the old uobj & HW object is deleted.
870 rdma_assign_uobject(uobj, new_uobj, attrs);
872 uobj_put_destroy(uobj);
874 uobj = NULL;
902 if (uobj)
903 uobj_put_write(uobj);
924 struct ib_uobject *uobj;
934 uobj = uobj_alloc(UVERBS_OBJECT_MW, attrs, &ib_dev);
935 if (IS_ERR(uobj))
936 return PTR_ERR(uobj);
957 mw->uobject = uobj;
966 uobj->object = mw;
968 uobj_finalize_uobj_create(uobj, attrs);
971 resp.mw_handle = uobj->id;
979 uobj_alloc_abort(uobj, attrs);
999 struct ib_uobject *uobj;
1008 uobj = uobj_alloc(UVERBS_OBJECT_COMP_CHANNEL, attrs, &ib_dev);
1009 if (IS_ERR(uobj))
1010 return PTR_ERR(uobj);
1012 ev_file = container_of(uobj, struct ib_uverbs_completion_event_file,
1013 uobj);
1015 uobj_finalize_uobj_create(uobj, attrs);
1017 resp.fd = uobj->id;
1079 uverbs_uobject_get(&obj->uevent.event_file->uobj);
1273 struct ib_uobject *uobj;
1281 uobj = uobj_get_destroy(UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
1282 if (IS_ERR(uobj))
1283 return PTR_ERR(uobj);
1285 obj = container_of(uobj, struct ib_ucq_object, uevent.uobject);
1290 uobj_put_destroy(uobj);
1473 uverbs_uobject_get(&obj->uevent.event_file->uobj);
1987 struct ib_uobject *uobj;
1995 uobj = uobj_get_destroy(UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
1996 if (IS_ERR(uobj))
1997 return PTR_ERR(uobj);
1999 obj = container_of(uobj, struct ib_uqp_object, uevent.uobject);
2003 uobj_put_destroy(uobj);
2420 struct ib_uobject *uobj;
2431 uobj = uobj_alloc(UVERBS_OBJECT_AH, attrs, &ib_dev);
2432 if (IS_ERR(uobj))
2433 return PTR_ERR(uobj);
2470 ah->uobject = uobj;
2471 uobj->user_handle = cmd.user_handle;
2472 uobj->object = ah;
2474 uobj_finalize_uobj_create(uobj, attrs);
2476 resp.ah_handle = uobj->id;
2482 uobj_alloc_abort(uobj, attrs);
2970 uverbs_uobject_get(&obj->uevent.event_file->uobj);
2999 struct ib_uobject *uobj;
3011 uobj = uobj_get_destroy(UVERBS_OBJECT_WQ, cmd.wq_handle, attrs);
3012 if (IS_ERR(uobj))
3013 return PTR_ERR(uobj);
3015 obj = container_of(uobj, struct ib_uwq_object, uevent.uobject);
3018 uobj_put_destroy(uobj);
3078 struct ib_uobject *uobj;
3134 uobj = uobj_alloc(UVERBS_OBJECT_RWQ_IND_TBL, attrs, &ib_dev);
3135 if (IS_ERR(uobj)) {
3136 err = PTR_ERR(uobj);
3151 rwq_ind_tbl->uobject = uobj;
3152 uobj->object = rwq_ind_tbl;
3165 uobj_finalize_uobj_create(uobj, attrs);
3167 resp.ind_tbl_handle = uobj->id;
3175 uobj_alloc_abort(uobj, attrs);
3208 struct ib_uobject *uobj;
3269 uobj = uobj_alloc(UVERBS_OBJECT_FLOW, attrs, &ib_dev);
3270 if (IS_ERR(uobj)) {
3271 err = PTR_ERR(uobj);
3275 if (!rdma_is_port_valid(uobj->context->device, cmd.flow_attr.port)) {
3343 ib_set_flow(uobj, flow_id, qp, qp->device, uflow_res);
3351 uobj_finalize_uobj_create(uobj, attrs);
3353 resp.flow_handle = uobj->id;
3364 uobj_alloc_abort(uobj, attrs);
3459 uverbs_uobject_get(&obj->uevent.event_file->uobj);
3595 struct ib_uobject *uobj;
3603 uobj = uobj_get_destroy(UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
3604 if (IS_ERR(uobj))
3605 return PTR_ERR(uobj);
3607 obj = container_of(uobj, struct ib_uevent_object, uobject);
3611 uobj_put_destroy(uobj);