linux/drivers/net/ethernet/airoha
Lorenzo Bianconi 9f6b606b6b net: airoha: ppe: Do not invalid PPE entries in case of SW hash collision
SW hash computed by airoha_ppe_foe_get_entry_hash routine (used for
foe_flow hlist) can theoretically produce collisions between two
different HW PPE entries.
In airoha_ppe_foe_insert_entry() if the collision occurs we will mark
the second PPE entry in the list as stale (setting the hw hash to 0xffff).
Stale entries are no more updated in airoha_ppe_foe_flow_entry_update
routine and so they are removed by Netfilter.
Fix the problem not marking the second entry as stale in
airoha_ppe_foe_insert_entry routine if we have already inserted the
brand new entry in the PPE table and let Netfilter remove real stale
entries according to their timestamp.
Please note this is just a theoretical issue spotted reviewing the code
and not faced running the system.

Fixes: cd53f62261 ("net: airoha: Add L2 hw acceleration support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250818-airoha-en7581-hash-collision-fix-v1-1-d190c4b53d1c@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-08-21 11:25:11 +02:00
..
airoha_eth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-10 10:10:49 -07:00
airoha_eth.h net: airoha: Initialize PPE UPDMEM source-mac table 2025-06-03 12:55:29 +02:00
airoha_npu.c net: airoha: npu: Add missing MODULE_FIRMWARE macros 2025-08-04 17:15:59 -07:00
airoha_npu.h net: airoha: Add FLOW_CLS_STATS callback support 2025-05-20 20:00:51 -07:00
airoha_ppe_debugfs.c net: airoha: Add FLOW_CLS_STATS callback support 2025-05-20 20:00:51 -07:00
airoha_ppe.c net: airoha: ppe: Do not invalid PPE entries in case of SW hash collision 2025-08-21 11:25:11 +02:00
airoha_regs.h net: airoha: Enable RX queues 16-31 2025-06-10 17:58:26 -07:00
Kconfig net: airoha: Add FLOW_CLS_STATS callback support 2025-05-20 20:00:51 -07:00
Makefile net: airoha: Introduce PPE debugfs support 2025-03-04 13:22:10 +01:00