[openwrt][mt7988][pce][separate CLS entry definition from TOPS_ENTRY]
Change CLS entry definition.
Before this patch modification, 1 CLS entry is strictly mapping to a
TOPS_ENTRY which means that 1 tunnel protocol can only occupy 1 CLS entry.
This implementation is based on the assumption of all tunnel protocols
separate different session by destination IP.
This may cause some problem if a tunnel protocol distinguish different
session not by destination IP.
Take IPsec ESP for instance, it use ESP header's SPI field to
differentiate sessions. In this example, ESP will occupy several CLS entry
for several sessions.
In this patch, CLS entry is not strictly mapped to 1 tunnel protocol
If a protocol needs to use CLS to forward packets to HW offload engine,
the CLS configuration is now runtime configured instead of setup at boot
Users can use mtk_pce_cls_entry_alloc() to allocate an empty cls_entry.
When they setup the cls_entry structure, they should use
mtk_pce_cls_entry_write() to write the CLS HW.
3 files changed