Commit 621a566
committed
btl/sm: do not set always callback frag when there is none
This fixes an issue with the btl_send function in btl/sm. The
pml/ob1 usage always provides a callback function which masked
this bug. The btl_send function was unconditionally setting
the MCA_BTL_DES_SEND_ALWAYS_CALLBACK flag for any outgoing
fragment. This is a violation of the interface which allows
the caller to leave the callback function unset. This commit
fixes the issue by protecting the code which set the flag to
first check if the callback function is non-NULL.
This commit also ensures that when a fragment is sent that
the complete flag is unset. This flag is used to return a
fragment to the sender and can confuse the receive logic
if it is set at the wrong time. This change allows the
owner of the frag to send multiple times without needing
to allocate a new frag using btl_alloc.
Signed-off-by: Nathan Hjelm <hjelmn@google.com>1 parent 56ed3a6 commit 621a566
1 file changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
69 | 77 | | |
70 | 78 | | |
71 | 79 | | |
72 | | - | |
73 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| |||
0 commit comments