Lines Matching refs:bundle
69 struct uverbs_attr_bundle_hdr bundle; member
82 struct uverbs_attr_bundle *bundle; in uapi_compute_bundle_size() local
85 sizeof(*bundle->attrs) * method_elm->key_bitmap_len + in uapi_compute_bundle_size()
109 __malloc void *_uverbs_alloc(struct uverbs_attr_bundle *bundle, size_t size, in _uverbs_alloc() argument
113 container_of(&bundle->hdr, struct bundle_priv, bundle); in _uverbs_alloc()
151 static int uverbs_set_output(const struct uverbs_attr_bundle *bundle, in uverbs_set_output() argument
155 container_of(&bundle->hdr, struct bundle_priv, bundle); in uverbs_set_output()
172 struct uverbs_attr_bundle *bundle = in uverbs_process_idrs_array() local
173 container_of(&pbundle->bundle, struct uverbs_attr_bundle, hdr); in uverbs_process_idrs_array()
192 uverbs_alloc(bundle, in uverbs_process_idrs_array()
217 idr_vals[i], bundle); in uverbs_process_idrs_array()
248 struct uverbs_attr_bundle *bundle = in uverbs_process_attr() local
249 container_of(&pbundle->bundle, struct uverbs_attr_bundle, hdr); in uverbs_process_attr()
250 struct uverbs_attr *e = &bundle->attrs[attr_bkey]; in uverbs_process_attr()
298 p = uverbs_alloc(bundle, uattr->len); in uverbs_process_attr()
331 uattr->data_s64, bundle); in uverbs_process_attr()
416 if (test_bit(attr_bkey, pbundle->bundle.attr_present)) in uverbs_set_attr()
423 __set_bit(attr_bkey, pbundle->bundle.attr_present); in uverbs_set_attr()
432 struct uverbs_attr_bundle *bundle = in ib_uverbs_run_method() local
433 container_of(&pbundle->bundle, struct uverbs_attr_bundle, hdr); in ib_uverbs_run_method()
442 &pbundle->bundle.ufile->device->disassociate_srcu); in ib_uverbs_run_method()
446 pbundle->uattrs = uverbs_alloc(bundle, uattrs_size); in ib_uverbs_run_method()
460 pbundle->bundle.attr_present, in ib_uverbs_run_method()
465 uverbs_fill_udata(bundle, &pbundle->bundle.driver_udata, in ib_uverbs_run_method()
468 pbundle->bundle.driver_udata = (struct ib_udata){}; in ib_uverbs_run_method()
471 struct uverbs_obj_attr *destroy_attr = &bundle->attrs[destroy_bkey].obj_attr; in ib_uverbs_run_method()
473 ret = uobj_destroy(destroy_attr->uobject, bundle); in ib_uverbs_run_method()
478 ret = handler(bundle); in ib_uverbs_run_method()
481 ret = handler(bundle); in ib_uverbs_run_method()
491 uverbs_attr_get(bundle, UVERBS_ATTR_UHW_OUT); in ib_uverbs_run_method()
494 ret = uverbs_set_output(bundle, attr); in ib_uverbs_run_method()
511 struct uverbs_attr_bundle *bundle = in bundle_destroy() local
512 container_of(&pbundle->bundle, struct uverbs_attr_bundle, hdr); in bundle_destroy()
520 struct uverbs_attr *attr = &bundle->attrs[i]; in bundle_destroy()
526 commit, bundle); in bundle_destroy()
532 struct uverbs_attr *attr = &bundle->attrs[i]; in bundle_destroy()
546 commit, bundle); in bundle_destroy()
600 pbundle->bundle.ufile = ufile; in ib_uverbs_cmd_verbs()
601 pbundle->bundle.context = NULL; /* only valid if bundle has uobject */ in ib_uverbs_cmd_verbs()
608 sizeof(*container_of(&pbundle->bundle, in ib_uverbs_cmd_verbs()
611 memset(pbundle->bundle.attr_present, 0, in ib_uverbs_cmd_verbs()
612 sizeof(pbundle->bundle.attr_present)); in ib_uverbs_cmd_verbs()
708 void uverbs_fill_udata(struct uverbs_attr_bundle *bundle, in uverbs_fill_udata() argument
713 container_of(&bundle->hdr, struct bundle_priv, bundle); in uverbs_fill_udata()
715 container_of(&pbundle->bundle, struct uverbs_attr_bundle, hdr); in uverbs_fill_udata()
743 int uverbs_copy_to(const struct uverbs_attr_bundle *bundle, size_t idx, in uverbs_copy_to() argument
746 const struct uverbs_attr *attr = uverbs_attr_get(bundle, idx); in uverbs_copy_to()
756 return uverbs_set_output(bundle, attr); in uverbs_copy_to()
765 int uverbs_output_written(const struct uverbs_attr_bundle *bundle, size_t idx) in uverbs_output_written() argument
767 const struct uverbs_attr *attr = uverbs_attr_get(bundle, idx); in uverbs_output_written()
772 return uverbs_set_output(bundle, attr); in uverbs_output_written()
822 int uverbs_copy_to_struct_or_zero(const struct uverbs_attr_bundle *bundle, in uverbs_copy_to_struct_or_zero() argument
825 const struct uverbs_attr *attr = uverbs_attr_get(bundle, idx); in uverbs_copy_to_struct_or_zero()
835 return uverbs_copy_to(bundle, idx, from, size); in uverbs_copy_to_struct_or_zero()
840 void uverbs_finalize_uobj_create(const struct uverbs_attr_bundle *bundle, in uverbs_finalize_uobj_create() argument
844 container_of(&bundle->hdr, struct bundle_priv, bundle); in uverbs_finalize_uobj_create()