No HW_OFFLOAD byte/packet accounting on MT7621

I found this message that references a MediaTek SDK for the MT7620/21.

The SDK contains a pretty decent description of the register structure of the MT7621s packet processing engine in particular. Having looked through it, I think I can safely give up on the idea of maintaining per-flow metrics on that SoC.
It looks like the only per-flow accounting mechanism on that SoC is that a flow can be assigned to one of 64 accounting groups, where metrics associated with the flow will then accrue. As the flow table has up to 16k entries, these 64 accounting groups don't go very far.
It would be possible to limit the number of active flows in the table to 64 so that each active flow had a distinct accounting group. However, I imagine that would cause insane churn on the flow offload table, which in turn would probably make routing CPU bound.

2 Likes