[][openwrt][mt7988][crypto][Fix session disconnected when transfering IPSec tunnel]
[Description]
Fix session disconnected when transfering IPSec tunnel.
The root cause of this problem is memory consistency. When a Transform
Record is prepared, the data is only on CPU cache. DMA controller in
EIP197 may fetch incomplete data from main memory since the TR in CPU
cache didn't totally sync to main memory.
After this commit, when a Transform Record is built, we'll sync to main
memory immediately with PCL_Transform_Register().
[Release-log]
N/A
Change-Id: I7085d6fa76f60e75a883645e08af1298bdf62b98
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9808508
diff --git a/feed/kernel/crypto-eip/src/init.c b/feed/kernel/crypto-eip/src/init.c
index 9dfa7ad..7a7ec27 100644
--- a/feed/kernel/crypto-eip/src/init.c
+++ b/feed/kernel/crypto-eip/src/init.c
@@ -133,6 +133,8 @@
/* Not support at v5.4*/
.xdo_dev_policy_add = mtk_xfrm_offload_policy_add,
+ .xdo_dev_policy_delete = mtk_xfrm_offload_policy_delete,
+ .xdo_dev_policy_free = mtk_xfrm_offload_policy_free,
};
static int mtk_crypto_register_algorithms(struct mtk_crypto_priv *priv)