net: ethernet: mediatek: fix a typo bug in flow offloading

Issue was 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 but was re-assigned to head_offset.
Fix the assignment.

Fixes: 502e84e238 ("net: ethernet: mtk_eth_soc: add flow offloading support")
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
DENG Qingfang 2021-04-17 15:29:04 +08:00 committed by David S. Miller
parent 32c1fdb5e9
commit 6ecaf81d4a
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,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,
};