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

feat: introduce PostSendGuard for extended QP with basic support for polling extended CQ #22

Merged
merged 3 commits into from
Sep 22, 2024

Conversation

dragonJACson
Copy link
Contributor

@dragonJACson dragonJACson commented Sep 2, 2024

Relies on #25

Introduce PostSendGuard as an abstraction for ibv_post_send and ibv_wr_* APIs, with initial implementation for write with inline data.

In ibv_wr_set_inline_data, the user buffer would be copied immediately. Meanwhile, in ibv_post_send, when user pass the inline data in wr_list, the data won't be copied until user call ibv_post_send, this introduce a problem in our Rust implementation, which allows user drop the buffer between set_inline_data and do_post, that is an undefined behavior. We need lifetime annotations or copy the buffer manually, the solution is left to be discussed and implemented.

@dragonJACson dragonJACson changed the title feat(qp): implement trait for QP feat(qp): implement trait for QP and introduce PostSendGuard Sep 2, 2024
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
@dragonJACson dragonJACson requested a review from FujiZ September 2, 2024 15:55
@dragonJACson dragonJACson force-pushed the dev/post-send branch 5 times, most recently from d103153 to 575375d Compare September 6, 2024 01:30
@dragonJACson dragonJACson changed the title feat(qp): implement trait for QP and introduce PostSendGuard feat(qp): introduce PostSendGuard Sep 6, 2024
@dragonJACson dragonJACson force-pushed the dev/post-send branch 10 times, most recently from 06fdc57 to b2e807a Compare September 11, 2024 15:58
@dragonJACson dragonJACson force-pushed the dev/post-send branch 3 times, most recently from e80e217 to d28007e Compare September 16, 2024 08:20
@dragonJACson dragonJACson changed the title feat(qp): introduce PostSendGuard WIP: feat(qp): introduce PostSendGuard Sep 16, 2024
@dragonJACson dragonJACson force-pushed the dev/post-send branch 7 times, most recently from f9dfeb7 to 854c419 Compare September 18, 2024 16:42
@dragonJACson dragonJACson changed the title WIP: feat(qp): introduce PostSendGuard feat(qp): introduce PostSendGuard Sep 18, 2024
@dragonJACson dragonJACson changed the title feat(qp): introduce PostSendGuard feat: introduce PostSendGuard for extended QP with basic support for polling extended CQ Sep 18, 2024
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/queue_pair.rs Outdated Show resolved Hide resolved
src/verbs/completion.rs Outdated Show resolved Hide resolved
We introduce a unified interface for post send operations on qp and
qp_ex, with the flavor of `ibv_wr_*` APIs.

We use lifetime annotations to make sure we are holding one live work
request at most at the same time for one qp.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
We implement an iterator version of poll_cq for cq_ex, this adheres to
the flavor of `ibv_start_poll` and `ibv_next_poll` APIs.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
We introduce trybuild as dev-dependency, and add some misused code
which should fail to compile, so that we can check the lifetime
annotation of PostSendGuard is working as expected.

Signed-off-by: Luke Yue <lukedyue@gmail.com>
@dragonJACson dragonJACson merged commit 38782b1 into main Sep 22, 2024
@dragonJACson dragonJACson deleted the dev/post-send branch September 22, 2024 08:26
@dragonJACson dragonJACson restored the dev/post-send branch September 25, 2024 14:22
@dragonJACson dragonJACson deleted the dev/post-send branch September 28, 2024 17:20
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