usnic: update to API change in libfabric
Этот коммит содержится в:
родитель
5e47eb81bf
Коммит
26b3c48ccb
@ -1050,6 +1050,7 @@ static int usnic_component_progress(void)
|
||||
assert(channel->chan_deferred_recv == NULL);
|
||||
|
||||
int ret = fi_cq_read(channel->cq, &completion, 1);
|
||||
assert(0 != ret);
|
||||
if (OPAL_LIKELY(1 == ret)) {
|
||||
opal_memchecker_base_mem_defined(&completion,
|
||||
sizeof(completion));
|
||||
@ -1063,7 +1064,7 @@ static int usnic_component_progress(void)
|
||||
count += usnic_handle_completion(module, channel,
|
||||
&completion);
|
||||
}
|
||||
} else if (OPAL_LIKELY(0 == ret)) {
|
||||
} else if (OPAL_LIKELY(-FI_EAGAIN == ret)) {
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
@ -1194,7 +1195,7 @@ usnic_handle_cq_error(opal_btl_usnic_module_t* module,
|
||||
|
||||
static int usnic_component_progress_2(void)
|
||||
{
|
||||
int i, j, count = 0, num_events;
|
||||
int i, j, count = 0, num_events, ret;
|
||||
opal_btl_usnic_module_t* module;
|
||||
static struct fi_cq_entry completions[OPAL_BTL_USNIC_NUM_COMPLETIONS];
|
||||
opal_btl_usnic_channel_t *channel;
|
||||
@ -1218,16 +1219,20 @@ static int usnic_component_progress_2(void)
|
||||
channel->chan_deferred_recv = NULL;
|
||||
}
|
||||
|
||||
num_events = fi_cq_read(channel->cq, completions,
|
||||
OPAL_BTL_USNIC_NUM_COMPLETIONS);
|
||||
opal_memchecker_base_mem_defined(&num_events, sizeof(num_events));
|
||||
opal_memchecker_base_mem_defined(completions,
|
||||
sizeof(completions[0]) *
|
||||
num_events);
|
||||
if (OPAL_UNLIKELY(num_events < 0)) {
|
||||
ret = fi_cq_read(channel->cq, completions,
|
||||
OPAL_BTL_USNIC_NUM_COMPLETIONS);
|
||||
assert(0 != ret);
|
||||
opal_memchecker_base_mem_defined(&ret, sizeof(ret));
|
||||
if (OPAL_UNLIKELY(ret < 0 && -FI_EAGAIN != ret)) {
|
||||
usnic_handle_cq_error(module, channel, num_events);
|
||||
num_events = 0;
|
||||
} else {
|
||||
num_events = ret;
|
||||
}
|
||||
|
||||
opal_memchecker_base_mem_defined(completions,
|
||||
sizeof(completions[0]) *
|
||||
ret);
|
||||
/* Handle each event */
|
||||
for (j = 0; j < num_events; j++) {
|
||||
count += usnic_handle_completion(module, channel,
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user