From patchwork Sat May 4 04:10:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13653784 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18AE311717 for ; Sat, 4 May 2024 04:26:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714796801; cv=none; b=Bt8Q0drrEoBLf65KWtBoIU7NzgoWAp78qRW8B+5MEGAa+oPMP5msZJFIwTAoJphTIum/buEr5CA98AWqlRdMkDzzGp8alnHlhtwAJoQ5CstU8YvBK07lowFouhYuL3lyN7lA58d4bZUCo7K86P8ooOwFrST8MpaeY0B2qyBIC78= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714796801; c=relaxed/simple; bh=erkIql4AFCTKuswvJGoLtWkBIWGlg2/Dnvn0V6ylHGE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type; b=BQj5KRdp18QW8QzcVjc8OzmbP8TnKh3FZZ5GcnwAKXGDW4qqybHGV30tbAwgIt6jGUw1iFB/al50RjRI8iiqC2BSZs1SXfTca6DYN8nsyJ5L4q4uPNszAzt58qw++ubuF4L2dRhEjNJYnJqgz3SEJwAsxyXNKp9evOCjbK1dCVI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=X2Q/g8BB; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="X2Q/g8BB" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6f44b296e1fso254669b3a.3 for ; Fri, 03 May 2024 21:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1714796799; x=1715401599; darn=vger.kernel.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=layzvn9Kp4H/gURnB9YF4xUSCOJKSerZPLn+b6mdf/U=; b=X2Q/g8BBUK0CEUaugmKvialXwBmfgQ7bP1V7mt/K9SrUcYFqT1b/TT1cw7UbjBCOpD Dmw+IAI8M/rwkK/GhF9/mxkln4Jv+TTWr9chgsLISuH7RvxV14OFx2i35fGWYKE55Jg/ +GsGyMSgV+yoSK0KTRK3NYo5yzEfX2gltv1bA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714796799; x=1715401599; 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=layzvn9Kp4H/gURnB9YF4xUSCOJKSerZPLn+b6mdf/U=; b=O+u2eir22FfN+bCcsqxPfdE/beYusCz6GGv1l31qEfvjuAN3h21Y4fouqq9nNpeO35 x0UK858oKPQ9vMvr+DDtQR7bgZ0WowKvY6wol4ze4gC8w1V5Nup8wk6EyVkWiVC0GySJ 2gZfBjZIIe34wOx5DVvHCFVDDJbLOQyoLzZ6dVvSV3JAgGsQmbJSzHUvuxfbzfI+lIQ0 hzVAfcps200oiYIx6x9udtZ8hCvVqLDPnT2L/5H0c1Ur04VxmN3iJtJC4ArbxdfuK+bb +f+WCm347rm4Gu8GXKr4nL6Yefa53RjM6b7cEO1cXtMIDfQNSRO+73rrDj6V8UMI2UIW wYxg== X-Gm-Message-State: AOJu0YzYt6UwMiEGoJv8blxx4wbERLJgiqb0znb/JuMpWLHWlMHCgcF4 caXSEtve8rXNk9D4R2+hnndXUCwh6aMvu8WJJOxkrBCwxKX6PMWmQIP+tmmfDQ== X-Google-Smtp-Source: AGHT+IG36qSKaU2uQPvPtg0YPKTWazzQnTcF0kCNWzstx5prBIlq7Esf+Y7AWSzo+YhdfcJFasNMzA== X-Received: by 2002:a05:6a00:181a:b0:6ee:1b6e:662a with SMTP id y26-20020a056a00181a00b006ee1b6e662amr4626046pfa.32.1714796799068; Fri, 03 May 2024 21:26:39 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id l191-20020a6391c8000000b0061aa394533csm3545009pge.16.2024.05.03.21.26.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 May 2024 21:26:38 -0700 (PDT) From: Selvin Xavier To: leon@kernel.org, jgg@ziepe.ca Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Selvin Xavier Subject: [PATCH for-next 2/2] RDMA/bnxt_re: Expose the MSN table capability for user library Date: Fri, 3 May 2024 21:10:19 -0700 Message-Id: <1714795819-12543-3-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1714795819-12543-1-git-send-email-selvin.xavier@broadcom.com> References: <1714795819-12543-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Expose the MSN table capability to the user space. Rename the current macro as the driver/library is allocating the table based on the MSN capability reported by FW. Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 3 +++ include/uapi/rdma/bnxt_re-abi.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index ce9c5ba..d261b09 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -4201,6 +4201,9 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata) if (rdev->pacing.dbr_pacing) resp.comp_mask |= BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED; + if (_is_host_msn_table(rdev->qplib_res.dattr->dev_cap_flags2)) + resp.comp_mask |= BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED; + if (udata->inlen >= sizeof(ureq)) { rc = ib_copy_from_udata(&ureq, udata, min(udata->inlen, sizeof(ureq))); if (rc) diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h index c0c34ac..e61104f 100644 --- a/include/uapi/rdma/bnxt_re-abi.h +++ b/include/uapi/rdma/bnxt_re-abi.h @@ -55,7 +55,7 @@ enum { BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL, BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL, - BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40, + BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40, }; enum bnxt_re_wqe_mode {