-
Notifications
You must be signed in to change notification settings - Fork 458
prov/efa: Introduce ep option FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV #11675
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
Merged
+112
−2
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1877,3 +1877,72 @@ void test_efa_base_ep_disable_unsolicited_write_recv_with_rx_cq_data(struct efa_ | |
| /* When FI_RX_CQ_DATA is set, unsolicited write recv should be disabled */ | ||
| assert_false(efa_base_ep->qp->unsolicited_write_recv_enabled); | ||
| } | ||
|
|
||
| /** | ||
| * @brief Test that unsolicited write recv is disabled when FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV is false | ||
| */ | ||
| void test_efa_rdm_ep_setopt_cq_flow_control(struct efa_resource **state) | ||
| { | ||
| struct efa_resource *resource = *state; | ||
| struct efa_rdm_ep *ep; | ||
| bool optval = false; | ||
|
|
||
| efa_unit_test_resource_construct_ep_not_enabled(resource, FI_EP_RDM, EFA_FABRIC_NAME); | ||
|
|
||
| ep = container_of(resource->ep, struct efa_rdm_ep, | ||
| base_ep.util_ep.ep_fid); | ||
| assert_true(ep->base_ep.use_unsolicited_write_recv); | ||
| assert_int_equal(fi_setopt(&resource->ep->fid, FI_OPT_ENDPOINT, | ||
| FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV, &optval, | ||
| sizeof(optval)), | ||
| FI_SUCCESS); | ||
| assert_false(ep->base_ep.use_unsolicited_write_recv); | ||
| assert_int_equal(fi_enable(resource->ep), 0); | ||
| assert_false(ep->base_ep.qp->unsolicited_write_recv_enabled); | ||
| } | ||
|
|
||
| /** | ||
| * @brief Test disabling FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV will fail without FI_RX_CQ_DATA in efa direct | ||
| */ | ||
| void test_efa_direct_ep_setopt_cq_flow_control_no_rx_cq_data(struct efa_resource **state) | ||
| { | ||
| struct efa_resource *resource = *state; | ||
| struct efa_base_ep *efa_base_ep; | ||
| bool optval = false; | ||
|
|
||
| efa_unit_test_resource_construct_ep_not_enabled(resource, FI_EP_RDM, EFA_DIRECT_FABRIC_NAME); | ||
| assert_int_equal(fi_setopt(&resource->ep->fid, FI_OPT_ENDPOINT, | ||
| FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV, &optval, | ||
| sizeof(optval)), | ||
| -FI_EOPNOTSUPP); | ||
| efa_base_ep = container_of(resource->ep, struct efa_base_ep, util_ep.ep_fid); | ||
| assert_true(efa_base_ep->use_unsolicited_write_recv); | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should berify here it is still enabled. That would catch the bug in the comment above |
||
|
|
||
| /** | ||
| * @brief Test setting FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV with FI_RX_CQ_DATA will disable unsolicited write recv | ||
| */ | ||
| void test_efa_direct_ep_setopt_cq_flow_control_with_rx_cq_data(struct efa_resource **state) | ||
| { | ||
| struct efa_resource *resource = *state; | ||
| struct efa_base_ep *efa_base_ep; | ||
| bool optval = false; | ||
|
|
||
| resource->hints = efa_unit_test_alloc_hints(FI_EP_RDM, EFA_DIRECT_FABRIC_NAME); | ||
| assert_non_null(resource->hints); | ||
|
|
||
| resource->hints->mode |= FI_RX_CQ_DATA; | ||
|
|
||
| efa_unit_test_resource_construct_with_hints(resource, FI_EP_RDM, FI_VERSION(1, 18), | ||
| resource->hints, false, true); | ||
|
|
||
| efa_base_ep = container_of(resource->ep, struct efa_base_ep, util_ep.ep_fid); | ||
| assert_true(efa_base_ep->use_unsolicited_write_recv); | ||
| assert_int_equal(fi_setopt(&resource->ep->fid, FI_OPT_ENDPOINT, | ||
| FI_OPT_EFA_USE_UNSOLICITED_WRITE_RECV, &optval, | ||
| sizeof(optval)), | ||
| FI_SUCCESS); | ||
| assert_false(efa_base_ep->use_unsolicited_write_recv); | ||
| assert_int_equal(fi_enable(resource->ep), 0); | ||
| assert_false(efa_base_ep->qp->unsolicited_write_recv_enabled); | ||
| } | ||
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.