diff mbox series

[v2,3/3] net: ethernet: mtk_eth_soc: add missing ppe cache flush when deleting a flow

Message ID 20230323130815.7753-3-nbd@nbd.name (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [v2,1/3] net: ethernet: mtk_eth_soc: fix flow block refcounting logic | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Felix Fietkau March 23, 2023, 1:08 p.m. UTC
The cache needs to be flushed to ensure that the hardware stops offloading
the flow immediately.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/ethernet/mediatek/mtk_ppe.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Horman March 24, 2023, 12:12 p.m. UTC | #1
On Thu, Mar 23, 2023 at 02:08:15PM +0100, Felix Fietkau wrote:
> The cache needs to be flushed to ensure that the hardware stops offloading
> the flow immediately.

I wonder if a fixes tag is appropriate, and if so perhaps it should be:

Fixes: 33fc42de3327 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries")

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

In any case,

Reviewed-by: Simon Horman <simon.horman@corigine.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mediatek/mtk_ppe.c b/drivers/net/ethernet/mediatek/mtk_ppe.c
index a038b99ecbda..fd07d6e14273 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
@@ -459,6 +459,7 @@  __mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
 		hwe->ib1 &= ~MTK_FOE_IB1_STATE;
 		hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
 		dma_wmb();
+		mtk_ppe_cache_clear(ppe);
 	}
 	entry->hash = 0xffff;