lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Feb 2019 23:54:25 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "jgg@...pe.ca" <jgg@...pe.ca>, "leon@...nel.org" <leon@...nel.org>
CC:     Majd Dibbiny <majd@...lanox.com>, Moni Shoua <monis@...lanox.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "dledford@...hat.com" <dledford@...hat.com>
Subject: Re: [PATCH mlx5-next 12/12] net/mlx5: Set ODP SRQ support in firmware

On Mon, 2019-02-04 at 14:23 -0700, Jason Gunthorpe wrote:
> On Sun, Feb 03, 2019 at 11:03:11AM +0200, Leon Romanovsky wrote:
> > On Thu, Jan 31, 2019 at 04:28:44PM -0700, Jason Gunthorpe wrote:
> > > On Tue, Jan 22, 2019 at 08:48:51AM +0200, Leon Romanovsky wrote:
> > > > From: Moni Shoua <monis@...lanox.com>
> > > > 
> > > > To avoid compatibility issue with older kernels the firmware
> > > > doesn't
> > > > allow SRQ to work with ODP unless kernel asks for it.
> > > > 
> > > > Signed-off-by: Moni Shoua <monis@...lanox.com>
> > > > Reviewed-by: Majd Dibbiny <majd@...lanox.com>
> > > > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > > >  .../net/ethernet/mellanox/mlx5/core/main.c    | 53
> > > > +++++++++++++++++++
> > > >  include/linux/mlx5/device.h                   |  3 ++
> > > >  include/linux/mlx5/mlx5_ifc.h                 |  1 +
> > > >  3 files changed, 57 insertions(+)
> > > > 
> > > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > > > b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > > > index be81b319b0dc..b3a76df0cf6c 100644
> > > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> > > > @@ -459,6 +459,53 @@ static int handle_hca_cap_atomic(struct
> > > > mlx5_core_dev *dev)
> > > >  	return err;
> > > >  }
> > > > 
> > > > +static int handle_hca_cap_odp(struct mlx5_core_dev *dev)
> > > > +{
> > > > +	void *set_ctx;
> > > > +	void *set_hca_cap;
> > > > +	int set_sz = MLX5_ST_SZ_BYTES(set_hca_cap_in);
> > > > +	int err;
> > > > +
> > > > +	if (!MLX5_CAP_GEN(dev, pg))
> > > > +		return 0;
> > > 
> > > Should a
> > > 
> > >     if (IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING))
> > >              return 0;
> > > 
> > > Be here?
> > 
> > We had similar discussion in mlx5_ib main.c, but here we are
> > talking
> > about mlx5_core code, which from my point of view should represent
> > the
> > real HW capabilities without relation to kernel compilation mode.
> 
> This switch is to tell the FW that the mlx5_ib module supports the
> new
> protocol - so having it in core code at all is really weird. I assume
> there is some startup sequence reason?
> 

Yes, sadly this must be in startup, set_hca_cap requests must come
prior to init_hca command.

> Since the modularity is already wrecked it seems like an odd
> reason not to add the if..
> 

Agree, even better, let's compile out the whole function. I would even
consider having a separate file in mlx5/core for IB related start-up
procedures :).

> Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ