Message ID | 20171220192721.GA32622@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On Wed, Dec 20, 2017 at 11:27:28AM -0800, Bryan Tan wrote: > BIT() should not be used in the UAPI header. Remove it. > > Signed-off-by: Bryan Tan <bryantan@vmware.com> > --- > include/uapi/rdma/vmw_pvrdma-abi.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) IMHO, it should go to -rc. Doug, Jason? > > diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h > index 4007cac..02ca0d0 100644 > --- a/include/uapi/rdma/vmw_pvrdma-abi.h > +++ b/include/uapi/rdma/vmw_pvrdma-abi.h > @@ -52,14 +52,14 @@ > #define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */ > #define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */ > #define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */ > -#define PVRDMA_UAR_QP_SEND BIT(30) /* Send bit. */ > -#define PVRDMA_UAR_QP_RECV BIT(31) /* Recv bit. */ > +#define PVRDMA_UAR_QP_SEND (1 << 30) /* Send bit. */ > +#define PVRDMA_UAR_QP_RECV (1 << 31) /* Recv bit. */ > #define PVRDMA_UAR_CQ_OFFSET 4 /* CQ doorbell. */ > -#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_CQ_ARM_SOL (1 << 29) /* Arm solicited bit. */ > +#define PVRDMA_UAR_CQ_ARM (1 << 30) /* Arm bit. */ > +#define PVRDMA_UAR_CQ_POLL (1 << 31) /* Poll bit. */ > #define PVRDMA_UAR_SRQ_OFFSET 8 /* SRQ doorbell. */ > -#define PVRDMA_UAR_SRQ_RECV BIT(30) /* Recv bit. */ > +#define PVRDMA_UAR_SRQ_RECV (1 << 30) /* Recv bit. */ > > enum pvrdma_wr_opcode { > PVRDMA_WR_RDMA_WRITE, > -- > 1.8.5.6 > > -- > 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
On Thu, Dec 21, 2017 at 03:00:34PM +0200, Leon Romanovsky wrote: > On Wed, Dec 20, 2017 at 11:27:28AM -0800, Bryan Tan wrote: > > BIT() should not be used in the UAPI header. Remove it. > > > > Signed-off-by: Bryan Tan <bryantan@vmware.com> > > include/uapi/rdma/vmw_pvrdma-abi.h | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > IMHO, it should go to -rc. > Doug, Jason? I can't decide if any of the -abi.h changes should be for-rc material or not.. The BIT() issue is being worked around in userspace today, so this seems even less for-rc'y? I'm leaning toward 'not' as we can and do cherry pick a for-next uapi header into rdma-core, so there isn't really an actual reason to put changes to those headers into for-rc? Thoughts? 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
On Thu, Dec 21, 2017 at 09:34:33AM -0700, Jason Gunthorpe wrote: > On Thu, Dec 21, 2017 at 03:00:34PM +0200, Leon Romanovsky wrote: > > On Wed, Dec 20, 2017 at 11:27:28AM -0800, Bryan Tan wrote: > > > BIT() should not be used in the UAPI header. Remove it. > > > > > > Signed-off-by: Bryan Tan <bryantan@vmware.com> > > > include/uapi/rdma/vmw_pvrdma-abi.h | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > IMHO, it should go to -rc. > > Doug, Jason? > > I can't decide if any of the -abi.h changes should be for-rc material > or not.. > > The BIT() issue is being worked around in userspace today, so this > seems even less for-rc'y? > > I'm leaning toward 'not' as we can and do cherry pick a for-next > uapi header into rdma-core, so there isn't really an actual reason to > put changes to those headers into for-rc? > > Thoughts? I think that UAPI should be fixed immediately without any relation to number of users (in our case one), but simple include of that -abi.h will cause to application breakage. Thanks > > Jason
On Wed, Dec 20, 2017 at 11:27:28AM -0800, Bryan Tan wrote: > BIT() should not be used in the UAPI header. Remove it. > > Signed-off-by: Bryan Tan <bryantan@vmware.com> > include/uapi/rdma/vmw_pvrdma-abi.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h > index 4007cac..02ca0d0 100644 > +++ b/include/uapi/rdma/vmw_pvrdma-abi.h > @@ -52,14 +52,14 @@ > #define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */ > #define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */ > #define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */ > -#define PVRDMA_UAR_QP_SEND BIT(30) /* Send bit. */ > -#define PVRDMA_UAR_QP_RECV BIT(31) /* Recv bit. */ > +#define PVRDMA_UAR_QP_SEND (1 << 30) /* Send bit. */ > +#define PVRDMA_UAR_QP_RECV (1 << 31) /* Recv bit. */ I changed the '1<<31' to '1UL<<31' when I applied this to for-next, the constants should be unsigned to avoid problems with sign extensions on the high bit. 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 --git a/include/uapi/rdma/vmw_pvrdma-abi.h b/include/uapi/rdma/vmw_pvrdma-abi.h index 4007cac..02ca0d0 100644 --- a/include/uapi/rdma/vmw_pvrdma-abi.h +++ b/include/uapi/rdma/vmw_pvrdma-abi.h @@ -52,14 +52,14 @@ #define PVRDMA_UVERBS_ABI_VERSION 3 /* ABI Version. */ #define PVRDMA_UAR_HANDLE_MASK 0x00FFFFFF /* Bottom 24 bits. */ #define PVRDMA_UAR_QP_OFFSET 0 /* QP doorbell. */ -#define PVRDMA_UAR_QP_SEND BIT(30) /* Send bit. */ -#define PVRDMA_UAR_QP_RECV BIT(31) /* Recv bit. */ +#define PVRDMA_UAR_QP_SEND (1 << 30) /* Send bit. */ +#define PVRDMA_UAR_QP_RECV (1 << 31) /* Recv bit. */ #define PVRDMA_UAR_CQ_OFFSET 4 /* CQ doorbell. */ -#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_CQ_ARM_SOL (1 << 29) /* Arm solicited bit. */ +#define PVRDMA_UAR_CQ_ARM (1 << 30) /* Arm bit. */ +#define PVRDMA_UAR_CQ_POLL (1 << 31) /* Poll bit. */ #define PVRDMA_UAR_SRQ_OFFSET 8 /* SRQ doorbell. */ -#define PVRDMA_UAR_SRQ_RECV BIT(30) /* Recv bit. */ +#define PVRDMA_UAR_SRQ_RECV (1 << 30) /* Recv bit. */ enum pvrdma_wr_opcode { PVRDMA_WR_RDMA_WRITE,
BIT() should not be used in the UAPI header. Remove it. Signed-off-by: Bryan Tan <bryantan@vmware.com> --- include/uapi/rdma/vmw_pvrdma-abi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)