Re: [PATCH rdma-next v1 4/8] IB/uverbs: Add device memory registration ioctl support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 02, 2018 at 03:18:26PM +0000, Ruhl, Michael J wrote:
> >-----Original Message-----
> >From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
> >owner@xxxxxxxxxxxxxxx] On Behalf Of Leon Romanovsky
> >Sent: Sunday, April 1, 2018 8:08 AM
> >To: Doug Ledford <dledford@xxxxxxxxxx>; Jason Gunthorpe
> ><jgg@xxxxxxxxxxxx>
> >Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-
> >rdma@xxxxxxxxxxxxxxx>; Ariel Levkovich <lariel@xxxxxxxxxxxx>; Saeed
> >Mahameed <saeedm@xxxxxxxxxxxx>
> >Subject: [PATCH rdma-next v1 4/8] IB/uverbs: Add device memory registration
> >ioctl support
> >
> >From: Ariel Levkovich <lariel@xxxxxxxxxxxx>
> >
> >Adding new ioctl method for the MR object - REG_DM_MR.
> >
> >This command can be used by users to register an allocated
> >device memory buffer as an MR and receive lkey and rkey
> >to be used within work requests.
> >
> >It is added as a new method under the MR object and using a new
> >ib_device callback - reg_dm_mr.
> >The command creates a standard ib_mr object which represents the
> >registered memory.
> >
> >Signed-off-by: Ariel Levkovich <lariel@xxxxxxxxxxxx>
> >Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >---
> >++++++++++++++++++++++++++
> > include/rdma/uverbs_ioctl.h                   |  12 +++
> > 7 files changed, 186 insertions(+), 12 deletions(-)
> > create mode 100644 drivers/infiniband/core/uverbs_std_types_mr.c
> >
> >diff --git a/include/rdma/uverbs_ioctl.h b/include/rdma/uverbs_ioctl.h
> >index 3d6ac684b8f0..4a4201d997a7 100644
> >--- a/include/rdma/uverbs_ioctl.h
> >+++ b/include/rdma/uverbs_ioctl.h
> >@@ -408,6 +408,18 @@ static inline int uverbs_attr_get_enum_id(const struct
> >uverbs_attr_bundle *attrs
> > 	return attr->ptr_attr.enum_id;
> > }
> >
> >+static inline void *uverbs_attr_get_obj(const struct uverbs_attr_bundle
> >*attrs_bundle,
> >+					u16 idx)
> >+{
> >+	struct ib_uobject *uobj =
> >+		uverbs_attr_get(attrs_bundle, idx)->obj_attr.uobject;
> >+
> >+	if (IS_ERR(uobj))
> >+		return uobj;
> >+
> >+	return uobj->object;
> >+}
> >+
>
> I know that this patch set is being added augment the functionality of
> the base IOCTL interface, but this change appears to be very useful to
> the overall usage of the IOCTL interface.
>
> Should new, general functions like this, be split into separate patches,
> so that if the main patches are not accepted (or they morph into something
> else), utilities like uverbs_attr_get_object() are not lost in the shuffle?

Let's be positive and hope that the current patch set in good shape to
be accepted. Anyway I don't expect to see acceptance of "sub-patches"
without main user.

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux