From 4c5461b605ee2efa79425f7a512e9523211c2679 Mon Sep 17 00:00:00 2001 From: aingerson Date: Tue, 20 Jul 2021 16:29:14 -0700 Subject: [PATCH] prov/rxm: CM rework fixes Signed-off-by: aingerson --- prov/rxm/src/rxm_av.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prov/rxm/src/rxm_av.c b/prov/rxm/src/rxm_av.c index bfb71ed6ece..77bcacf493d 100644 --- a/prov/rxm/src/rxm_av.c +++ b/prov/rxm/src/rxm_av.c @@ -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 * @@ -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; }