-
Notifications
You must be signed in to change notification settings - Fork 0
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(qp): implement qp_attr_mask with bitmask_enum #17
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c7c90c7
to
5112dd1
Compare
1e02d8d
to
9fb22ae
Compare
Current state: Modify let mut attr = QueuePairAttribute::new();
attr.setup_state(QueuePairState::ReadyToSend)
.setup_sq_psn(1)
.setup_timeout(12)
.setup_retry_cnt(7)
.setup_rnr_retry(7)
.setup_port(2); compile and run, we would get $ ./target/debug/examples/test_qp
qp pointer is QueuePair { qp: 0x564f08d23758, _phantom: PhantomData<&()> }
thread 'main' panicked at src/verbs/queue_pair.rs:296:82:
called `Result::unwrap()` on an `Err` value: "invalid masks QueuePairAttributeMask[Port], needed masks QueuePairAttributeMask[MaxReadAtomic]"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace The |
9fb22ae
to
1d6aecd
Compare
dragonJACson
commented
Sep 1, 2024
611f573
to
be7abe6
Compare
be7abe6
to
1b0d6bc
Compare
After refactoring, I’ve put RC qp state table into a |
bfcfe08
to
ade5ebb
Compare
FujiZ
reviewed
Sep 16, 2024
9ad23d8
to
518a14d
Compare
Signed-off-by: Luke Yue <lukedyue@gmail.com>
518a14d
to
36fcd1f
Compare
FujiZ
approved these changes
Sep 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to #13, we implement a wrapper over
ibv_qp_attr_mask
withbitmask_enum
.An idea is that we could provide vital and optional masks for different QP state machine transitions, so that we could check them in
modify_qp
easily. When users pass invalidattr
/attr_mask
, we could provide useful error messages indicating whichmask
is invalid or needed.