Re: [PATCH for-next 1/2] RDMA/qedr: Notify user application if DPM is supported

Jason Gunthorpe
2017-06-22T15:58:48Z

On Thu, Jun 22, 2017 at 11:27:43AM +0000, Amrani, Ram wrote:
> > > +#define QEDR_LIB_UCXT_SUPPORT(field, udata, value) \
> > > + ((offsetof(struct qedr_alloc_ucontext_resp, field) < udata->outlen) ? \
> > > + (value) : 0)

> By the way, if it wasn't clear, the aspect part of the compatibility is
> achieved via the QEDR_LIB_UCXT_SUPPORT macro above.

It doesn't make any sense to do that, who cares what the value is in
the resp structure, you can't copy it, so userspace will never see
it. Do the copy properly and this macro goes away.

Jason