From patchwork Sun Jun 14 10:35:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 11603263 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 17623618 for ; Sun, 14 Jun 2020 10:36:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFC4F20714 for ; Sun, 14 Jun 2020 10:36:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="UfOSrmsQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726960AbgFNKgK (ORCPT ); Sun, 14 Jun 2020 06:36:10 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:41731 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbgFNKgJ (ORCPT ); Sun, 14 Jun 2020 06:36:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1592130969; x=1623666969; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cR8VxQ8Db3EG4TNNK7IV7kH3TYpNqN+XjC9hLD45Q5k=; b=UfOSrmsQbsDj6/M868SUow2IYe2rq5sWUJ7jA0U1TjRFmocPZt8viYBA f8roZmo5p5a3/OPI8/7E8jQeGnfk/Z9Bp2wPyHiQmX0weFznJ9BR5xzf9 ES78LBtt6X3SnQGP3Regdm8HCWjdRpx+8pqd/gIqrAtu+NlPc1mwzQUs5 o=; IronPort-SDR: f04bCYY77T6zARcwI2AaZOC4LlOaydHYlblwvKoR3/wwdRDRgMM2lqSoqjFVcYMRxQ6lIO2Efm pf0gsZ9FAFUg== X-IronPort-AV: E=Sophos;i="5.73,510,1583193600"; d="scan'208";a="43803466" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-538b0bfb.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 14 Jun 2020 10:35:57 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-538b0bfb.us-west-2.amazon.com (Postfix) with ESMTPS id 0E11CA05EE; Sun, 14 Jun 2020 10:35:55 +0000 (UTC) Received: from EX13D13EUA003.ant.amazon.com (10.43.165.25) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 14 Jun 2020 10:35:55 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D13EUA003.ant.amazon.com (10.43.165.25) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 14 Jun 2020 10:35:54 +0000 Received: from 8c85908914bf.ant.amazon.com (10.1.213.11) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 14 Jun 2020 10:35:51 +0000 From: Gal Pressman To: Jason Gunthorpe , Doug Ledford CC: , Alexander Matushevsky , Gal Pressman , Firas JahJah , "Yossi Leybovich" Subject: [PATCH for-rc] RDMA/efa: Set maximum pkeys device attribute Date: Sun, 14 Jun 2020 13:35:34 +0300 Message-ID: <20200614103534.88060-1-galpress@amazon.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The max_pkeys device attribute was not set in query device verb, set it to one in order to account for the default pkey (0xffff). Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman --- drivers/infiniband/hw/efa/efa_verbs.c | 1 + 1 file changed, 1 insertion(+) base-commit: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162 diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 5c57098a4aee..3420c7742486 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -209,6 +209,7 @@ int efa_query_device(struct ib_device *ibdev, props->max_send_sge = dev_attr->max_sq_sge; props->max_recv_sge = dev_attr->max_rq_sge; props->max_sge_rd = dev_attr->max_wr_rdma_sge; + props->max_pkeys = 1; if (udata && udata->outlen) { resp.max_sq_sge = dev_attr->max_sq_sge;