diff options
Diffstat (limited to 'target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch')
-rw-r--r-- | target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch b/target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch index 43be09102e..fdc3d520c1 100644 --- a/target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch +++ b/target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch @@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } static void mtk_ppe_cache_clear(struct mtk_ppe *ppe) -@@ -510,13 +525,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp +@@ -508,13 +523,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp hwe->ib1 &= ~MTK_FOE_IB1_STATE; hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID); dma_wmb(); @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> } entry->hash = 0xffff; -@@ -540,11 +548,14 @@ static int __mtk_foe_entry_idle_time(str +@@ -539,11 +547,14 @@ static int __mtk_foe_entry_idle_time(str } static bool @@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> int len; if (hash == 0xffff) -@@ -555,18 +566,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp +@@ -554,18 +565,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp memcpy(&foe, hwe, len); if (!mtk_flow_entry_match(ppe->eth, entry, &foe, len) || @@ -146,8 +146,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> struct mtk_flow_entry *cur; struct hlist_node *tmp; int idle; -@@ -575,7 +603,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe - hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, list) { +@@ -574,7 +602,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe + hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, l2_list) { int cur_idle; - if (!mtk_flow_entry_update(ppe, cur)) { @@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> __mtk_foe_entry_clear(ppe, entry, false); continue; } -@@ -590,10 +620,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe +@@ -589,10 +619,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe } } @@ -187,7 +187,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> struct mtk_eth *eth = ppe->eth; u16 timestamp = mtk_eth_timestamp(eth); struct mtk_foe_entry *hwe; -@@ -618,6 +667,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p +@@ -617,6 +666,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p dma_wmb(); @@ -200,7 +200,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> mtk_ppe_cache_clear(ppe); } -@@ -782,21 +837,6 @@ out: +@@ -781,21 +836,6 @@ out: spin_unlock_bh(&ppe_lock); } @@ -222,7 +222,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> int mtk_ppe_prepare_reset(struct mtk_ppe *ppe) { if (!ppe) -@@ -824,32 +864,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe +@@ -823,32 +863,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe return mtk_ppe_wait_busy(ppe); } @@ -257,7 +257,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> bool accounting = eth->soc->has_accounting; --- a/drivers/net/ethernet/mediatek/mtk_ppe.h +++ b/drivers/net/ethernet/mediatek/mtk_ppe.h -@@ -278,6 +278,8 @@ struct mtk_flow_entry { +@@ -283,6 +283,8 @@ struct mtk_flow_entry { struct mtk_foe_entry data; struct rhash_head node; unsigned long cookie; @@ -266,7 +266,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> }; struct mtk_mib_entry { -@@ -320,6 +322,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_ +@@ -325,6 +327,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_ void mtk_ppe_start(struct mtk_ppe *ppe); int mtk_ppe_stop(struct mtk_ppe *ppe); int mtk_ppe_prepare_reset(struct mtk_ppe *ppe); @@ -274,7 +274,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash); -@@ -368,9 +371,8 @@ int mtk_foe_entry_set_queue(struct mtk_e +@@ -373,9 +376,8 @@ int mtk_foe_entry_set_queue(struct mtk_e unsigned int queue); int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry); |