aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-04-15 20:24:23 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-04-15 20:28:09 +0100
commit7f703716ae0e4cb4810eff37605b7594cef1edb8 (patch)
tree5a8cde4e764f0aa43c5e459f6d88700ace85f723
parent0ec8c793f5fbecac5c601625a10327bc694e33da (diff)
downloadupstream-7f703716ae0e4cb4810eff37605b7594cef1edb8.tar.gz
upstream-7f703716ae0e4cb4810eff37605b7594cef1edb8.tar.bz2
upstream-7f703716ae0e4cb4810eff37605b7594cef1edb8.zip
ramips/mediatek: import a patch fixing bug in flow-offloading
From Frank Wunderlich <frank-w@public-files.de>: Issue were traffic problems after a while with increased ping times if flow offload is active. It turns out that key_offset with cookie is needed in rhashtable_params and head_offset was defined twice. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--target/linux/generic/pending-5.10/615-net-ethernet-mediatek-fix-typo-in-offload-code.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.10/615-net-ethernet-mediatek-fix-typo-in-offload-code.patch b/target/linux/generic/pending-5.10/615-net-ethernet-mediatek-fix-typo-in-offload-code.patch
new file mode 100644
index 0000000000..07a0867bba
--- /dev/null
+++ b/target/linux/generic/pending-5.10/615-net-ethernet-mediatek-fix-typo-in-offload-code.patch
@@ -0,0 +1,24 @@
+From ec21551331bc071ed43c814265f014029fa5f95f Mon Sep 17 00:00:00 2001
+From: DENG Qingfang <dqfext@gmail.com>
+Date: Thu, 15 Apr 2021 17:40:05 +0800
+Subject: [PATCH] net: ethernet: mediatek: fix typo in offload code
+
+.key_offset was assigned to .head_offset instead. Fix the typo.
+
+Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support")
+Signed-off-by: DENG Qingfang <dqfext@gmail.com>
+---
+ drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -44,7 +44,7 @@ struct mtk_flow_entry {
+
+ static const struct rhashtable_params mtk_flow_ht_params = {
+ .head_offset = offsetof(struct mtk_flow_entry, node),
+- .head_offset = offsetof(struct mtk_flow_entry, cookie),
++ .key_offset = offsetof(struct mtk_flow_entry, cookie),
+ .key_len = sizeof(unsigned long),
+ .automatic_shrinking = true,
+ };