diff mbox

[for-next,V2,01/22] IB/core: Reserve bits in enum ib_qp_create_flags for low-level driver use

Message ID 1343983258-6268-2-git-send-email-jackm@dev.mellanox.co.il (mailing list archive)
State Accepted, archived
Delegated to: Roland Dreier
Headers show

Commit Message

jackm Aug. 3, 2012, 8:40 a.m. UTC
Reserve bits 26-31 for internal use by low-level drivers. Two
such bits are used in the mlx4 driver SRIOV IB implementation.

These enum additions guarantee that the core layer will never use
these bits, so that low level drivers may safely make use of them.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
---
 include/rdma/ib_verbs.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Doug Ledford Sept. 5, 2012, 2:55 p.m. UTC | #1
On 8/3/2012 4:40 AM, Jack Morgenstein wrote:
> Reserve bits 26-31 for internal use by low-level drivers. Two
> such bits are used in the mlx4 driver SRIOV IB implementation.
> 
> These enum additions guarantee that the core layer will never use
> these bits, so that low level drivers may safely make use of them.
> 
> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> ---
>  include/rdma/ib_verbs.h |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> index 07996af..46bc045 100644
> --- a/include/rdma/ib_verbs.h
> +++ b/include/rdma/ib_verbs.h
> @@ -614,6 +614,9 @@ enum ib_qp_type {
>  enum ib_qp_create_flags {
>  	IB_QP_CREATE_IPOIB_UD_LSO		= 1 << 0,
>  	IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK	= 1 << 1,
> +	/* reserve bits 26-31 for low level drivers' internal use */
> +	IB_QP_CREATE_RESERVED_START		= 1 << 26,
> +	IB_QP_CREATE_RESERVED_END		= 1 << 31,
>  };
>  
>  struct ib_qp_init_attr {
> 

Reserving 6 bits for driver use out of 32 seems reasonable.

Acked-by: Doug Ledford <dledford@redhat.com>
jackm Sept. 6, 2012, 10:06 a.m. UTC | #2
Thanks, Doug!

-Jack

On Wednesday 05 September 2012 17:55, Doug Ledford wrote:
> On 8/3/2012 4:40 AM, Jack Morgenstein wrote:
> > Reserve bits 26-31 for internal use by low-level drivers. Two
> > such bits are used in the mlx4 driver SRIOV IB implementation.
> > 
> > These enum additions guarantee that the core layer will never use
> > these bits, so that low level drivers may safely make use of them.
> > 
> > Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> > ---
> >  include/rdma/ib_verbs.h |    3 +++
> >  1 files changed, 3 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> > index 07996af..46bc045 100644
> > --- a/include/rdma/ib_verbs.h
> > +++ b/include/rdma/ib_verbs.h
> > @@ -614,6 +614,9 @@ enum ib_qp_type {
> >  enum ib_qp_create_flags {
> >  	IB_QP_CREATE_IPOIB_UD_LSO		= 1 << 0,
> >  	IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK	= 1 << 1,
> > +	/* reserve bits 26-31 for low level drivers' internal use */
> > +	IB_QP_CREATE_RESERVED_START		= 1 << 26,
> > +	IB_QP_CREATE_RESERVED_END		= 1 << 31,
> >  };
> >  
> >  struct ib_qp_init_attr {
> > 
> 
> Reserving 6 bits for driver use out of 32 seems reasonable.
> 
> Acked-by: Doug Ledford <dledford@redhat.com>
> 
--
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
Roland Dreier Sept. 24, 2012, 7:34 p.m. UTC | #3
So I applied this whole series, with the plan to merge this for 3.7.

Please send any changes as patches on top of what's already merged.

Thanks,
  Roland
--
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
jackm Sept. 25, 2012, 8:28 a.m. UTC | #4
Thanks, Roland!

-Jack

On Monday 24 September 2012 21:34, Roland Dreier wrote:
> So I applied this whole series, with the plan to merge this for 3.7.
> 
> Please send any changes as patches on top of what's already merged.
> 
> Thanks,
>   Roland
> 
--
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/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 07996af..46bc045 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -614,6 +614,9 @@  enum ib_qp_type {
 enum ib_qp_create_flags {
 	IB_QP_CREATE_IPOIB_UD_LSO		= 1 << 0,
 	IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK	= 1 << 1,
+	/* reserve bits 26-31 for low level drivers' internal use */
+	IB_QP_CREATE_RESERVED_START		= 1 << 26,
+	IB_QP_CREATE_RESERVED_END		= 1 << 31,
 };
 
 struct ib_qp_init_attr {