On Mon, Mar 18, 2019 at 11:37:56AM +0200, Shamir Rabinovitch wrote: > > > + rdma_lookup_get_uobject(uobj_get_type(_attrs, _type), (_attrs)->ufile, \ > > > + _uobj_check_id(_id), UVERBS_LOOKUP_READ, _attrs) > > > +/* > > > + * NOTE: no need to pass _attrs down to rdma_lookup_get_uobject here because > > > + * rdma_lookup_get_uobject is only used to set the ucontext for idr uobjects... > > > + */ > > > #define ufd_get_read(_type, _fdnum, _attrs) \ > > > rdma_lookup_get_uobject(uobj_get_type(_attrs, _type), (_attrs)->ufile, \ > > > (_fdnum)*typecheck(s32, _fdnum), \ > > > - UVERBS_LOOKUP_READ) > > > + UVERBS_LOOKUP_READ, NULL) > > > > ?? fd's have ubojects too, why wouldn't we pass the attrs?? > > Are those uobjects point to ib_x objects that are owned by the driver > layer? I thought no... mlx5/devx recently added a user in this category. Even if not, it doesn't make sense to go out of the way to create the asymmetry. If we have a attrs & uobject we should have the ucontext cached in the attrs. Jason