netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Majd Dibbiny <majd@mellanox.com>, Moni Shoua <monis@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>,
	linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH mlx5-next 12/12] net/mlx5: Set ODP SRQ support in firmware
Date: Mon, 4 Feb 2019 14:23:19 -0700	[thread overview]
Message-ID: <20190204212319.GE10237@ziepe.ca> (raw)
In-Reply-To: <20190203090311.GD3634@mtr-leonro.mtl.com>


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@mellanox.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@mellanox.com>
> > > Reviewed-by: Majd Dibbiny <majd@mellanox.com>
> > > Signed-off-by: Leon Romanovsky <leonro@mellanox.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?

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

Jason

  reply	other threads:[~2019-02-04 21:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22  6:48 [PATCH rdma-next 00/12] Add SRQ and XRC support for ODP MRs Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 01/12] IB/mlx5: Fix locking SRQ object in ODP event Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 02/12] IB/core: Allocate bit for SRQ ODP support Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 03/12] IB/uverbs: Expose XRC ODP device capabilities Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 04/12] IB/mlx5: Remove useless check in ODP handler Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 05/12] IB/mlx5: Clean mlx5_ib_mr_responder_pfault_handler() signature Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 06/12] IB/mlx5: Add XRC initiator ODP support Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 07/12] IB/mlx5: Let read user wqe also from SRQ buffer Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 08/12] IB/mlx5: Add ODP SRQ support Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 09/12] IB/mlx5: Advertise SRQ ODP support for supported transports Leon Romanovsky
2019-01-22  6:48 ` [PATCH mlx5-next 10/12] net/mlx5: Add XRC transport to ODP device capabilities layout Leon Romanovsky
2019-01-22  6:48 ` [PATCH rdma-next 11/12] IB/mlx5: Advertise XRC ODP support Leon Romanovsky
2019-01-22  6:48 ` [PATCH mlx5-next 12/12] net/mlx5: Set ODP SRQ support in firmware Leon Romanovsky
2019-01-31 23:28   ` Jason Gunthorpe
2019-02-03  9:03     ` Leon Romanovsky
2019-02-04 21:23       ` Jason Gunthorpe [this message]
2019-02-04 23:54         ` Saeed Mahameed
2019-02-04 23:47   ` Saeed Mahameed
2019-02-05  6:27     ` Leon Romanovsky
2019-01-24 12:25 ` [PATCH rdma-next 00/12] Add SRQ and XRC support for ODP MRs Leon Romanovsky
2019-01-31 23:27 ` Jason Gunthorpe
2019-02-03 10:54   ` Leon Romanovsky
2019-02-04 21:53     ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204212319.GE10237@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=majd@mellanox.com \
    --cc=monis@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).