Skip to content

Commit

Permalink
prov/rxm: CM rework fixes
Browse files Browse the repository at this point in the history
Signed-off-by: aingerson <alexia.ingerson@intel.com>
  • Loading branch information
aingerson committed Jul 20, 2021
1 parent 5f4fe58 commit 4c5461b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions prov/rxm/src/rxm_av.c
Expand Up @@ -37,7 +37,8 @@

static int rxm_addr_compare(struct ofi_rbmap *map, void *key, void *data)
{
return memcmp(data, key, sizeof(union ofi_sock_ip));
return memcmp(data, key,
container_of(map, struct rxm_av, addr_map)->util_av.addrlen);
}

static struct rxm_peer_addr *
Expand All @@ -55,7 +56,7 @@ rxm_alloc_peer(struct rxm_av *av, const void *addr)
peer->refcnt = 1;
memcpy(&peer->addr, addr, av->util_av.addrlen);

if (ofi_rbmap_insert(&av->addr_map, peer, &peer->addr, &peer->node)) {
if (ofi_rbmap_insert(&av->addr_map, &peer->addr, peer, &peer->node)) {
ofi_ibuf_free(peer);
peer = NULL;
}
Expand Down

0 comments on commit 4c5461b

Please sign in to comment.