aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2013-02-25 12:42:15 -0500
committerRoland Dreier <roland@purestorage.com>2013-02-25 12:42:15 -0500
commitf72dd56690aba26fc87fc64e98dd4cc66f27122c (patch)
treed45e0844368ad44e5c4565e3d68b77ee18b92252 /drivers/infiniband/ulp
parent5a2815f03c0fd5a091c95af93b7f1a17a971ac20 (diff)
IPoIB: Free ipoib neigh on path record failure so path rec queries are retried
If IPoIB fails to look up a path record (eg if it tries during an SM failover when one SM is dead but the new one hasn't taken over yet), the driver ends up with a neighbour structure but no address handle (AH). There's no mechanism to recover from this: any further packets sent to this destination will be silently dumped in ipoib_start_xmit(). Fix this by freeing the neighbour structures when a path rec query fails, so that the next packet queued to be sent will trigger a new path record query. Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c3
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 66d6da90982f..8534afd04e7c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -510,6 +510,9 @@ static void path_rec_completion(int status,
510 510
511 spin_unlock_irqrestore(&priv->lock, flags); 511 spin_unlock_irqrestore(&priv->lock, flags);
512 512
513 if (IS_ERR_OR_NULL(ah))
514 ipoib_del_neighs_by_gid(dev, path->pathrec.dgid.raw);
515
513 if (old_ah) 516 if (old_ah)
514 ipoib_put_ah(old_ah); 517 ipoib_put_ah(old_ah);
515 518