[ofa-general] [PATCH] ib/ipoib: handle Gratuitous ARP & bonding failover race also for connected mode neighbours
Or Gerlitz
ogerlitz at voltaire.com
Thu Jan 17 07:03:45 PST 2008
move a little up the code that checks for a situation where the remote GID stored in the ipoib_neigh is
different than the one present in the neighbour (handle Gratuitous ARP) or that a bonding fail over has
happened but the neighbour still has a pointer to an ipoib_neigh created not by the current slave. This
will cause the driver to apply the check also for connected mode neighbours.
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
I have tested this patch on 2.6.24-rc1 (and its now in progress for 2.6.24-rc8)
things are basically working fine, but I do want to play more with bonding fail-overs
to make sure nothing was broken wrt to Gratuitous ARP etc, will let you know.
-----
Index: linux-2.6.24-rc8/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- linux-2.6.24-rc8.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2008-01-17 16:37:10.000000000 +0200
+++ linux-2.6.24-rc8/drivers/infiniband/ulp/ipoib/ipoib_main.c 2008-01-17 16:46:51.000000000 +0200
@@ -686,13 +686,8 @@ static int ipoib_start_xmit(struct sk_bu
}
neigh = *to_ipoib_neigh(skb->dst->neighbour);
-
- if (ipoib_cm_get(neigh)) {
- if (ipoib_cm_up(neigh)) {
- ipoib_cm_send(dev, skb, ipoib_cm_get(neigh));
- goto out;
- }
- } else if (neigh->ah) {
+
+ if (neigh->ah)
if (unlikely((memcmp(&neigh->dgid.raw,
skb->dst->neighbour->ha + 4,
sizeof(union ib_gid))) ||
@@ -713,6 +708,12 @@ static int ipoib_start_xmit(struct sk_bu
goto out;
}
+ if (ipoib_cm_get(neigh)) {
+ if (ipoib_cm_up(neigh)) {
+ ipoib_cm_send(dev, skb, ipoib_cm_get(neigh));
+ goto out;
+ }
+ } else if (neigh->ah) {
ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha));
goto out;
}
More information about the general
mailing list