From patchwork Wed Jul 19 05:02:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13318149 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9183C001DF for ; Wed, 19 Jul 2023 05:17:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230102AbjGSFRb (ORCPT ); Wed, 19 Jul 2023 01:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbjGSFRb (ORCPT ); Wed, 19 Jul 2023 01:17:31 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AFB11BFC for ; Tue, 18 Jul 2023 22:17:29 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bb2468257fso22006405ad.0 for ; Tue, 18 Jul 2023 22:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689743849; x=1692335849; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=RmVKRmNjZud7L0IVo1jPlNTaqNlqkl9lPP0kNAaxJXI=; b=H2lzY+rzCE0+EqEF8ekPQIPckW4A/Xy1h2tXdfRs0mBjl0crt9mAktRvrQpHEcy+WC +tgiZ+1S9j4K1Oxz/ToH+/dofzp47m9a2HOmuupxbzS+1CKgOX2I+a4jd7LtiswUmKyM qOBqighQHR7si5rTvjq+gsltHFpZ6PPxV/Lfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689743849; x=1692335849; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RmVKRmNjZud7L0IVo1jPlNTaqNlqkl9lPP0kNAaxJXI=; b=CUEa61OEeep7cwKoLFXcRuYhf7Wj2Yu1akIRWmdSCSFnu+GJe3FKxeX1JaoB5/Y1iG Ghc4nExJoWSnR4DVKrK1sQiO9maWUbUVYBSTeAnv+licIHmC8x7RX5Lj2Im9HbUMknaF VisaJ6S3t3hMTsdMD6Zb3MSOhBnEOFOLCWQ1JLxewqka6f3iwWUhEg0el2/6F2G8fl70 zX6WgW0cgbK/LV6zfBbXfslDA7Av2IXfy2DY9BFZVxO6vTFpdvxJFWKVkKZdCTXFTHc/ 1OyBxqlfJh16TCrG4kY7BQlRyYj6VbulH/UObjenisOAXDTj+TfBdWfED9iD8D9ZZbw/ gchg== X-Gm-Message-State: ABy/qLbYvfj5tocRjyhdMW98hbWHSI3b+3yZBxQmZbF2HErQcUIDlTB5 cS5qbDdkdfaCUXXjGKaE+FRv4Q== X-Google-Smtp-Source: APBJJlF0TQcmIfQheChmkmoybJlAsDbrV1CaCn5zImEFP996UiShK8ezI3a/xGqvahpcQXWyJys04A== X-Received: by 2002:a17:903:48c:b0:1b8:7483:d47a with SMTP id jj12-20020a170903048c00b001b87483d47amr13807022plb.37.1689743849391; Tue, 18 Jul 2023 22:17:29 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id t8-20020a170902e84800b001b9de8fbd78sm2816424plg.212.2023.07.18.22.17.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2023 22:17:27 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, michael.chan@broadcom.com, Chandramohan Akula , Selvin Xavier Subject: [PATCH for-next v3 4/7] RDMA/bnxt_re: Enable pacing support for the user apps Date: Tue, 18 Jul 2023 22:02:54 -0700 Message-Id: <1689742977-9128-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1689742977-9128-1-git-send-email-selvin.xavier@broadcom.com> References: <1689742977-9128-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Chandramohan Akula Report the pacing capability to the user applications. Signed-off-by: Chandramohan Akula Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 ++ include/uapi/rdma/bnxt_re-abi.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index abef0b8..86b71c7 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -4075,6 +4075,8 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata) goto cfail; } uctx->shpage_mmap = &entry->rdma_entry; + if (rdev->pacing.dbr_pacing) + resp.comp_mask |= BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED; rc = ib_copy_to_udata(udata, &resp, min(udata->outlen, sizeof(resp))); if (rc) { diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h index 8a2a1d4..060bf1d 100644 --- a/include/uapi/rdma/bnxt_re-abi.h +++ b/include/uapi/rdma/bnxt_re-abi.h @@ -53,6 +53,7 @@ enum { BNXT_RE_UCNTX_CMASK_HAVE_CCTX = 0x1ULL, BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, + BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL, }; enum bnxt_re_wqe_mode {