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

prov/efa: Improve efa_cq's completion report #10771

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

Conversation

shijin-aws
Copy link
Contributor

  1. Make efa_cq_construct_cq_entry correctly handle unsolicited wc where
    there is no valid wr_id
  2. Make efa_cq_proc_ibv_recv_rdma_with_imm_completion reuse the constructed
    cq entry to remove the duplicated wc read.
  3. Remove the eq error write for unsolicited write recv error, as it should
    be reported as a cq error with NULL op context (valid per libfabric man page).

Also did a rework of the efa_cq's unit tests

1. Make efa_cq_construct_cq_entry correctly handle unsolicited wc where
   there is no valid wr_id
2. Make efa_cq_proc_ibv_recv_rdma_with_imm_completion reuse the constructed
   cq entry to remove the duplicated wc read.
3. Remove the eq error write for unsolicited write recv error, as it should
   be reported as a cq error with NULL op context (valid per libfabric man page).

Signed-off-by: Shi Jin <[email protected]>
The current test_efa_cq* involves fi_send/fi_recv
operations which are not relevant to the cq operation
and make the test lose the value as unit tests.

This patch rework the efa_cq unit tests
to focus on  the cq read operation and adds
check for the returned cq entry.

Signed-off-by: Shi Jin <[email protected]>
@shijin-aws shijin-aws requested review from jiaxiyan and a team February 7, 2025 05:14
entry->flags = efa_cq_opcode_to_fi_flags(ibv_wc_read_opcode(ibv_cqx));
if (!efa_cq_wc_is_unsolicited(ibv_cqx) && ibv_cqx->wr_id) {
entry->op_context = (void *)ibv_cqx->wr_id;
entry->flags = (opcode == IBV_WC_RECV_RDMA_WITH_IMM) ? efa_cq_opcode_to_fi_flags(opcode): ((struct efa_context *) ibv_cqx->wr_id)->completion_flags;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed when we support FI_RX_CQ_DATA, and doesn't hurt for current code

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

Successfully merging this pull request may close these issues.

2 participants