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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 D5C2FC169C4 for ; Thu, 31 Jan 2019 23:28:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3F0C2086C for ; Thu, 31 Jan 2019 23:28:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="AJuPxP33" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726957AbfAaX2q (ORCPT ); Thu, 31 Jan 2019 18:28:46 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39147 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfAaX2q (ORCPT ); Thu, 31 Jan 2019 18:28:46 -0500 Received: by mail-pl1-f193.google.com with SMTP id 101so2192176pld.6 for ; Thu, 31 Jan 2019 15:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2IqTp57dGMLXdYMvOrco4xfOuV9aa14gWVia2+TIhMY=; b=AJuPxP33bqs4KlVbnvYW/CMjf2ZFbnM3gjHm8b4Rr2aM5pcwXtXjVh6IqpJma8VCS2 nyaTJgdUR7p8kKSleqydNMto2CuAe482YD6mr8SCW8uLYQN0eE0jpMH5eIQmFNixOw/2 5LlWFHv3YoQav6Clf6sWnN+dYEb68uEzCsuxzqSjLX/OQ5O844bbKt7HlS1Uw9N6s9AC a/i8coJLINQG+PEqUiEVzXfRbbG55/gnv31FDIt8ucBq3LYSVLAG3MD5m9cMiDSUeULn HBKxlz6YtiiSXPuT5U9Wc1KCDtIUkj+y8r3I1EbnhiAUjmJaLCGwBcsKRXog1VLNek3N k2iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2IqTp57dGMLXdYMvOrco4xfOuV9aa14gWVia2+TIhMY=; b=GQ1QziHYwunCD4iuonVK86oOhtDBcip4SYGgVIckvYVrx08E7HwQiXHXe3AHNyRxQk dAVJljl7RflBWgO1w4ClG+4wLqBAh2a4HRro1+nySsAE46QSUeOy25rP8ij7bwVA4P7H euZUyfyxedtwO8LYJpkypupX2EDpaQP8VLcai9gMhpwBChzt06YYWVAxztuz2zvx/dIa qz773zI3laqfk4sfpT51W1bkkCWn4atiEoi7URXdl7rz6Iek4biDDe1exO4PYQIh1sMK FmJ9biIBNXKSPAuym/aPY0F+KaQ7OVWW6+NvaPZGcxWJ2QGIOYXKBPahBfiMoe/9SKOr hwQA== X-Gm-Message-State: AJcUukegnkJKaRvPO+q8ugNO523UKWiTnYyJUPWEGVKtQ8OxdiIuFdEA TrRiMTMPipXG5pMMdeY1lWy+hg== X-Google-Smtp-Source: ALg8bN7EuEZ7I/XcCP9kISuu799u+d8lyxZi/L2e/y1lo+AJDn+b43rQSTFD+KUCFQ+sl/blkKsy/A== X-Received: by 2002:a17:902:7687:: with SMTP id m7mr36627527pll.187.1548977325399; Thu, 31 Jan 2019 15:28:45 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id r187sm23429535pfc.63.2019.01.31.15.28.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Jan 2019 15:28:44 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gpLlE-0003w9-0o; Thu, 31 Jan 2019 16:28:44 -0700 Date: Thu, 31 Jan 2019 16:28:44 -0700 From: Jason Gunthorpe To: Leon Romanovsky Cc: Doug Ledford , Leon Romanovsky , 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: <20190131232843.GA15062@ziepe.ca> References: <20190122064851.6032-1-leon@kernel.org> <20190122064851.6032-13-leon@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190122064851.6032-13-leon@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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? Jason