diff options
author | Erez Shitrit <erezsh@mellanox.com> | 2016-06-04 15:15:19 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-08-22 22:38:09 +0100 |
commit | 5c2a47732007c44544ce3cc8abed90a21ba74b79 (patch) | |
tree | 72257ae32ddd939ee29dd131cdca4cfcd69705e0 /drivers | |
parent | d35494c744fd0f03cab01be0fe4a753f1eb96a09 (diff) | |
download | linux-stable-5c2a47732007c44544ce3cc8abed90a21ba74b79.tar.gz linux-stable-5c2a47732007c44544ce3cc8abed90a21ba74b79.tar.bz2 linux-stable-5c2a47732007c44544ce3cc8abed90a21ba74b79.zip |
IB/IPoIB: Don't update neigh validity for unresolved entries
commit 61c78eea9516a921799c17b4c20558e2aa780fd3 upstream.
ipoib_neigh_get unconditionally updates the "alive" variable member on
any packet send. This prevents the neighbor garbage collection from
cleaning out a dead neighbor entry if we are still queueing packets
for it. If the queue for this neighbor is full, then don't update the
alive timestamp. That way the neighbor can time out even if packets
are still being queued as long as none of them are being sent.
Fixes: b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path")
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 9de3f9d054df..7e4a6efbf2ce 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -884,7 +884,9 @@ struct ipoib_neigh *ipoib_neigh_get(struct net_device *dev, u8 *daddr) neigh = NULL; goto out_unlock; } - neigh->alive = jiffies; + + if (likely(skb_queue_len(&neigh->queue) < IPOIB_MAX_PATH_REC_QUEUE)) + neigh->alive = jiffies; goto out_unlock; } } |