From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH for-next 1/2] RDMA/qedr: Notify user application if DPM is supported Date: Thu, 22 Jun 2017 09:58:48 -0600 Message-ID: <20170622155848.GA5771@obsidianresearch.com> References: <1497790871-23945-1-git-send-email-Ram.Amrani@cavium.com> <1497790871-23945-2-git-send-email-Ram.Amrani@cavium.com> <20170619155553.GB10188@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Amrani, Ram" Cc: "dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org" , "Elior, Ariel" , "Kalderon, Michal" , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org 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 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html