[ewg] [PATCH 6/8 v3] IB/ipoib: restrict IPoIB to work on IB ports only

Eli Cohen eli at mellanox.co.il
Mon Jul 13 11:17:05 PDT 2009


We don't want IPoIB to work over RDMAoE since it will give worse performance
than working directly on Ethernet interfaces which are a prerequisite to RDMAoE
anyway.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index ab2c192..f12884c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1228,6 +1228,9 @@ static struct net_device *ipoib_add_port(const char *format,
 	struct ib_port_attr attr;
 	int result = -ENOMEM;
 
+	if (ib_get_port_link_type(hca, port) != PORT_LINK_IB)
+		return ERR_PTR(-ENODEV);
+
 	priv = ipoib_intf_alloc(format);
 	if (!priv)
 		goto alloc_mem_failed;
-- 
1.6.3.3




More information about the ewg mailing list