Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
+ drivers/net/ethernet/mediatek/mtk_ppe.c | 162 ++++++++++++------------
+ drivers/net/ethernet/mediatek/mtk_ppe.h | 15 +--
+ 2 files changed, 86 insertions(+), 91 deletions(-)
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -460,42 +460,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
+@@ -477,42 +477,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
return 0;
}
struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash);
hwe->ib1 &= ~MTK_FOE_IB1_STATE;
-@@ -515,7 +516,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
+@@ -532,7 +533,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
if (entry->type != MTK_FLOW_TYPE_L2_SUBFLOW)
return;
kfree(entry);
}
-@@ -531,66 +533,55 @@ static int __mtk_foe_entry_idle_time(str
+@@ -548,66 +550,55 @@ static int __mtk_foe_entry_idle_time(str
return now - timestamp;
}
}
static void
-@@ -627,7 +618,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
+@@ -650,7 +641,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
{
spin_lock_bh(&ppe_lock);
spin_unlock_bh(&ppe_lock);
}
-@@ -674,8 +666,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
+@@ -697,8 +689,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
{
const struct mtk_soc_data *soc = ppe->eth->soc;
struct mtk_flow_entry *flow_info;
u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP;
int type;
-@@ -683,30 +675,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
+@@ -706,30 +698,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
if (!flow_info)
return;
}
void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)
-@@ -716,9 +708,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -739,9 +731,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, hash);
struct mtk_flow_entry *entry;
struct mtk_foe_bridge key = {};
u8 *tag;
spin_lock_bh(&ppe_lock);
-@@ -726,20 +720,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -749,20 +743,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND)
goto out;
continue;
}
-@@ -790,9 +778,17 @@ out:
+@@ -813,9 +801,17 @@ out:
int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
{
int mtk_ppe_prepare_reset(struct mtk_ppe *ppe)
--- a/drivers/net/ethernet/mediatek/mtk_ppe.h
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.h
-@@ -265,7 +265,12 @@ enum {
+@@ -286,7 +286,12 @@ enum {
struct mtk_flow_entry {
union {
struct {
struct rhash_head l2_node;
struct hlist_head l2_flows;
-@@ -275,13 +280,7 @@ struct mtk_flow_entry {
+@@ -296,13 +301,7 @@ struct mtk_flow_entry {
s8 wed_index;
u8 ppe_index;
u16 hash;