> > SET_DEVICE_OP(dev_ops, read_counters); > > SET_DEVICE_OP(dev_ops, reg_dm_mr); > > SET_DEVICE_OP(dev_ops, reg_user_mr); > > + SET_DEVICE_OP(dev_ops, reg_user_mr_fd); > > SET_DEVICE_OP(dev_ops, req_ncomp_notif); > > SET_DEVICE_OP(dev_ops, req_notify_cq); > > SET_DEVICE_OP(dev_ops, rereg_user_mr); > > + SET_DEVICE_OP(dev_ops, rereg_user_mr_fd); > > I'm not so found of adding such a specific callback.. It seems better to have a generic reg_user_mr that accepts a ib_umem created by the > core code. Burying the umem_get in the drivers was probably a mistake. I totally agree. But that would require major changes to the uverbs workflow. > > > static int ib_uverbs_dereg_mr(struct uverbs_attr_bundle *attrs) { > > struct ib_uverbs_dereg_mr cmd; > > @@ -3916,7 +4081,19 @@ static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs) > > ib_uverbs_rereg_mr, > > UAPI_DEF_WRITE_UDATA_IO(struct ib_uverbs_rereg_mr, > > struct ib_uverbs_rereg_mr_resp), > > - UAPI_DEF_METHOD_NEEDS_FN(rereg_user_mr))), > > + UAPI_DEF_METHOD_NEEDS_FN(rereg_user_mr)), > > + DECLARE_UVERBS_WRITE( > > + IB_USER_VERBS_CMD_REG_MR_FD, > > + ib_uverbs_reg_mr_fd, > > + UAPI_DEF_WRITE_UDATA_IO(struct ib_uverbs_reg_mr_fd, > > + struct ib_uverbs_reg_mr_resp), > > + UAPI_DEF_METHOD_NEEDS_FN(reg_user_mr_fd)), > > + DECLARE_UVERBS_WRITE( > > + IB_USER_VERBS_CMD_REREG_MR_FD, > > + ib_uverbs_rereg_mr_fd, > > + UAPI_DEF_WRITE_UDATA_IO(struct ib_uverbs_rereg_mr_fd, > > + struct ib_uverbs_rereg_mr_resp), > > + UAPI_DEF_METHOD_NEEDS_FN(rereg_user_mr_fd))), > > New write based methods are not allowed, they have to be done as ioctl methods. > Will work on that. > Jason