Skip to content

Commit 6f6bfbc

Browse files
selvintxavierrleon
authored andcommitted
RDMA/bnxt_re: Expose the MSN table capability for user library
BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED was introduced to share the HW retransmit capability between driver and lib. The main difference in implementation for HW Retransmit support is the usage of MSN table or PSN table . When HW retrans is enabled, HW expects MSN table to be allocated by driver/lib, else PSN table (for older adapters). FW expose a new field which gives MSN capability. Drivers and libs can depend on the new field instead of HW Retrasns capability. For adapters which support HW_RETX feature, MSN table capability will be set. For older adapters, this value will be 0(to maintain backward compatibility with older FW). Rename UAPI just to capture the correct name of the HW capability that driver/library is interested in. No functional impact even if older rdma-core is used. Signed-off-by: Selvin Xavier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 8d310ba commit 6f6bfbc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4201,6 +4201,9 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *ctx, struct ib_udata *udata)
42014201
if (rdev->pacing.dbr_pacing)
42024202
resp.comp_mask |= BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED;
42034203

4204+
if (_is_host_msn_table(rdev->qplib_res.dattr->dev_cap_flags2))
4205+
resp.comp_mask |= BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED;
4206+
42044207
if (udata->inlen >= sizeof(ureq)) {
42054208
rc = ib_copy_from_udata(&ureq, udata, min(udata->inlen, sizeof(ureq)));
42064209
if (rc)

include/uapi/rdma/bnxt_re-abi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ enum {
5555
BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL,
5656
BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL,
5757
BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL,
58-
BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40,
58+
BNXT_RE_UCNTX_CMASK_MSN_TABLE_ENABLED = 0x40,
5959
};
6060

6161
enum bnxt_re_wqe_mode {

0 commit comments

Comments
 (0)