Hi,when I test ipec(strongwan) with caam,some error occur。
Environment:
- 2 board with ap IMX8MP 、ksz9886(attach fec)、caam
- ipsec tunnel ip :192.167.0.50 , 192.167.0.60
- Subnet ip:192.168.9.1 , 192.168.6.1
- Client/Server ip(pc connect to subnet):192.168.9.100 ,192.168.6.100
- Kernel version:5.4.70
- Tools:iperf3、ping、tftp
Test 1:
2 board ping each other,ping 192.168.6.1 -I 192.168.9.1,report “Cannot allocate memory”

Test 2:
1、Client ping Server,no errors report,packet captured ok
2、Iperf,tcp connected ok,but no data flow,dump packet,found esp header invalid,capture files in attachment。

3、tftp,report timeout,same as iperf test
Add printk and skb_dump in kernel code,before go into function crypto_aead_encrypt(net/ipv4/esp4.c/esp_output_tail),esp header is valid,but when dump skb in esp_output_done,esp header is invalid
Test3:
Disable caam(unset CONFIG_CRYPTO_HW),redo test1、test2 ,everything is ok,packet captured ok too