diff options
author | Sean Hefty <sean.hefty@intel.com> | 2013-05-29 13:09:24 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-06-21 02:35:38 -0400 |
commit | 94d0c939416480066d4e4d69e0d3c217bc083cea (patch) | |
tree | 2ae7d0b64d01c69778fa8dca4f0c851d55784393 /drivers | |
parent | 5c438135adf90b33cb00e5351becf1e557bbdd9d (diff) |
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: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/core/cma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 96d0b9a6e15e..6a0ee9265015 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -1616,6 +1616,10 @@ static void cma_listen_on_dev(struct rdma_id_private *id_priv, | |||
1616 | struct rdma_cm_id *id; | 1616 | struct rdma_cm_id *id; |
1617 | int ret; | 1617 | int ret; |
1618 | 1618 | ||
1619 | if (cma_family(id_priv) == AF_IB && | ||
1620 | rdma_node_get_transport(cma_dev->device->node_type) != RDMA_TRANSPORT_IB) | ||
1621 | return; | ||
1622 | |||
1619 | id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps, | 1623 | id = rdma_create_id(cma_listen_handler, id_priv, id_priv->id.ps, |
1620 | id_priv->id.qp_type); | 1624 | id_priv->id.qp_type); |
1621 | if (IS_ERR(id)) | 1625 | if (IS_ERR(id)) |