cma_get_service_id forms the service ID based on the port space
and port number of the rdma_cm_id. Extend the call to support
AF_IB, which contains the service ID directly. This will
be needed to support any arbitrary SID.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
static __be64 cma_get_service_id(enum rdma_port_space ps, struct sockaddr *addr)
{
+ if (addr->sa_family == AF_IB)
+ return ((struct sockaddr_ib *) addr)->sib_sid;
+
return cpu_to_be64(((u64)ps << 16) + be16_to_cpu(cma_port(addr)));
}