From patchwork Fri Jun 23 15:38:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13290797 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 36BC3C0015E for ; Fri, 23 Jun 2023 15:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232265AbjFWPum (ORCPT ); Fri, 23 Jun 2023 11:50:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232549AbjFWPuj (ORCPT ); Fri, 23 Jun 2023 11:50:39 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB24B26A6 for ; Fri, 23 Jun 2023 08:50:36 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-668730696a4so470199b3a.1 for ; Fri, 23 Jun 2023 08:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1687535436; x=1690127436; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=GAlnf++0pHsezjUGZlMb2XeLXlgvvegve7kg6f9JzOo=; b=PUzf5PKRPv6ePbd16+7XexqszntBv4cR9bjk65HZem/TbWKfDmF4X6AIy+gL4/Xf6w mmZ5bbd2AyoslXUCO7plVZdW7yIFt5xIMfOn+5TAomL6bOVAPwb+TPQPvewJ3Ym/61p6 KzupIFCK+DuJPmVwAaeNnLarXdTZ64Swmptuk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687535436; x=1690127436; 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=GAlnf++0pHsezjUGZlMb2XeLXlgvvegve7kg6f9JzOo=; b=SP5d96vPahpUTeNeyoa+lJKxPtN56xfi6p+PVqDUlpAYApldkX63MH9cFymlfVwLAN LW5+Py7P18B8JNWllgMe64FE1XW2F9iNgy0fJhc/C+yF52UKtZtdjekaJn1UFY/zr9C7 0ZJ2nKUFuQxhYeXpF5akvp6i5Kh+tldLMc/3z1gwAo7ftaih8VcY20Ky4KXZH2ydFKkM lRTWa/y5P7HJa+QG5EGjKmMGKTrm9CAb1os5TUMAUzmrAaM0qATjL3nxfiBMfjPMkMaI 0AXB6wVBAbdeY47cSvWvot6vsL0D8oo6JrpY5lSKYsE5NM3kyB3lgHP07NV1VEzAHAk7 AgLw== X-Gm-Message-State: AC+VfDxdYf9FWGylypwX2gpnnSWFlFxBmGK9EqXLtepI3EkvBYcwmBBb WmG43xOIvFM7k/8XfCn0iZIoohhxTUdSJqQ6eK8= X-Google-Smtp-Source: ACHHUZ4qI8xOYSfgF1huS9LKJndU8lea2v7XSrqn1l15E+KuOaFDgWBH6NlLYC2CUbfF7LI8TN9Dfw== X-Received: by 2002:a05:6a00:1942:b0:666:a25b:3783 with SMTP id s2-20020a056a00194200b00666a25b3783mr17415188pfk.27.1687535436266; Fri, 23 Jun 2023 08:50:36 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id z124-20020a636582000000b00553d96d7feesm6637100pgb.35.2023.06.23.08.50.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2023 08:50:35 -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 4/7] RDMA/bnxt_re: Enable pacing support for the user apps Date: Fri, 23 Jun 2023 08:38:34 -0700 Message-Id: <1687534717-17968-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1687534717-17968-1-git-send-email-selvin.xavier@broadcom.com> References: <1687534717-17968-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 a936e0d..24040a8 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -4076,6 +4076,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 {