Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-06-06 10:45:08 +0200
committerMichal Kubecek <mkubecek@suse.cz>2019-06-06 10:45:13 +0200
commit32bf9e7f9c8f0b79bfc3bf65fcc329f5c7c8c9d0 (patch)
tree4d84925bdec206133ac4d03cdeb0187c6eb741a8
parent7905c1dda9daaaa7789e77d1ce0d4482af02ac37 (diff)
net: use indirect call wrappers at GRO network layer
(bsc#1124503).
-rw-r--r--patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch111
-rw-r--r--series.conf1
2 files changed, 112 insertions, 0 deletions
diff --git a/patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch b/patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
new file mode 100644
index 0000000000..a6fefb0c16
--- /dev/null
+++ b/patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
@@ -0,0 +1,111 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Fri, 14 Dec 2018 11:51:58 +0100
+Subject: net: use indirect call wrappers at GRO network layer
+Patch-mainline: v5.0-rc1
+Git-commit: aaa5d90b395a72faff797b00d815165ee0e664c0
+References: bsc#1124503
+
+This avoids an indirect calls for L3 GRO receive path, both
+for ipv4 and ipv6, if the latter is not compiled as a module.
+
+Note that when IPv6 is compiled as builtin, it will be checked first,
+so we have a single additional compare for the more common path.
+
+v1 -> v2:
+ - adapted to INDIRECT_CALL_ changes
+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ include/net/inet_common.h | 2 ++
+ net/core/dev.c | 15 +++++++++++++--
+ net/ipv6/ip6_offload.c | 6 +++---
+ 3 files changed, 18 insertions(+), 5 deletions(-)
+
+--- a/include/net/inet_common.h
++++ b/include/net/inet_common.h
+@@ -1,6 +1,8 @@
+ #ifndef _INET_COMMON_H
+ #define _INET_COMMON_H
+
++#include <linux/indirect_call_wrapper.h>
++
+ extern const struct proto_ops inet_stream_ops;
+ extern const struct proto_ops inet_dgram_ops;
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -144,6 +144,7 @@
+ #include <linux/netfilter_ingress.h>
+ #include <linux/crash_dump.h>
+ #include <linux/sctp.h>
++#include <linux/indirect_call_wrapper.h>
+
+ #include "net-sysfs.h"
+
+@@ -4616,6 +4617,8 @@ static void flush_all_backlogs(void)
+ put_online_cpus();
+ }
+
++INDIRECT_CALLABLE_DECLARE(int inet_gro_complete(struct sk_buff *, int));
++INDIRECT_CALLABLE_DECLARE(int ipv6_gro_complete(struct sk_buff *, int));
+ static int napi_gro_complete(struct sk_buff *skb)
+ {
+ struct packet_offload *ptype;
+@@ -4635,7 +4638,9 @@ static int napi_gro_complete(struct sk_buff *skb)
+ if (ptype->type != type || !ptype->callbacks.gro_complete)
+ continue;
+
+- err = ptype->callbacks.gro_complete(skb, 0);
++ err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
++ ipv6_gro_complete, inet_gro_complete,
++ skb, 0);
+ break;
+ }
+ rcu_read_unlock();
+@@ -4749,6 +4754,10 @@ static void gro_pull_from_frag0(struct sk_buff *skb, int grow)
+ }
+ }
+
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **inet_gro_receive(struct sk_buff **,
++ struct sk_buff *));
++INDIRECT_CALLABLE_DECLARE(struct sk_buff **ipv6_gro_receive(struct sk_buff **,
++ struct sk_buff *));
+ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
+ {
+ struct sk_buff **pp = NULL;
+@@ -4796,7 +4805,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
+ NAPI_GRO_CB(skb)->csum_valid = 0;
+ }
+
+- pp = ptype->callbacks.gro_receive(&napi->gro_list, skb);
++ pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
++ ipv6_gro_receive, inet_gro_receive,
++ &napi->gro_list, skb);
+ break;
+ }
+ rcu_read_unlock();
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -162,8 +162,8 @@ static int ipv6_exthdrs_len(struct ipv6hdr *iph,
+ return len;
+ }
+
+-static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
+- struct sk_buff *skb)
++INDIRECT_CALLABLE_SCOPE
++struct sk_buff **ipv6_gro_receive(struct sk_buff **head, struct sk_buff *skb)
+ {
+ const struct net_offload *ops;
+ struct sk_buff **pp = NULL;
+@@ -292,7 +292,7 @@ static struct sk_buff **ip4ip6_gro_receive(struct sk_buff **head,
+ return inet_gro_receive(head, skb);
+ }
+
+-static int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
++INDIRECT_CALLABLE_SCOPE int ipv6_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+ const struct net_offload *ops;
+ struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + nhoff);
diff --git a/series.conf b/series.conf
index 43532c26d8..61c9d4ffeb 100644
--- a/series.conf
+++ b/series.conf
@@ -20616,6 +20616,7 @@
patches.fixes/0001-net-mlx5-Return-success-for-PAGE_FAULT_RESUME-in-int.patch
patches.fixes/0001-net-mlx5-Use-multi-threaded-workqueue-for-page-fault.patch
patches.fixes/indirect-call-wrappers-helpers-to-speed-up-indirect-.patch
+ patches.fixes/net-use-indirect-call-wrappers-at-GRO-network-layer.patch
patches.fixes/mac80211-fix-radiotap-vendor-presence-bitmap-handlin.patch
patches.drivers/Bluetooth-Fix-unnecessary-error-message-for-HCI-requ.patch
patches.fixes/igb-Fix-an-issue-that-PME-is-not-enabled-during-runt.patch