Skip to contentSkip to conversation

ipoib: avoid ipoib over IBoE

PATCH In review Eli Cohen 3 participants 4 messages Feb 18, 2010 – May 6, 2010 1 message not in the archive InfiniBand

lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH v8 6/11 ipoib: avoid ipoib over IBoE

IPoIB is an implementation of IP over Infiniband transport. In the case of IBoE, the link layer is Ethernet so IP can work directly over Ethernet, so disable IPoIB for none IB_LINK_LAYER_INFINIBAND ports.

---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/infiniband/ulp/ipoib/ipoib_main.c +5 -0
index 06014d2..5e6c2de 100644
@@ -1362,6 +1362,8 @@ static void ipoib_add_one(struct ib_device *device)
 	}
 
 	for (p = s; p <= e; ++p) {
+		if (rdma_port_link_layer(device, p) != IB_LINK_LAYER_INFINIBAND)
+			continue;
 		dev = ipoib_add_port("ib%d", device, p);
 		if (!IS_ERR(dev)) {
 			priv = netdev_priv(dev);
@@ -1383,6 +1385,9 @@ static void ipoib_remove_one(struct ib_device *device)
 	dev_list = ib_get_client_data(device, &ipoib_client);
 
 	list_for_each_entry_safe(priv, tmp, dev_list, list) {
+		if (rdma_port_link_layer(device, priv->port) != IB_LINK_LAYER_INFINIBAND)
+			continue;
+
 		ib_unregister_event_handler(&priv->event_handler);
 
 		rtnl_lock();
Signature · 6 lines
1.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

drivers/infiniband/ulp/ipoib/ipoib_main.c static void ipoib_remove_one(struct ib_device *device) · line 1389

Quoted 6 lines
drivers/infiniband/ulp/ipoib/ipoib_main.c +2 -0
@@ -1383,6 +1385,9 @@ static void ipoib_remove_one(struct ib_device *device)
 	dev_list = ib_get_client_data(device, &ipoib_client);
 
 	list_for_each_entry_safe(priv, tmp, dev_list, list) {
+		if (rdma_port_link_layer(device, priv->port) != IB_LINK_LAYER_INFINIBAND)
+			continue;

Why do we need this chunk here? How could a netdev get on our list if we never create IPoIB interfaces for IBoE ports?

- R.

Signature · 6 lines
Roland Dreier <[email protected]> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): adamxweasrc.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org

#3 lore raw
Quoted 10 lines · Roland Dreier

drivers/infiniband/ulp/ipoib/ipoib_main.c static void ipoib_remove_one(struct ib_device *device) · line 1389

Quoted 6 lines
drivers/infiniband/ulp/ipoib/ipoib_main.c +2 -0
@@ -1383,6 +1385,9 @@ static void ipoib_remove_one(struct ib_device *device)
 	dev_list = ib_get_client_data(device, &ipoib_client);
 
 	list_for_each_entry_safe(priv, tmp, dev_list, list) {
+		if (rdma_port_link_layer(device, priv->port) != IB_LINK_LAYER_INFINIBAND)
+			continue;

Why do we need this chunk here? How could a netdev get on our list if we never create IPoIB interfaces for IBoE ports?

Right, this is not necessary and can be removed.

#4 lore raw
In reply to Eli Cohen

OK, I applied this with just the first chunk.

Signature · 6 lines
Roland Dreier <[email protected]> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html