Skip to content

Conversation

@hjelmn
Copy link
Member

@hjelmn hjelmn commented Jul 7, 2020

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]

@hjelmn hjelmn added this to the v5.0.0 milestone Jul 7, 2020
@hjelmn hjelmn requested review from bosilca and jsquyres July 7, 2020 14:46
Copy link
Member

@jsquyres jsquyres left a 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.

(int)bseg->us_btl_header->tag);
#endif
reg->cbfunc(&module->super, hdr->tag, &seg->rs_desc, reg->cbdata);
seg->rs_desc.endpoint = endpoint;
Copy link
Member

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).

/* mca_pml_ob1_recv_frag_callback_frag() */
reg->cbfunc(&module->super, chunk_hdr->ch_hdr.tag,
&desc, reg->cbdata);
desc.endpoint = endpoint;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs vs. spaces.

Copy link
Member Author

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.

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs vs. spaces.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs vs. spaces.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@hjelmn hjelmn force-pushed the btl_base_atomics_are_awesome branch from 13bcea3 to 9a50fda Compare July 7, 2020 15:52
Copy link
Member

@bosilca bosilca left a 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).

@hjelmn hjelmn force-pushed the btl_base_atomics_are_awesome branch from 9a50fda to 22e697b Compare July 8, 2020 14:32
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]>
@hjelmn hjelmn force-pushed the btl_base_atomics_are_awesome branch from 22e697b to 88f51fb Compare July 8, 2020 14:38
@hjelmn hjelmn requested a review from bosilca July 9, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants