Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-01-17 12:02:21 +0100
committerJiri Slaby <jslaby@suse.cz>2019-01-18 15:30:18 +0100
commit864403df63add5fca87f021e078a92051107f8b1 (patch)
treed107eb5e6d4a28c274d6e7cd6de9e1d93229aa5d
parent0e11c33a2cad289e517b159b5570215329da7d99 (diff)
net: skb_scrub_packet(): Scrub offload_fwd_mark
(networking-stable-18_12_03).
-rw-r--r--patches.suse/net-skb_scrub_packet-Scrub-offload_fwd_mark.patch49
-rw-r--r--series.conf1
2 files changed, 50 insertions, 0 deletions
diff --git a/patches.suse/net-skb_scrub_packet-Scrub-offload_fwd_mark.patch b/patches.suse/net-skb_scrub_packet-Scrub-offload_fwd_mark.patch
new file mode 100644
index 0000000000..e04d8bc044
--- /dev/null
+++ b/patches.suse/net-skb_scrub_packet-Scrub-offload_fwd_mark.patch
@@ -0,0 +1,49 @@
+From: Petr Machata <petrm@mellanox.com>
+Date: Tue, 20 Nov 2018 11:39:56 +0000
+Subject: net: skb_scrub_packet(): Scrub offload_fwd_mark
+Git-commit: b5dd186d10ba59e6b5ba60e42b3b083df56df6f3
+Patch-mainline: v4.20-rc4
+References: networking-stable-18_12_03
+
+When a packet is trapped and the corresponding SKB marked as
+already-forwarded, it retains this marking even after it is forwarded
+across veth links into another bridge. There, since it ingresses the
+bridge over veth, which doesn't have offload_fwd_mark, it triggers a
+warning in nbp_switchdev_frame_mark().
+
+Then nbp_switchdev_allowed_egress() decides not to allow egress from
+this bridge through another veth, because the SKB is already marked, and
+the mark (of 0) of course matches. Thus the packet is incorrectly
+blocked.
+
+Solve by resetting offload_fwd_mark() in skb_scrub_packet(). That
+function is called from tunnels and also from veth, and thus catches the
+cases where traffic is forwarded between bridges and transformed in a
+way that invalidates the marking.
+
+[js] no offload_mr_fwd_mark in 4.12, so skip zeroing it
+
+Fixes: 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for stacked devices")
+Fixes: abf4bb6b63d0 ("skbuff: Add the offload_mr_fwd_mark field")
+Signed-off-by: Petr Machata <petrm@mellanox.com>
+Suggested-by: Ido Schimmel <idosch@mellanox.com>
+Acked-by: Jiri Pirko <jiri@mellanox.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ net/core/skbuff.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -4442,6 +4442,10 @@ void skb_scrub_packet(struct sk_buff *sk
+ nf_reset(skb);
+ nf_reset_trace(skb);
+
++#ifdef CONFIG_NET_SWITCHDEV
++ skb->offload_fwd_mark = 0;
++#endif
++
+ if (!xnet)
+ return;
+
diff --git a/series.conf b/series.conf
index aa1911b69a..7792a37748 100644
--- a/series.conf
+++ b/series.conf
@@ -19377,6 +19377,7 @@
patches.drivers/net-ibmnvic-Fix-deadlock-problem-in-reset.patch
patches.suse/net-mlx5e-Fix-selftest-for-small-MTUs.patch
patches.suse/tg3-Add-PHY-reset-for-5717-5719-5720-in-change-ring-.patch
+ patches.suse/net-skb_scrub_packet-Scrub-offload_fwd_mark.patch
patches.drivers/brcmutil-really-fix-decoding-channel-info-for-160-MH.patch
patches.drivers/iwlwifi-fix-wrong-WGDS_WIFI_DATA_SIZE.patch
patches.drivers/iwlwifi-mvm-support-sta_statistics-even-on-older-fir.patch