[openwrt][mt7988][tops][separate CLS_ENTRY and TOPS_ENTRY dependency]
Refactor TOPS CLS_ENTRY and TOPS_ENTRY.
Separate CLS_ENTRY and TOPS_ENTRY implicit mapping relationship.
In previous implementation, 1 protocol can only occupy a CLS_ENTRY and a
CLS_ENTRY is corresponding to a TOPS_ENTRY. 1 TOPS_ENTRY will have a
tunnel offload function inside TOPS firmware.
However, some of the protocol may occupy several CLS_ENTRY such as ESP.
This kind of protocol may use different CLS_ENTRY to distinguish each
This leads to a problem that TOPS firmware can not handle same protocol
with different TOPS_ENTRY.
To solve this problem, the idea of CLS_ENTRY and TOPS_ENTRY is no longer 1
to 1 mapping. CLS_ENTRY is now allocated dynamically and its index is
carried inside tops_tnl_params so that TOPS firmware can map that
CLS_ENTRY to a TOPS_ENTRY which will be corresponding to a tunnel offload
5 files changed