[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190806070223.GR4832@mtr-leonro.mtl.com>
Date: Tue, 6 Aug 2019 10:02:23 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Saeed Mahameed <saeedm@...lanox.com>
Cc: Jason Gunthorpe <jgg@...lanox.com>,
"dledford@...hat.com" <dledford@...hat.com>,
Michael Guralnik <michaelgur@...lanox.com>,
Moni Shoua <monis@...lanox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH mlx5-next v1 1/3] IB/mlx5: Query ODP capabilities for DC
On Mon, Aug 05, 2019 at 06:23:04PM +0000, Saeed Mahameed wrote:
> On Sun, 2019-08-04 at 13:00 +0300, Leon Romanovsky wrote:
> > From: Michael Guralnik <michaelgur@...lanox.com>
> >
> > Set current capabilities of ODP for DC to max capabilities and cache
> > them in mlx5_ib.
> >
> > Signed-off-by: Michael Guralnik <michaelgur@...lanox.com>
> > Reviewed-by: Moni Shoua <monis@...lanox.com>
> > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > ---
> > drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 +
> > drivers/infiniband/hw/mlx5/odp.c | 18
> > ++++++++++++++++++
> > drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 ++++++
> > include/linux/mlx5/mlx5_ifc.h | 4 +++-
>
> Please avoid cross tree changes when you can..
> Here you do can avoid it, so please separate to two stage patches,
> mlx5_ifc and core, then mlx5_ib.
>
>
> > 4 files changed, 28 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h
> > b/drivers/infiniband/hw/mlx5/mlx5_ib.h
> > index cb41a7e6255a..f99c71b3c876 100644
> > --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
> > +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
> > @@ -967,6 +967,7 @@ struct mlx5_ib_dev {
> > struct mutex slow_path_mutex;
> > int fill_delay;
> > struct ib_odp_caps odp_caps;
> > + uint32_t dc_odp_caps;
> > u64 odp_max_size;
> > struct mlx5_ib_pf_eq odp_pf_eq;
> >
> > diff --git a/drivers/infiniband/hw/mlx5/odp.c
> > b/drivers/infiniband/hw/mlx5/odp.c
> > index b0c5de39d186..5e87a5e25574 100644
> > --- a/drivers/infiniband/hw/mlx5/odp.c
> > +++ b/drivers/infiniband/hw/mlx5/odp.c
> > @@ -353,6 +353,24 @@ void mlx5_ib_internal_fill_odp_caps(struct
> > mlx5_ib_dev *dev)
> > if (MLX5_CAP_ODP(dev->mdev, xrc_odp_caps.srq_receive))
> > caps->per_transport_caps.xrc_odp_caps |=
> > IB_ODP_SUPPORT_SRQ_RECV;
> >
> > + if (MLX5_CAP_ODP(dev->mdev, dc_odp_caps.send))
> > + dev->dc_odp_caps |= IB_ODP_SUPPORT_SEND;
> > +
> > + if (MLX5_CAP_ODP(dev->mdev, dc_odp_caps.receive))
> > + dev->dc_odp_caps |= IB_ODP_SUPPORT_RECV;
> > +
> > + if (MLX5_CAP_ODP(dev->mdev, dc_odp_caps.write))
> > + dev->dc_odp_caps |= IB_ODP_SUPPORT_WRITE;
> > +
> > + if (MLX5_CAP_ODP(dev->mdev, dc_odp_caps.read))
> > + dev->dc_odp_caps |= IB_ODP_SUPPORT_READ;
> > +
> > + if (MLX5_CAP_ODP(dev->mdev, dc_odp_caps.atomic))
> > + dev->dc_odp_caps |= IB_ODP_SUPPORT_ATOMIC;
> > +
> > + if (MLX5_CAP_ODP(dev->mdev, dc_odp_caps.srq_receive))
> > + dev->dc_odp_caps |= IB_ODP_SUPPORT_SRQ_RECV;
> > +
> > if (MLX5_CAP_GEN(dev->mdev, fixed_buffer_size) &&
> > MLX5_CAP_GEN(dev->mdev, null_mkey) &&
> > MLX5_CAP_GEN(dev->mdev, umr_extended_translation_offset))
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > index b15b27a497fc..3995fc6d4d34 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > @@ -495,6 +495,12 @@ static int handle_hca_cap_odp(struct
> > mlx5_core_dev *dev)
> > ODP_CAP_SET_MAX(dev, xrc_odp_caps.write);
> > ODP_CAP_SET_MAX(dev, xrc_odp_caps.read);
> > ODP_CAP_SET_MAX(dev, xrc_odp_caps.atomic);
> > + ODP_CAP_SET_MAX(dev, dc_odp_caps.srq_receive);
> > + ODP_CAP_SET_MAX(dev, dc_odp_caps.send);
> > + ODP_CAP_SET_MAX(dev, dc_odp_caps.receive);
> > + ODP_CAP_SET_MAX(dev, dc_odp_caps.write);
> > + ODP_CAP_SET_MAX(dev, dc_odp_caps.read);
> > + ODP_CAP_SET_MAX(dev, dc_odp_caps.atomic);
> >
> > if (do_set)
> > err = set_caps(dev, set_ctx, set_sz,
> > diff --git a/include/linux/mlx5/mlx5_ifc.h
> > b/include/linux/mlx5/mlx5_ifc.h
> > index ec571fd7fcf8..5eae8d734435 100644
> > --- a/include/linux/mlx5/mlx5_ifc.h
> > +++ b/include/linux/mlx5/mlx5_ifc.h
> > @@ -944,7 +944,9 @@ struct mlx5_ifc_odp_cap_bits {
> >
> > struct mlx5_ifc_odp_per_transport_service_cap_bits
> > xrc_odp_caps;
> >
> > - u8 reserved_at_100[0x700];
> > + struct mlx5_ifc_odp_per_transport_service_cap_bits dc_odp_caps;
> > +
> > + u8 reserved_at_100[0x6E0];
>
> reserved_at_100 should move 20 bit forward. i.e reserved_at_120
Thanks for pointing it, I'm sending new version now.
>
>
Powered by blists - more mailing lists