de376bf78dae170a2aa6a494c3f5b7c40e3f21ee
[openwrt/staging/xback.git] /
1 From 6ecaf81d4ac6365f9284f9d68d74f7c209e74f98 Mon Sep 17 00:00:00 2001
2 From: DENG Qingfang <dqfext@gmail.com>
3 Date: Sat, 17 Apr 2021 15:29:04 +0800
4 Subject: [PATCH] net: ethernet: mediatek: fix a typo bug in flow offloading
5
6 Issue was traffic problems after a while with increased ping times if
7 flow offload is active. It turns out that key_offset with cookie is
8 needed in rhashtable_params but was re-assigned to head_offset.
9 Fix the assignment.
10
11 Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support")
12 Signed-off-by: DENG Qingfang <dqfext@gmail.com>
13 Tested-by: Frank Wunderlich <frank-w@public-files.de>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
15 ---
16 drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
20 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
21 @@ -44,7 +44,7 @@ struct mtk_flow_entry {
22
23 static const struct rhashtable_params mtk_flow_ht_params = {
24 .head_offset = offsetof(struct mtk_flow_entry, node),
25 - .head_offset = offsetof(struct mtk_flow_entry, cookie),
26 + .key_offset = offsetof(struct mtk_flow_entry, cookie),
27 .key_len = sizeof(unsigned long),
28 .automatic_shrinking = true,
29 };