aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_main.c
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@voltaire.com>2008-01-17 10:03:45 -0500
committerRoland Dreier <rolandd@cisco.com>2008-02-04 23:20:43 -0500
commitbafff9741704959e99fb65a7327c017251019a19 (patch)
tree571a380b5be9b35d46d76003d2b362a377eb7bbb /drivers/infiniband/ulp/ipoib/ipoib_main.c
parent0d89fe2c0ca12ad2ee4e35a0661319746af6e94a (diff)
IPoIB: Handle bonding failover race for connected neighbours too
Move 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 by a different device than the current slave. This will cause the driver to apply the check also for connected mode neighbours. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index a082466f4a83..886a08cc7d4a 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -680,12 +680,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
680 680
681 neigh = *to_ipoib_neigh(skb->dst->neighbour); 681 neigh = *to_ipoib_neigh(skb->dst->neighbour);
682 682
683 if (ipoib_cm_get(neigh)) { 683 if (neigh->ah)
684 if (ipoib_cm_up(neigh)) {
685 ipoib_cm_send(dev, skb, ipoib_cm_get(neigh));
686 goto out;
687 }
688 } else if (neigh->ah) {
689 if (unlikely((memcmp(&neigh->dgid.raw, 684 if (unlikely((memcmp(&neigh->dgid.raw,
690 skb->dst->neighbour->ha + 4, 685 skb->dst->neighbour->ha + 4,
691 sizeof(union ib_gid))) || 686 sizeof(union ib_gid))) ||
@@ -706,6 +701,12 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
706 goto out; 701 goto out;
707 } 702 }
708 703
704 if (ipoib_cm_get(neigh)) {
705 if (ipoib_cm_up(neigh)) {
706 ipoib_cm_send(dev, skb, ipoib_cm_get(neigh));
707 goto out;
708 }
709 } else if (neigh->ah) {
709 ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha)); 710 ipoib_send(dev, skb, neigh->ah, IPOIB_QPN(skb->dst->neighbour->ha));
710 goto out; 711 goto out;
711 } 712 }