[][openwrt][mt7988][crypto][Fix 3 PPE issue for IPSec]
[Description]
Fix 3 PPE issue for IPSec. In previous version, we'll use CLS rule to
set fport = PPE0 for ESP packets. However, in 3 PPE situation, it expect
the packet from GDM1 fport should be PPE0, GDM2 should use PPE1, GDM3
should use PPE2.
In this commit, we add parsing dts for PPE numbers to decide which PPE
should be set to CLS rule.
[Release-log]
N/A
Change-Id: I02c0e0b94f7214964a56bf56fb1f30ef9f67bd8a
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8713736
diff --git a/feed/kernel/crypto-eip/src/xfrm-offload.c b/feed/kernel/crypto-eip/src/xfrm-offload.c
index 045002c..28f4555 100644
--- a/feed/kernel/crypto-eip/src/xfrm-offload.c
+++ b/feed/kernel/crypto-eip/src/xfrm-offload.c
@@ -83,7 +83,10 @@
cdesc = &xfrm_params->cdrt->cls->cdesc;
- CLS_DESC_DATA(cdesc, fport, PSE_PORT_PPE0);
+ if (mtk_crypto_ppe_get_num() == 1)
+ CLS_DESC_DATA(cdesc, fport, PSE_PORT_PPE0);
+ else
+ CLS_DESC_DATA(cdesc, fport, PSE_PORT_PPE1);
CLS_DESC_DATA(cdesc, tport_idx, 0x2);
CLS_DESC_DATA(cdesc, cdrt_idx, xfrm_params->cdrt->idx);