[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8aOe68Q49lvsjv8@unreal>
Date: Tue, 17 Jan 2023 14:03:07 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Israel Rukshin <israelr@...dia.com>,
Bryan Tan <bryantan@...are.com>,
Christoph Hellwig <hch@....de>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Jens Axboe <axboe@...com>,
Keith Busch <kbusch@...nel.org>, linux-kernel@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-rdma@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Max Gurtovoy <mgurtovoy@...dia.com>, netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>,
Saeed Mahameed <saeedm@...dia.com>,
Sagi Grimberg <sagi@...mberg.me>,
Selvin Xavier <selvin.xavier@...adcom.com>,
Steven Rostedt <rostedt@...dmis.org>,
Vishnu Dasa <vdasa@...are.com>,
Yishai Hadas <yishaih@...dia.com>
Subject: Re: [PATCH rdma-next 03/13] RDMA: Split kernel-only create QP flags
from uverbs create QP flags
On Mon, Jan 16, 2023 at 01:39:38PM -0400, Jason Gunthorpe wrote:
> On Mon, Jan 16, 2023 at 03:05:50PM +0200, Leon Romanovsky wrote:
>
> > diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
> > index 17fee1e73a45..c553bf0eb257 100644
> > --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
> > +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
> > @@ -184,7 +184,7 @@ enum mlx4_ib_qp_flags {
> > /* Mellanox specific flags start from IB_QP_CREATE_RESERVED_START */
> > MLX4_IB_ROCE_V2_GSI_QP = MLX4_IB_QP_CREATE_ROCE_V2_GSI,
> > MLX4_IB_SRIOV_TUNNEL_QP = 1 << 30,
> > - MLX4_IB_SRIOV_SQP = 1 << 31,
> > + MLX4_IB_SRIOV_SQP = 1ULL << 31,
> > };
>
> These should be moved to a uapi if we are saying they are userspace
> available
>
> But I'm not sure they are?
I don't think so.
>
>
> > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
> > index 949cf4ffc536..cc2ddd4e6c12 100644
> > --- a/include/rdma/ib_verbs.h
> > +++ b/include/rdma/ib_verbs.h
> > @@ -1140,16 +1140,15 @@ enum ib_qp_type {
> > IB_QPT_RESERVED10,
> > };
> >
> > +/*
> > + * bits 0, 5, 6 and 7 may be set by old kernels and should not be used.
> > + */
>
> This is backwards "bits 0 5 6 7 were understood by older kernels and
> should not be used"
will change
>
> > enum ib_qp_create_flags {
> > - IB_QP_CREATE_IPOIB_UD_LSO = 1 << 0,
> > IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK =
> > IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK,
> > IB_QP_CREATE_CROSS_CHANNEL = 1 << 2,
> > IB_QP_CREATE_MANAGED_SEND = 1 << 3,
> > IB_QP_CREATE_MANAGED_RECV = 1 << 4,
> > - IB_QP_CREATE_NETIF_QP = 1 << 5,
> > - IB_QP_CREATE_INTEGRITY_EN = 1 << 6,
> > - IB_QP_CREATE_NETDEV_USE = 1 << 7,
> > IB_QP_CREATE_SCATTER_FCS =
> > IB_UVERBS_QP_CREATE_SCATTER_FCS,
> > IB_QP_CREATE_CVLAN_STRIPPING =
> > @@ -1159,7 +1158,18 @@ enum ib_qp_create_flags {
> > IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING,
> > /* reserve bits 26-31 for low level drivers' internal use */
> > IB_QP_CREATE_RESERVED_START = 1 << 26,
> > - IB_QP_CREATE_RESERVED_END = 1 << 31,
> > + IB_QP_CREATE_RESERVED_END = 1ULL << 31,
>
> And these should be shifted to the uapi header
No problem.
>
> Jason
Powered by blists - more mailing lists