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:16 +0200
commitf11941be57b4d4b4116e4f54cfed80fbb01a96cf (patch)
treec6a06d0f6112643c1fa01e982d94fe422dbb8284
parent321456772b9c5461e022fce8d2ae8aadebfd8432 (diff)
udp: use indirect call wrappers for GRO socket lookup
(bsc#1124503).
-rw-r--r--patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch52
-rw-r--r--series.conf1
2 files changed, 53 insertions, 0 deletions
diff --git a/patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch b/patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch
new file mode 100644
index 0000000000..9d0dd3e1f2
--- /dev/null
+++ b/patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.patch
@@ -0,0 +1,52 @@
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Fri, 14 Dec 2018 11:52:00 +0100
+Subject: udp: use indirect call wrappers for GRO socket lookup
+Patch-mainline: v5.0-rc1
+Git-commit: 4f24ed77dec9b067d08f7958a287cbf48665f35e
+References: bsc#1124503
+
+This avoids another indirect call for UDP GRO. Again, the test
+for the IPv6 variant is performed first.
+
+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>
+
+---
+ net/ipv4/udp_offload.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -245,6 +245,8 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
+ return segs;
+ }
+
++INDIRECT_CALLABLE_DECLARE(struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
++ __be16 sport, __be16 dport));
+ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
+ struct udphdr *uh, udp_lookup_t lookup)
+ {
+@@ -264,7 +266,8 @@ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
+ NAPI_GRO_CB(skb)->encap_mark = 1;
+
+ rcu_read_lock();
+- sk = (*lookup)(skb, uh->source, uh->dest);
++ sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
++ udp4_lib_lookup_skb, skb, uh->source, uh->dest);
+
+ if (sk && udp_sk(sk)->gro_receive)
+ goto unflush;
+@@ -344,7 +347,8 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff,
+ skb->encapsulation = 1;
+
+ rcu_read_lock();
+- sk = (*lookup)(skb, uh->source, uh->dest);
++ sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
++ udp4_lib_lookup_skb, skb, uh->source, uh->dest);
+ if (sk && udp_sk(sk)->gro_complete)
+ err = udp_sk(sk)->gro_complete(sk, skb,
+ nhoff + sizeof(struct udphdr));
diff --git a/series.conf b/series.conf
index b863c779e9..e481147e83 100644
--- a/series.conf
+++ b/series.conf
@@ -20618,6 +20618,7 @@
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/net-use-indirect-call-wrappers-at-GRO-transport-laye.patch
+ patches.fixes/udp-use-indirect-call-wrappers-for-GRO-socket-lookup.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