]> git.openfabrics.org - compat-rdma/compat-rdma.git/commitdiff
IB/ipoib: Do not update neigh validity if not resolved yet
authorVladimir Sokolovsky <vlad@mellanox.com>
Tue, 1 Mar 2016 08:05:56 +0000 (10:05 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Tue, 1 Mar 2016 08:05:56 +0000 (10:05 +0200)
ipoib_neigh_get whenever tries to access specific neigh updates its
"alive" variable member, the neigh now considered as updated and will
not bee cleaned by the GC process even if it needs to be resolved again.

issue: http://bugs.openfabrics.org/bugzilla/show_bug.cgi?id=2561

Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
linux-next-pending/0035-IB-ipoib-Do-not-update-neigh-validity-if-not-resolve.patch [new file with mode: 0644]

diff --git a/linux-next-pending/0035-IB-ipoib-Do-not-update-neigh-validity-if-not-resolve.patch b/linux-next-pending/0035-IB-ipoib-Do-not-update-neigh-validity-if-not-resolve.patch
new file mode 100644 (file)
index 0000000..e733a1b
--- /dev/null
@@ -0,0 +1,28 @@
+From: Erez Shitrit <erezsh@mellanox.com>
+Subject: [PATCH] IB/ipoib: Do not update neigh validity if not resolved yet
+
+
+ipoib_neigh_get whenever tries to access specific neigh updates its
+"alive" variable member, the neigh now considered as updated and will
+not bee cleaned by the GC process even if it needs to be resolved again.
+
+Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
+---
+ 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 xxxxxxx..xxxxxxx xxxxxx
+--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
++++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
+@@ -1131,7 +1131,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;
+               }
+       }