Thread (1 message) 1 message, 1 author, 2011-07-12

RE: [PATCH v2] IB/CMA: Invalidate connections in port space IPoIB over Ethernet link layer

From: Hefty, Sean <hidden>
Date: 2011-07-12 00:47:32

quoted hunk
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index b6a33b3..2d60130 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -359,6 +359,10 @@ static int cma_acquire_dev(struct rdma_id_private
*id_priv)
 	enum rdma_link_layer dev_ll = dev_addr->dev_type == ARPHRD_INFINIBAND ?
 		IB_LINK_LAYER_INFINIBAND : IB_LINK_LAYER_ETHERNET;

+	if (dev_ll == IB_LINK_LAYER_ETHERNET &&
+		id_priv->id.ps == RDMA_PS_IPOIB)
+		return -EINVAL;
thanks - one nit - can you change the first part to dev_ll != IB_LINK_LAYER_INFINIBAND?  Just in case we ever add a new link type, we don't need to change the check.

- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help