]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk_eth_soc: support creating mac address based offload entries
authorFelix Fietkau <nbd@nbd.name>
Tue, 5 Apr 2022 19:57:55 +0000 (21:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Apr 2022 13:08:51 +0000 (14:08 +0100)
commitf2f6f03564be97b02111fe551cd0d215b4522248
treeb006485b88f1745e80888a219df1f616f3bd90cc
parent171c25321e2520a08e51a081f1d8c9e0d741c81e
net: ethernet: mtk_eth_soc: support creating mac address based offload entries

This will be used to implement a limited form of bridge offloading.
Since the hardware does not support flow table entries with just source
and destination MAC address, the driver has to emulate it.

The hardware automatically creates entries entries for incoming flows, even
when they are bridged instead of routed, and reports when packets for these
flows have reached the minimum PPS rate for offloading.

After this happens, we look up the L2 flow offload entry based on the MAC
header and fill in the output routing information in the flow table.
The dynamically created per-flow entries are automatically removed when
either the hardware flowtable entry expires, is replaced, or if the offload
rule they belong to is removed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_ppe.c
drivers/net/ethernet/mediatek/mtk_ppe.h
drivers/net/ethernet/mediatek/mtk_ppe_offload.c