Commit 94d0c939 authored by Sean Hefty's avatar Sean Hefty Committed by Roland Dreier

RDMA/cma: Only listen on IB devices when using AF_IB

If an rdma_cm_id is bound to AF_IB, with a wild card address, only
listen on IB devices.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 5c438135
...@@ -1616,6 +1616,10 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv, ...@@ -1616,6 +1616,10 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv,
struct rdma_cm_id *id; struct rdma_cm_id *id;
int ret; int ret;
if (cma_family(id_priv) == AF_IB &&
rdma_node_get_transport(cma_dev->device->node_type) != RDMA_TRANSPORT_IB)
return;
id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps, id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps,
id_priv->id.qp_type); id_priv->id.qp_type);
if (IS_ERR(id)) if (IS_ERR(id))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment