> From: Jason Gunthorpe [mailto:jgg@xxxxxxxxxxxx] > Sent: Monday, July 9, 2018 8:09 PM > On Sun, Jul 08, 2018 at 04:59:51PM +0300, Yuval Bason wrote: > > > diff --git a/drivers/infiniband/hw/qedr/verbs.c > > b/drivers/infiniband/hw/qedr/verbs.c > > index b2a7ec4..a065a6a 100644 > > +++ b/drivers/infiniband/hw/qedr/verbs.c > > @@ -65,6 +65,14 @@ static inline int qedr_ib_copy_to_udata(struct > ib_udata *udata, void *src, > > return ib_copy_to_udata(udata, src, min_len); } > > > > +static inline int qedr_ib_copy_from_udata(void *dest, struct ib_udata > *udata, > > + size_t len) { > > + size_t min_len = min_t(size_t, len, udata->inlen); > > + > > + return ib_copy_from_udata(dest, udata, min_len); } > > Can we please not have these sorts of common things inlined in drivers? > Same for copy_to Ok. Will send separate patch for ib_verbs.h > > This should also zero fill the trailing data. Should we add this to common function? It is already handled in the calling function. > > > @@ -1471,7 +1566,10 @@ int qedr_destroy_srq(struct ib_srq *ibsrq) > > in_params.srq_id = srq->srq_id; > > dev->ops->rdma_destroy_srq(dev->rdma_ctx, &in_params); > > > > - qedr_free_srq_kernel_params(srq); > > + if (ibsrq->pd->uobject && ibsrq->pd->uobject->context) > > What is the test for uobject->context doing? If uboject exists then > uobject->context is always valid. > > > +struct qedr_create_srq_ureq { > > + /* user space virtual address of producer pair */ > > + __u64 prod_pair_addr; > > + > > + /* user space virtual address of SRQ buffer */ > > + __u64 srq_addr; > > + > > + /* length of SRQ buffer */ > > + __u64 srq_len; > > +}; > > + > > +struct qedr_create_srq_uresp { > > + __u16 srq_id; > > +}; > > Surprising this compiles in rdma-core.. > > Oh look, the rdma-core patch changes it: > > +struct qedr_create_srq_uresp { > + __u16 srq_id; > + __u16 reserved0; > + __u32 reserved1; > +}; > > Words fail me. :( > > You must use the kernel-headers/update script in rdma-core to make any > changes to the kernel-headers directory. Oops. Will fix that. > > Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html