From: Felix Fietkau <nbd@nbd.name>
Date: Fri, 12 Sep 2025 14:18:14 +0200
Subject: [PATCH] net: ethernet: mtk_eth_soc: zero initialize PPE flow table

Avoid picking up flows from last boot or other invalid data

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---

--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
@@ -914,6 +914,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_
 	if (!foe)
 		goto err_free_l2_flows;
 
+	memset(foe, 0, MTK_PPE_ENTRIES * soc->foe_entry_size);
 	ppe->foe_table = foe;
 
 	foe_flow_size = (MTK_PPE_ENTRIES / soc->hash_offset) *
@@ -928,6 +929,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_
 		if (!mib)
 			return NULL;
 
+		memset(mib, 0, MTK_PPE_ENTRIES * sizeof(*mib));
 		ppe->mib_table = mib;
 
 		acct = devm_kzalloc(dev, MTK_PPE_ENTRIES * sizeof(*acct),
