aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorBirger Koblitz <git@birger-koblitz.de>2021-01-21 14:32:44 +0100
committerPetr Štetiar <ynezz@true.cz>2021-01-26 15:06:50 +0100
commit56ac4fced086c74c73cc05a6af750ee236910811 (patch)
tree22614c62cfff6f068dcd916152a141a0ed54e40c /target
parentdc9cc0d3e2a1ede4bcf2e6b5b0aded4dc50244af (diff)
downloadupstream-56ac4fced086c74c73cc05a6af750ee236910811.tar.gz
upstream-56ac4fced086c74c73cc05a6af750ee236910811.tar.bz2
upstream-56ac4fced086c74c73cc05a6af750ee236910811.zip
realtek: correct l2 offloading tag handling
Makes sure the DSA trailer information on any L2 offloading done by the switch is honoured by the bridge layer Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Diffstat (limited to 'target')
-rw-r--r--target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch11
1 files changed, 7 insertions, 4 deletions
diff --git a/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch b/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
index c8a09c50d3..7bfbd0a5f6 100644
--- a/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
+++ b/target/linux/realtek/patches-5.4/701-net-dsa-add-rtl838x-support-for-tag-trailer.patch
@@ -9,21 +9,24 @@
+ trailer[1] = dp->index;
+#else
trailer[1] = 1 << dp->index;
-+#endif /* CONFIG_NET_DSA_RTL83XX */
++#endif /* CONFIG_NET_DSA_RTL838X */
trailer[2] = 0x10;
trailer[3] = 0x00;
-@@ -61,12 +66,20 @@ static struct sk_buff *trailer_rcv(struc
+@@ -61,12 +69,23 @@ static struct sk_buff *trailer_rcv(struc
return NULL;
trailer = skb_tail_pointer(skb) - 4;
+
+#ifdef CONFIG_NET_DSA_RTL83XX
-+ if (trailer[0] != 0x80 || (trailer[1] & 0xe0) != 0x00 ||
++ if (trailer[0] != 0x80 || (trailer[1] & 0x80) != 0x00 ||
+ (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
+ return NULL;
+
-+ source_port = trailer[1] & 0x1f;
++ if (trailer[1] & 0x40)
++ skb->offload_fwd_mark = 1;
++
++ source_port = trailer[1] & 0x3f;
+#else
if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
(trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)