diff mbox

[for-rc,6/6] RDMA/vmw_pvrdma: Add UAR SRQ macros in ABI header file

Message ID 20171208190317.GA3636@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com (mailing list archive)
State Superseded
Headers show

Commit Message

Bryan Tan Dec. 8, 2017, 7:03 p.m. UTC
Add the two UAR SRQ macros that are required by the userlevel
library.

Fixes: 8b10ba783c9d ("RDMA/vmw_pvrdma: Add shared receive queue support")
Reviewed-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Bryan Tan <bryantan@vmware.com>
---
 include/uapi/rdma/vmw_pvrdma-abi.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jason Gunthorpe Dec. 8, 2017, 11:28 p.m. UTC | #1
On Fri, Dec 08, 2017 at 11:03:26AM -0800, Bryan Tan wrote:
> Add the two UAR SRQ macros that are required by the userlevel
> library.
> 
> Fixes: 8b10ba783c9d ("RDMA/vmw_pvrdma: Add shared receive queue support")
> Reviewed-by: Adit Ranadive <aditr@vmware.com>
> Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
> Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
> Signed-off-by: Bryan Tan <bryantan@vmware.com>
>  include/uapi/rdma/vmw_pvrdma-abi.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h
> index aaa352f..4007cac 100644
> +++ b/include/uapi/rdma/vmw_pvrdma-abi.h
> @@ -58,6 +58,8 @@
>  #define PVRDMA_UAR_CQ_ARM_SOL		BIT(29)		/* Arm solicited bit. */
>  #define PVRDMA_UAR_CQ_ARM		BIT(30)		/* Arm bit. */
>  #define PVRDMA_UAR_CQ_POLL		BIT(31)		/* Poll bit. */
> +#define PVRDMA_UAR_SRQ_OFFSET		8		/* SRQ doorbell. */
> +#define PVRDMA_UAR_SRQ_RECV		BIT(30)		/* Recv bit. */

I didn't think BIT() was allowed in uapi headers? Where does it get
defined in user space?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Bryan Tan Dec. 11, 2017, 6:35 p.m. UTC | #2
On Fri, Dec 08, 2017 at 04:28:09PM -0700, Jason Gunthorpe wrote:
> On Fri, Dec 08, 2017 at 11:03:26AM -0800, Bryan Tan wrote:
> > Add the two UAR SRQ macros that are required by the userlevel
> > library.
> > 
> > Fixes: 8b10ba783c9d ("RDMA/vmw_pvrdma: Add shared receive queue support")
> > Reviewed-by: Adit Ranadive <aditr@vmware.com>
> > Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
> > Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
> > Signed-off-by: Bryan Tan <bryantan@vmware.com>
> >  include/uapi/rdma/vmw_pvrdma-abi.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h
> > index aaa352f..4007cac 100644
> > +++ b/include/uapi/rdma/vmw_pvrdma-abi.h
> > @@ -58,6 +58,8 @@
> >  #define PVRDMA_UAR_CQ_ARM_SOL		BIT(29)		/* Arm solicited bit. */
> >  #define PVRDMA_UAR_CQ_ARM		BIT(30)		/* Arm bit. */
> >  #define PVRDMA_UAR_CQ_POLL		BIT(31)		/* Poll bit. */
> > +#define PVRDMA_UAR_SRQ_OFFSET		8		/* SRQ doorbell. */
> > +#define PVRDMA_UAR_SRQ_RECV		BIT(30)		/* Recv bit. */
> 
> I didn't think BIT() was allowed in uapi headers? Where does it get
> defined in user space?
> 
> Jason

Looks like we had BIT() defined in userspace. Seems like the rest of
the headers just use a bit shift? If that's fine I can send out a V2
with the BIT()s removed.

Bryan
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe Dec. 11, 2017, 8:12 p.m. UTC | #3
On Mon, Dec 11, 2017 at 10:35:55AM -0800, Bryan Tan wrote:
> On Fri, Dec 08, 2017 at 04:28:09PM -0700, Jason Gunthorpe wrote:
> > On Fri, Dec 08, 2017 at 11:03:26AM -0800, Bryan Tan wrote:
> > > Add the two UAR SRQ macros that are required by the userlevel
> > > library.
> > > 
> > > Fixes: 8b10ba783c9d ("RDMA/vmw_pvrdma: Add shared receive queue support")
> > > Reviewed-by: Adit Ranadive <aditr@vmware.com>
> > > Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
> > > Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
> > > Signed-off-by: Bryan Tan <bryantan@vmware.com>
> > >  include/uapi/rdma/vmw_pvrdma-abi.h | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h
> > > index aaa352f..4007cac 100644
> > > +++ b/include/uapi/rdma/vmw_pvrdma-abi.h
> > > @@ -58,6 +58,8 @@
> > >  #define PVRDMA_UAR_CQ_ARM_SOL		BIT(29)		/* Arm solicited bit. */
> > >  #define PVRDMA_UAR_CQ_ARM		BIT(30)		/* Arm bit. */
> > >  #define PVRDMA_UAR_CQ_POLL		BIT(31)		/* Poll bit. */
> > > +#define PVRDMA_UAR_SRQ_OFFSET		8		/* SRQ doorbell. */
> > > +#define PVRDMA_UAR_SRQ_RECV		BIT(30)		/* Recv bit. */
> > 
> > I didn't think BIT() was allowed in uapi headers? Where does it get
> > defined in user space?
> > 
> > Jason
> 
> Looks like we had BIT() defined in userspace.

In rdma-core? Please remove that too :)

> Seems like the rest of the headers just use a bit shift? If that's
> fine I can send out a V2 with the BIT()s removed.

Yes please remove them all

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h
index aaa352f..4007cac 100644
--- a/include/uapi/rdma/vmw_pvrdma-abi.h
+++ b/include/uapi/rdma/vmw_pvrdma-abi.h
@@ -58,6 +58,8 @@ 
 #define PVRDMA_UAR_CQ_ARM_SOL		BIT(29)		/* Arm solicited bit. */
 #define PVRDMA_UAR_CQ_ARM		BIT(30)		/* Arm bit. */
 #define PVRDMA_UAR_CQ_POLL		BIT(31)		/* Poll bit. */
+#define PVRDMA_UAR_SRQ_OFFSET		8		/* SRQ doorbell. */
+#define PVRDMA_UAR_SRQ_RECV		BIT(30)		/* Recv bit. */
 
 enum pvrdma_wr_opcode {
 	PVRDMA_WR_RDMA_WRITE,