In the majority of cases, if the neighbour will change, it will
be reflected in the guid part of the GID (bytes 8-15). If the GID
prefix will change as well (bytes 0-7) it will be because the master
SM has changed, in which case we will get an SM change event resulting
in all paths flushed.

Signed-off-by: Eli Cohen <[EMAIL PROTECTED]>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c 
b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index c9f6077..e9a4f96 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -693,10 +693,9 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct 
net_device *dev)
                                goto out;
                        }
                } else if (neigh->ah) {
-                       if (unlikely((memcmp(&neigh->dgid.raw,
-                                           skb->dst->neighbour->ha + 4,
-                                           sizeof(union ib_gid))) ||
-                                        (neigh->dev != dev))) {
+                       if (unlikely((memcmp(&neigh->dgid.raw[8],
+                                            skb->dst->neighbour->ha + 12, 8)) 
||
+                                            (neigh->dev != dev))) {
                                spin_lock(&priv->lock);
                                /*
                                 * It's safe to call ipoib_put_ah() inside
-- 
1.5.3.6



_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to