From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17A3AC169C4 for ; Sun, 3 Feb 2019 09:03:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7D1821773 for ; Sun, 3 Feb 2019 09:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549184597; bh=QIFeWqtgHtUbyzmWNy1N7vQllysHXl9W6E1VDpm2dCk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=wpR82TYyncpfIUBYVz1H7IK5t47U4XOZBH0bkV/0NASEDGpuMybB0P7xYMkNUunL9 Q1HTZ+bRH1mnMk67o5Q4426R3Yxwe9OYFre+aMnyw3hMAz7rqJw9xIhwl6OridbPDT Y5O0CikeOCyTNg28Dm++J4/7ldRbube2DlgDyeTk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbfBCJDQ (ORCPT ); Sun, 3 Feb 2019 04:03:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:42590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbfBCJDQ (ORCPT ); Sun, 3 Feb 2019 04:03:16 -0500 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 444172083B; Sun, 3 Feb 2019 09:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549184594; bh=QIFeWqtgHtUbyzmWNy1N7vQllysHXl9W6E1VDpm2dCk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mEZ95HG/bDiwJBVYcSK5mQvVDfo898iUjFEEMk0ArtRxIN4uOuco8Ohut5Z0JmYZk LrZeQV0chdlGSO4+sCFf6k7Ow1QTezJ3TJkDdKtjm/gkSfEOpeb+8Aei/IKEX9ZCMN P46dLUgBnyMl4BhOyvZRgXlH1RjUGbcezDHx+hHk= Date: Sun, 3 Feb 2019 11:03:11 +0200 From: Leon Romanovsky To: Jason Gunthorpe Cc: Doug Ledford , RDMA mailing list , Majd Dibbiny , Moni Shoua , Saeed Mahameed , linux-netdev Subject: Re: [PATCH mlx5-next 12/12] net/mlx5: Set ODP SRQ support in firmware Message-ID: <20190203090311.GD3634@mtr-leonro.mtl.com> References: <20190122064851.6032-1-leon@kernel.org> <20190122064851.6032-13-leon@kernel.org> <20190131232843.GA15062@ziepe.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="11Y7aswkeuHtSBEs" Content-Disposition: inline In-Reply-To: <20190131232843.GA15062@ziepe.ca> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org --11Y7aswkeuHtSBEs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > > > > 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 > > Reviewed-by: Majd Dibbiny > > Signed-off-by: Leon Romanovsky > > .../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. Thanks > > Jason --11Y7aswkeuHtSBEs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJcVq5PAAoJEORje4g2clinqgMP/j+yFs8h/HxtiXSp4e2EV7Op yW2N76UKOi2dkSl3UVCxbiHJpq4nauG/V8RhLL+Ed/kJ5cOUg6Smbr4EaLgF7Yip CLAPtjka6ig+hD16h/G4BICWfs8/rExiwmWNs9cUe3Twfhhm6q53cZ9IHuPOXkll o4sfuL0BJ9FyyZ2UpkQVBqVGk66fpkq5nOhICvBgCfaMf5R7kXDzpCQ0XlycTT4x 6bGOp8Xvv7Z99GJgqwb8ktmZ3yGl/I0wcx1c6yAYgnwBoL6r6fuuhXWLojWAXwZY TOMOKInlsoioMcyNTabh74FOlDBPHiAwbr3q5+/vzHgI2n1sfxJujH1Txchga8D3 WCBR9uKd01aAM0tno58YCkP6xAV4adt2aa1mWZU04S+RjG0dCa4eOY2DzgL6Z98U faakuc0Urzo48i3EP/ZDym9iDRxfsJKmMJ2wtnMeh+Ed5OHFE2gHev4H1QFpsbZT pZUshlO83+BeZ7HviB7hkxfmnlIugv+5TFniFs/KrdG/H2anKKGM8XZ4Sxhz5cQZ KsMacZ3aXHIV00+E8Lr83uitD/lem9GRoJypz8wWoQ3EkEaSFrxUtLMdoj0vf7e0 V99HHtOZt82UEIxW4dtJgfxvgJlHDPIpjjMpvvTxDZaXK7ssEAZZs3Le83An4gEZ IlFRcl9+E+kCfhe2y0cT =9+1L -----END PGP SIGNATURE----- --11Y7aswkeuHtSBEs--