Skip to content

Commit

Permalink
Merge pull request #1458 from yishaih/rdmacm_misc
Browse files Browse the repository at this point in the history
librdmacm: Misc. fixes
  • Loading branch information
rleon committed May 8, 2024
2 parents df84cc4 + c4a5ac8 commit 311c591
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions librdmacm/cma.c
Expand Up @@ -311,7 +311,7 @@ static void remove_cma_dev(struct cma_device *cma_dev)

static int dev_cmp(const void *a, const void *b)
{
return (int)(*(char *const *)a - *(char *const *)b);
return (*(uintptr_t *)a > *(uintptr_t *)b) - (*(uintptr_t *)a < *(uintptr_t *)b);
}

static int sync_devices_list(void)
Expand Down Expand Up @@ -1951,8 +1951,14 @@ int rdma_accept(struct rdma_cm_id *id, struct rdma_conn_param *conn_param)
return (ret >= 0) ? ERR(ENODATA) : -1;
}

if (ucma_is_ud_qp(id->qp_type))
if (ucma_is_ud_qp(id->qp_type)) {
if (id_priv->sync && id_priv->id.event) {
rdma_ack_cm_event(id_priv->id.event);
id_priv->id.event = NULL;
}

return 0;
}

return ucma_complete(id);
}
Expand Down

0 comments on commit 311c591

Please sign in to comment.