IB/IPoIB: Don't update neigh validity for unresolved entries
authorErez Shitrit <erezsh@mellanox.com>
Sat, 4 Jun 2016 12:15:19 +0000 (15:15 +0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:13:39 +0000 (13:13 +0000)
commit071f85a7535f92c94352f8c704d32288f49debfa
treeff7d8fc82adff8d41cc65ff5f9b243c23dc4d686
parentf8bcf6e17793a431ac9a806ade04a359502a87dd
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: Willy Tarreau <w@1wt.eu>
drivers/infiniband/ulp/ipoib/ipoib_main.c