-
Notifications
You must be signed in to change notification settings - Fork 936
btl: change argument type of BTL receive callbacks #7913
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
Conversation
jsquyres
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't give much of a review of the BTL/OB1 changes, but I can say that it generally compiled/ran fine for me (including usNIC) -- i.e., similar to #7830 (comment), I got some random errors, but I think those are unrelated to this PR.
opal/mca/btl/usnic/btl_usnic_recv.c
Outdated
| (int)bseg->us_btl_header->tag); | ||
| #endif | ||
| reg->cbfunc(&module->super, hdr->tag, &seg->rs_desc, reg->cbdata); | ||
| seg->rs_desc.endpoint = endpoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watch for tabs here (vs. spaces).
opal/mca/btl/usnic/btl_usnic_recv.c
Outdated
| /* mca_pml_ob1_recv_frag_callback_frag() */ | ||
| reg->cbfunc(&module->super, chunk_hdr->ch_hdr.tag, | ||
| &desc, reg->cbdata); | ||
| desc.endpoint = endpoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs vs. spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Missing the emacs decorations I suspect. Will fix.
opal/mca/btl/usnic/btl_usnic_recv.h
Outdated
| seg->rs_segment.seg_len = bseg->us_btl_header->payload_len; | ||
| reg->cbfunc(&module->super, bseg->us_btl_header->tag, | ||
| &seg->rs_desc, reg->cbdata); | ||
| seg->rs_desc.endpoint = endpoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs vs. spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
opal/mca/btl/usnic/btl_usnic_recv.h
Outdated
| seg->rs_segment.seg_len = bseg->us_btl_header->payload_len; | ||
| reg->cbfunc(&module->super, bseg->us_btl_header->tag, | ||
| &seg->rs_desc, reg->cbdata); | ||
| seg->rs_desc.tag = bseg->us_btl_header->tag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tabs vs. spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
13bcea3 to
9a50fda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but there are a lot of unnecessary changes making the patch more massive than it is. I don't want to be pedantic but I would have rather kept the changes to only the necessary ones.
Plus there are some additions that are not related to the scope of the patch (the new MCA_BTL_TAG_BASE_* I marked in my comments).
9a50fda to
22e697b
Compare
This commit updates the btl interface to change the parameters passed to receive callbacks. The interface used to pass the tag, a btl base descriptor, and the callback context. Most of the values in the btl base descriptor were unused and only helped simplify the callbacks from the self btl. All of the arguments have now been replaced with a single receive callback descriptor. This descriptor contains the incoming endpoint, data segment(s), tag, and callback context. All btls have been updated to use the new callback and the btl interface version has been bumped to v3.2.0. As part of this change the descriptor argument (and the segments contained within it) have been marked as const. The were treated as const before but this change could allow the compiler to make better optimization decisions and will enforce that the callback does not attempt to change the data in the descriptor. Signed-off-by: Nathan Hjelm <[email protected]>
22e697b to
88f51fb
Compare
This commit updates the btl interface to change the parameters
passed to receive callbacks. The interface used to pass the tag,
a btl base descriptor, and the callback context. Most of the
values in the btl base descriptor were unused and only helped
simplify the callbacks from the self btl. All of the arguments
have now been replaced with a single receive callback descriptor.
This descriptor contains the incoming endpoint, data segment(s),
tag, and callback context. All btls have been updated to use
the new callback and the btl interface version has been bumped
to v3.2.0.
As part of this change the descriptor argument (and the segments
contained within it) have been marked as const. The were treated
as const before but this change could allow the compiler to make
better optimization decisions and will enforce that the callback
does not attempt to change the data in the descriptor.
Signed-off-by: Nathan Hjelm [email protected]