From patchwork Mon Jul 6 07:54:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 11645139 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 7536060D for ; Mon, 6 Jul 2020 07:54:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D4872070C for ; Mon, 6 Jul 2020 07:54:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ryq9UCHX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728917AbgGFHyb (ORCPT ); Mon, 6 Jul 2020 03:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728248AbgGFHyb (ORCPT ); Mon, 6 Jul 2020 03:54:31 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A727C061794 for ; Mon, 6 Jul 2020 00:54:31 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id r12so39664695wrj.13 for ; Mon, 06 Jul 2020 00:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bDiCsTKJYT1dBvgYvF0oPh5E3DjsarKR+VvD0dD7xPY=; b=ryq9UCHXxVmVhcCSxrAsRiMkH5TeEONo732oloGdXzutVjAiIL4skL8NwfIUA7To2t PoURnbsKFqQK4yDVyxKVKqZMTBK/Zd2lebL6SaCsZpKjDGA3J8aKSMDZv96BB1j1iVVw 5Apc+W/w2iYCzXJnv/hLxRvJ06hNYRLmQqb5xqcIuUxLlOEZoMzNt5jYetXbFTr9RS6T X7sY2LgOGyBqRmuORhMpHMZ5Yy93ffvwm4iQln1VJkoD8hw5T/2S+SdJnZlp/Nxqx/8b eG7jFI3Y8F8ISijzzfuX8JYhemqjtUdZV4vEOUnhy6I1UL1kg6UY1cxq9XwDREzAAkVp rr/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bDiCsTKJYT1dBvgYvF0oPh5E3DjsarKR+VvD0dD7xPY=; b=RBFCuo/cyOa4dhOP/HAUz0uRvPBYBKbu9u0N2PgwlL3XpUaRb/yhZ5DLYajAImP3pL 7ZEEP/xLgus+s30ol3au8U0w62Qzg6LygxY7ODJwQt0D18eL5twc0xpcbJRs/SZQvuuG BJ/YqXARUNvSsaH2Z5Hzlru+7T/0rNMSGju6tsm5yOIfyJIVVGVYcfvM02luJtzX+HDM Qn93QY3EPqRR7ECD8Z7pWBSj7eyFKRaAtnUiiOSFIPvXu2bn1eawOl0kOCixiONLstvb QjUtQTC2s8Gx5tc9EZC2W0vN2Na81fsSBLFdpUWZtxxW1DmNz+2jHL7iqK6oIsZf2j/j AY2Q== X-Gm-Message-State: AOAM530Aa2XxvfY0nBWLhBah3nqumeHRNAw1Y43D+qKik1amnA0CMr4L IFI/qMamNshjUCUy3QWHsT1i9iP3BNs= X-Google-Smtp-Source: ABdhPJyeljPh4NsiGIawG97hd/NnmNEVaB+bKo6iDZR+RgW+JHje0XcGoBDDCVgIjpmZr+oJxorOtA== X-Received: by 2002:adf:84e2:: with SMTP id 89mr49361415wrg.139.1594022069774; Mon, 06 Jul 2020 00:54:29 -0700 (PDT) Received: from kheib-workstation.redhat.com ([37.142.6.100]) by smtp.gmail.com with ESMTPSA id g145sm15028147wmg.23.2020.07.06.00.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 00:54:29 -0700 (PDT) From: Kamal Heib To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe , Doug Ledford , Kamal Heib , Gal Pressman Subject: [PATCH for-next 2/5] RDMA/efa: Set max_pkeys attribute Date: Mon, 6 Jul 2020 10:54:16 +0300 Message-Id: <20200706075419.361484-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200706075419.361484-1-kamalheib1@gmail.com> References: <20200706075419.361484-1-kamalheib1@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Make sure to set the max_pkeys attribute to indicate the maximum number of partitions supported by the efa device. Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Signed-off-by: Kamal Heib Cc: Gal Pressman --- drivers/infiniband/hw/efa/efa_verbs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 08313f7c73bc..7dd082441333 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -212,6 +212,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;