Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSN table capability check #1457

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

selvintxavier
Copy link
Contributor

Read MSN capability from driver and allocate queue memory accordingly.

To commit: ?? ("bnxt_re: Expose the MSN table capability for user
library").

Signed-off-by: Selvin Xavier <[email protected]>
Driver exposes the MSN table capability. Add code
to check for this capability. Rename the macro as the decision
is based on the MSN table capability now.

Signed-off-by: Selvin Xavier <[email protected]>
@@ -2030,7 +2030,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
bnxt_re_fill_wrid(wrid, wr->wr_id, bytes,
sig, sq->tail, slots);
wrid->wc_opcd = bnxt_re_ibv_wr_to_wc_opcd(wr->opcode);
if (BNXT_RE_HW_RETX(qp->cntx))
if (BNXT_RE_MSN_TBL_EN(qp->cntx))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean that new rdma-core will "downgrade" all old devices/kernels to behave as they don't have PSN capability?

Because you will take "else" leaf for such flows now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. All old adapters/rdma-core/driver will work with PSN table. New adapters that export this capability will work with MSN table.

If you see the first patch in my kernel driver posting, which queries this value from FW.
#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_HOST_PSN_TABLE (0x0UL << 4)
#define CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_HOST_MSN_TABLE (0x1UL << 4)

All older adapters report value as 0 and driver/lib default to PSN table. The new adapter only will report 1 and that indicates the usage of MSN table. If the adapter is new and rdma-core is old, we will default to PSN mode.

The current change is because - earlier the MSN table selection was based on HW re-transmit capability. If HW re-transmit is not enabled, we go to PSN table creation mode. We have some configuration where the HW re-transmit is disabled by FW, but the adapter still need the MSN table. So we are using the new field to identify that.
If BNXT_RE_MSN_TBL_EN is null, we follow PSN table flow. Else MSN table flow.

@rleon
Copy link
Member

rleon commented May 12, 2024

@selvintxavier please update kernel header patch.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants