From patchwork Mon Jul 17 05:53:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13315199 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 71DB6C0015E for ; Mon, 17 Jul 2023 06:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231343AbjGQGIJ (ORCPT ); Mon, 17 Jul 2023 02:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbjGQGHx (ORCPT ); Mon, 17 Jul 2023 02:07:53 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910B01BEB for ; Sun, 16 Jul 2023 23:07:25 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6689430d803so2685276b3a.0 for ; Sun, 16 Jul 2023 23:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689574033; x=1692166033; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=eDa37wfx8pdpmEmn20lXlQWix8R9XQ+Kj8G/KckXPQQ=; b=VBIGWyeltdJnEYN5NcAvL5FrqZ+piR4RSvD9YM29DUZZYM3xlXc3rp6uhJXE+FHqhj xGiY3EGBQm4qSMW+bFdc2xcV5QFUhKgDI2iZJKgnlQ0JPs3FVFMv4F30nJBmN/W//Cp9 84H2r/LWJ/PqKu9gRHdPGzUFovs3PO+JbFF6c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689574033; x=1692166033; 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=eDa37wfx8pdpmEmn20lXlQWix8R9XQ+Kj8G/KckXPQQ=; b=UKJOFOqzZi7AzX2mzKEbeN9cypgpQloR2+w879PdCQm8nMxgRQFu2tiHjXsvfDA5ap zHPUoAstVuP+GcpnhdaTsO1xdGNvg/AxtE7W4JdFdx2l7V4e/hEaAV87n9rS+B6GzVO9 toW93HZjiPUDRxj7Y3TcNOnK9zFEhcbbsqT5CSTtGLUb5xgxv3IgVVIgKX659bGndiBV 43uoVg64jIYgOIAhrSQFRFPyaavlcLJDa1nzMs9pqc7eJR4Puoq9yA1YJ8j6pGOhpYYY Wg5DYXYOfswkMrkBoU212A3maSkO+3n3UtjG0MftnQpGuQ0JAbkzW/IUVg/9LRg5LdZ8 Qekw== X-Gm-Message-State: ABy/qLZszjeipBoZQ48h5t1xOwNuA1sHMlir45hZkwP7RU14tCgLQV9o y08i3QEI6v0XYxzxYj/WySwtJCyh+DtNeqfUSIc= X-Google-Smtp-Source: APBJJlGf7JS19NdQRLd5InFj//gI4+GdCDZ2KG6k2yb6lPK3ezkFDvqJVMGx4W0zgPT00Be1wAVk4Q== X-Received: by 2002:a05:6a20:12c8:b0:135:2b01:3737 with SMTP id v8-20020a056a2012c800b001352b013737mr42408pzg.38.1689574033600; Sun, 16 Jul 2023 23:07:13 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q17-20020a170902789100b001b9da7b6bc3sm11849632pll.184.2023.07.16.23.07.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Jul 2023 23:07:12 -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 v2 4/7] RDMA/bnxt_re: Enable pacing support for the user apps Date: Sun, 16 Jul 2023 22:53:11 -0700 Message-Id: <1689573194-27687-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1689573194-27687-1-git-send-email-selvin.xavier@broadcom.com> References: <1689573194-27687-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 {