提交 496ce3ce 编写于 作者: S Sean Hefty 提交者: Roland Dreier

RDMA/cma: Add support for AF_IB to cma_get_service_id()

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: NSean Hefty <sean.hefty@intel.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 f68194ca
......@@ -1379,6 +1379,9 @@ static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event)
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)));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册