> > As part of the AF_IB changes, additional queries were introduced that > > separated out retrieving the different kernel data -- assigned address, > > GID mappings, and IB PR data. (New queries were necessary, since > > sockaddr_ib is larger than sockaddr_in6, and we want to eventually > > handle non-reversible paths.) The librdmacm 1.0.17 changed which query > > was called after rdma_bind_addr was invoked to only retrieve the > > assigned address, versus retrieving everything. I think this is why you > > see an SGID of all 0's after calling rdma_bind_addr. > > Is there another call that allows the retrieval of the SGID?
Yes - something like this patch should help, but I don't think this is the correct behavior when the IP address is 'any' addresss. Retrieve SGID after calling rdma_bind_addr From: Sean Hefty <[email protected]> A change was made to rdma_bind_addr when AF_IB is enabled to only retrieve the resulting bound address. Previously, rdma_bind_addr would retrieve the corresponding SGID as well. This breaks some apps which were checking the SGID after binding to an IP address. Revert to the previous behavior of also retrieving the SGID after calling rdma_bind_addr. --- src/cma.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/cma.c b/src/cma.c index 4f41879..0cf4203 100644 --- a/src/cma.c +++ b/src/cma.c @@ -753,7 +753,10 @@ static int rdma_bind_addr2(struct rdma_cm_id *id, struct sockaddr *addr, if (ret != sizeof cmd) return (ret >= 0) ? ERR(ENODATA) : -1; - return ucma_query_addr(id); + ret = ucma_query_addr(id); + if (!ret) + ret = ucma_query_gid(id); + return ret; } int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
