]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2019 11:29:54 +0000 (13:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2019 11:29:54 +0000 (13:29 +0200)
added patches:
ip_tunnel-allow-not-to-count-pkts-on-tstats-by-setting-skb-s-dev-to-null.patch

queue-4.14/ip_tunnel-allow-not-to-count-pkts-on-tstats-by-setting-skb-s-dev-to-null.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/ip_tunnel-allow-not-to-count-pkts-on-tstats-by-setting-skb-s-dev-to-null.patch b/queue-4.14/ip_tunnel-allow-not-to-count-pkts-on-tstats-by-setting-skb-s-dev-to-null.patch
new file mode 100644 (file)
index 0000000..0c7574e
--- /dev/null
@@ -0,0 +1,43 @@
+From 5684abf7020dfc5f0b6ba1d68eda3663871fce52 Mon Sep 17 00:00:00 2001
+From: Xin Long <lucien.xin@gmail.com>
+Date: Mon, 17 Jun 2019 21:34:13 +0800
+Subject: ip_tunnel: allow not to count pkts on tstats by setting skb's dev to NULL
+
+From: Xin Long <lucien.xin@gmail.com>
+
+commit 5684abf7020dfc5f0b6ba1d68eda3663871fce52 upstream.
+
+iptunnel_xmit() works as a common function, also used by a udp tunnel
+which doesn't have to have a tunnel device, like how TIPC works with
+udp media.
+
+In these cases, we should allow not to count pkts on dev's tstats, so
+that udp tunnel can work with no tunnel device safely.
+
+Signed-off-by: Xin Long <lucien.xin@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/ipv4/ip_tunnel_core.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/net/ipv4/ip_tunnel_core.c
++++ b/net/ipv4/ip_tunnel_core.c
+@@ -89,9 +89,12 @@ void iptunnel_xmit(struct sock *sk, stru
+       __ip_select_ident(net, iph, skb_shinfo(skb)->gso_segs ?: 1);
+       err = ip_local_out(net, sk, skb);
+-      if (unlikely(net_xmit_eval(err)))
+-              pkt_len = 0;
+-      iptunnel_xmit_stats(dev, pkt_len);
++
++      if (dev) {
++              if (unlikely(net_xmit_eval(err)))
++                      pkt_len = 0;
++              iptunnel_xmit_stats(dev, pkt_len);
++      }
+ }
+ EXPORT_SYMBOL_GPL(iptunnel_xmit);
index 587e9fab73913d311fa36eb04e917f76a7a94f95..387cb752357eeb0cb234b69cfde9204e6b3ab190 100644 (file)
@@ -22,4 +22,5 @@ sched-fair-don-t-free-p-numa_faults-with-concurrent-readers.patch
 drivers-pps-pps.c-clear-offset-flags-in-pps_setparams-ioctl.patch
 fix-allyesconfig-output.patch
 ceph-hold-i_ceph_lock-when-removing-caps-for-freeing-inode.patch
+ip_tunnel-allow-not-to-count-pkts-on-tstats-by-setting-skb-s-dev-to-null.patch
 sched-fair-use-rcu-accessors-consistently-for-numa_group.patch