prov/rxm, prov/util: Update logic for source and dir_recv #11652
+5
−2
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.
When updating the unspec queue address information the peer_context's connection is sometimes NULL. This results in segmentation faults on av_insert so checking for it before accessing it fixes the issue. However, this isn't a complete fix because it leaves potential for an entry to get stuck in the wrong queue. The util_srx implementation is overcomplicated for the non-directed receive case. To simplify this, queuing will be limited to the unspecified unexpected queue when not using directed receive. This is because we do not need to enable the per-peer queues unless directed receive is requested. This makes sure that entries do not get stuck in the wrong queue because they are all living in the same one. It also simplifies the lookup for the non-directed receive case.
Note: We do not want to fix this by forcing the rx_buf->conn to be set for all incoming message. We want to avoid an extra lookup/set because the conn is only needed for FI_SOURCE and FI_DIRECTED_RECV cases.