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 various iov_count assertions #9999

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

darrylabbate
Copy link
Member

No description provided.

@darrylabbate darrylabbate requested a review from a team April 17, 2024 18:35
@@ -211,7 +211,7 @@ int efa_rdm_ep_post_user_recv_buf(struct efa_rdm_ep *ep, struct efa_rdm_ope *rxe
struct efa_mr *mr;
int err;

assert(rxe->iov_count == 1);
assert(rxe->iov_count > 0 && rxe->iov_count <= ep->rx_iov_limit);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the current logic in this function relies on iov_count == 1. If we want to touch this, we need to fix the other logic in this function as well

Copy link
Contributor

Choose a reason for hiding this comment

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

better add a TODO here and fix it in a follow-up PR that fix the whole function

Copy link
Member Author

Choose a reason for hiding this comment

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

So remove the assert() altogether?

Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest adding a TODO and leave this assert() in this function unchanged for now

Signed-off-by: Darryl Abbate <drl@amazon.com>
@darrylabbate darrylabbate force-pushed the fix/efa/iov-count-assert branch from de15181 to 75fa242 Compare April 17, 2024 19:49
@darrylabbate
Copy link
Member Author

@shijin-aws So we need to fix efa_rdm_ep_post_user_recv_buf() itself s.t. the packet entry points to the correct IOV offset/entry? Similar to the TX entry construct fix in #9990? I didn't realize the core logic was broken.

@shijin-aws
Copy link
Contributor

@shijin-aws So we need to fix efa_rdm_ep_post_user_recv_buf() itself s.t. the packet entry points to the correct IOV offset/entry? Similar to the TX entry construct fix in #9990? I didn't realize the core logic was broken.

Correct, the logic is currently broken if application posts recv with 2 iov. The efa_rdm_pke_recvv assumes there is 1 iov and only fill sge_list[0]. I don't think you can consume iov for rxe similar to what we did for txe in this case. You need to separate the hdr and payload iov and set them as the sge_list[0]. sge_list[1] for ibv_post_recv

@shijin-aws shijin-aws merged commit 415279c into ofiwg:main Apr 18, 2024
13 checks passed
@darrylabbate darrylabbate deleted the fix/efa/iov-count-assert branch April 18, 2024 20:02
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