Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466106 > unrolled thread

[PATCH 3.12 094/100] IB/IPoIB: Don't update neigh validity for unresolved entries

Started byJiri Slaby <jslaby@suse.cz>
First post2016-08-19 09:20 +0200
Last post2016-08-19 09:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 094/100] IB/IPoIB: Don't update neigh validity for unresolved entries Jiri Slaby <jslaby@suse.cz> - 2016-08-19 09:20 +0200

#1466106 — [PATCH 3.12 094/100] IB/IPoIB: Don't update neigh validity for unresolved entries

FromJiri Slaby <jslaby@suse.cz>
Date2016-08-19 09:20 +0200
Subject[PATCH 3.12 094/100] IB/IPoIB: Don't update neigh validity for unresolved entries
Message-ID<s7MfW-2xj-73@gated-at.bofh.it>
From: Erez Shitrit <erezsh@mellanox.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

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: Jiri Slaby <jslaby@suse.cz>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 82cec1af902c..9cd105ff2427 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -882,7 +882,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;
 		}
 	}
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web