Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-06-10 11:33:10 +0200
committerJiri Slaby <jslaby@suse.cz>2019-06-10 11:33:24 +0200
commitc69851262ed324e81fdf658b227349fe5acb175e (patch)
treeb829b90b0e90da31219357b2826d54be2f640ce5
parentd9976dda97caa96c4a4b35185a32dd8d5557d7e4 (diff)
neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit
(git-fixes).
-rw-r--r--patches.suse/neighbor-Call-__ipv4_neigh_lookup_noref-in-neigh_xmi.patch55
-rw-r--r--series.conf1
2 files changed, 56 insertions, 0 deletions
diff --git a/patches.suse/neighbor-Call-__ipv4_neigh_lookup_noref-in-neigh_xmi.patch b/patches.suse/neighbor-Call-__ipv4_neigh_lookup_noref-in-neigh_xmi.patch
new file mode 100644
index 0000000000..28dd9d912f
--- /dev/null
+++ b/patches.suse/neighbor-Call-__ipv4_neigh_lookup_noref-in-neigh_xmi.patch
@@ -0,0 +1,55 @@
+From: David Ahern <dsahern@gmail.com>
+Date: Wed, 1 May 2019 18:18:42 -0700
+Subject: neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit
+Git-commit: 4b2a2bfeb3f056461a90bd621e8bd7d03fa47f60
+Patch-mainline: v5.2-rc1
+References: git-fixes
+
+Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to
+INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was not
+updated to use the altered key. The result is that every packet Tx does
+a lookup on the gateway address which does not find an entry, a new one
+is created only to find the existing one in the table right before the
+insert since arp_constructor was updated to reset the primary key. This
+is seen in the allocs and destroys counters:
+ ip -s -4 ntable show | head -10 | grep alloc
+
+which increase for each packet showing the unnecessary overhread.
+
+Fix by having neigh_xmit use __ipv4_neigh_lookup_noref for NEIGH_ARP_TABLE.
+
+Fixes: cd9ff4de0107 ("ipv4: Make neigh lookup keys for loopback/point-to-point devices be INADDR_ANY")
+Reported-by: Alan Maguire <alan.maguire@oracle.com>
+Signed-off-by: David Ahern <dsahern@gmail.com>
+Tested-by: Alan Maguire <alan.maguire@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ net/core/neighbour.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/net/core/neighbour.c
++++ b/net/core/neighbour.c
+@@ -30,6 +30,7 @@
+ #include <linux/times.h>
+ #include <net/net_namespace.h>
+ #include <net/neighbour.h>
++#include <net/arp.h>
+ #include <net/dst.h>
+ #include <net/sock.h>
+ #include <net/netevent.h>
+@@ -2529,7 +2530,13 @@ int neigh_xmit(int index, struct net_dev
+ if (!tbl)
+ goto out;
+ rcu_read_lock_bh();
+- neigh = __neigh_lookup_noref(tbl, addr, dev);
++ if (index == NEIGH_ARP_TABLE) {
++ u32 key = *((u32 *)addr);
++
++ neigh = __ipv4_neigh_lookup_noref(dev, key);
++ } else {
++ neigh = __neigh_lookup_noref(tbl, addr, dev);
++ }
+ if (!neigh)
+ neigh = __neigh_create(tbl, addr, dev, false);
+ err = PTR_ERR(neigh);
diff --git a/series.conf b/series.conf
index 2b2256827a..fb5b8aafd4 100644
--- a/series.conf
+++ b/series.conf
@@ -22108,6 +22108,7 @@
patches.fixes/0001-p54-drop-device-reference-count-if-fails-to-enable-d.patch
patches.drivers/brcm80211-potential-NULL-dereference-in-brcmf_cfg802.patch
patches.drivers/net-ena-fix-return-value-of-ena_com_config_llq_info.patch
+ patches.suse/neighbor-Call-__ipv4_neigh_lookup_noref-in-neigh_xmi.patch
patches.fixes/0001-dt-bindings-net-Fix-a-typo-in-the-phy-mode-list-for-.patch
patches.drivers/usb-storage-Set-virt_boundary_mask-to-avoid-SG-overf.patch
patches.drivers/USB-cdc-acm-fix-unthrottle-races.patch