<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックEncryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469166#M74129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hardware impacted:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- imx6qsabresd&amp;nbsp; BSP Board (MCIMX6Q-SDB)&lt;/P&gt;&lt;P&gt;- imx6 Solo custom board&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Linux&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;kernel versions: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- imx_4.1.15_1.0.0_ga,&lt;/P&gt;&lt;P&gt;- imx_3.10.17_1.0.0_ga&lt;/P&gt;&lt;P&gt;- and probably all others&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Description of the Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Encryption of IPSEC ESP-packets coming from eth0 ("fec" driver)&amp;nbsp; fails with CAAM when encryption algorithm is AES or AES256 on Linux platforms&lt;/EM&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample test setup is as follow:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;an i.mx6 BSP board (MCIMX6Q-SDB) with 2 network interfaces:&lt;UL&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp; eth0:&amp;nbsp; attached to the processor, handled in Linux by the fec driver&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp; eth1:&amp;nbsp; a digitus USB2.0 Ethernet&amp;nbsp; Adapter (Pegasus/Pegasus II USB Ethernet driver) connected to the OTG port.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The board runs the latest linux 4.1.15_1.0.0_ga yocto software with "ipsec-tools" and the necessary ipsec kernel modules .i.e.&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_XFRM_IPCOMP=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_NET_KEY=y&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_AH=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_ESP=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_IPCOMP=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_TUNNEL=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_TUNNEL=y&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_MODE_TRANSPORT=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_MODE_TUNNEL=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_MODE_BEET=m&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The ipsec client on the board&amp;nbsp; (ipsec-tools) is configured to encrypt traffic in an IPSEC-tunnel from eth0 to a VPN-server behind eth1: the ip traffic comes unencrypted via eth0 and goes out encrypted over eth1. This is a typical "road-warrior" scenario.&lt;/LI&gt;&lt;LI&gt;The esp encryption algorithm chosen is aes (or aes256)&lt;/LI&gt;&lt;LI&gt;In this case CAAM does not encrypt correctly the ESP packets and they are discarded by the VPN-server.&lt;/LI&gt;&lt;LI&gt;It doesn't matter which VPN-server is used, we have been trying with CISCO ASA, various Juniper gateways, PfSense, racoon, strongSwan: problem is always there.&lt;/LI&gt;&lt;LI&gt;We have been replacing ipsec-tools by strongSwan: the problem remains&lt;/LI&gt;&lt;LI&gt;We have been investigating this issue quiet intensively these last 6 months and found out that:&lt;UL&gt;&lt;LI&gt;&amp;nbsp; changing the encryption algorithm from aes to 3des solves this issue&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; deactivating caam also solves this issue&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; switching cable and ip addresses of eth0 and eth1 also solves this issue&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; using VLAN tagging on eth0 solves this issue&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For different (good) reasons non of these workarounds are acceptable for us: we have a customer that needs to perform IPSEC AES encryption from eth0 to eth1. This issue seems to be present on all i.MX6 platforms.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any workarounds other than the ones listed above for this issue ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can provide additional logging/configuration files/images if needed.&lt;/P&gt;&lt;P&gt;Attached is a short description of the IPSEC&amp;nbsp; test-setup on the i.MX6 test board.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;ipsec.sh&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;racoon.setkey.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;racoon.conf.aes.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;run-logs.tgz&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;setup.log.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 May 2016 08:57:00 GMT</pubDate>
    <dc:creator>h_eznt</dc:creator>
    <dc:date>2016-05-13T08:57:00Z</dc:date>
    <item>
      <title>Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469166#M74129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hardware impacted:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- imx6qsabresd&amp;nbsp; BSP Board (MCIMX6Q-SDB)&lt;/P&gt;&lt;P&gt;- imx6 Solo custom board&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Linux&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;kernel versions: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- imx_4.1.15_1.0.0_ga,&lt;/P&gt;&lt;P&gt;- imx_3.10.17_1.0.0_ga&lt;/P&gt;&lt;P&gt;- and probably all others&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; Description of the Problem:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Encryption of IPSEC ESP-packets coming from eth0 ("fec" driver)&amp;nbsp; fails with CAAM when encryption algorithm is AES or AES256 on Linux platforms&lt;/EM&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sample test setup is as follow:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;an i.mx6 BSP board (MCIMX6Q-SDB) with 2 network interfaces:&lt;UL&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp; eth0:&amp;nbsp; attached to the processor, handled in Linux by the fec driver&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp; eth1:&amp;nbsp; a digitus USB2.0 Ethernet&amp;nbsp; Adapter (Pegasus/Pegasus II USB Ethernet driver) connected to the OTG port.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The board runs the latest linux 4.1.15_1.0.0_ga yocto software with "ipsec-tools" and the necessary ipsec kernel modules .i.e.&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_XFRM_IPCOMP=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_NET_KEY=y&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_AH=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_ESP=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_IPCOMP=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_TUNNEL=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_TUNNEL=y&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_MODE_TRANSPORT=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_MODE_TUNNEL=m&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;CONFIG_INET_XFRM_MODE_BEET=m&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The ipsec client on the board&amp;nbsp; (ipsec-tools) is configured to encrypt traffic in an IPSEC-tunnel from eth0 to a VPN-server behind eth1: the ip traffic comes unencrypted via eth0 and goes out encrypted over eth1. This is a typical "road-warrior" scenario.&lt;/LI&gt;&lt;LI&gt;The esp encryption algorithm chosen is aes (or aes256)&lt;/LI&gt;&lt;LI&gt;In this case CAAM does not encrypt correctly the ESP packets and they are discarded by the VPN-server.&lt;/LI&gt;&lt;LI&gt;It doesn't matter which VPN-server is used, we have been trying with CISCO ASA, various Juniper gateways, PfSense, racoon, strongSwan: problem is always there.&lt;/LI&gt;&lt;LI&gt;We have been replacing ipsec-tools by strongSwan: the problem remains&lt;/LI&gt;&lt;LI&gt;We have been investigating this issue quiet intensively these last 6 months and found out that:&lt;UL&gt;&lt;LI&gt;&amp;nbsp; changing the encryption algorithm from aes to 3des solves this issue&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; deactivating caam also solves this issue&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; switching cable and ip addresses of eth0 and eth1 also solves this issue&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; using VLAN tagging on eth0 solves this issue&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For different (good) reasons non of these workarounds are acceptable for us: we have a customer that needs to perform IPSEC AES encryption from eth0 to eth1. This issue seems to be present on all i.MX6 platforms.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any workarounds other than the ones listed above for this issue ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can provide additional logging/configuration files/images if needed.&lt;/P&gt;&lt;P&gt;Attached is a short description of the IPSEC&amp;nbsp; test-setup on the i.MX6 test board.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;ipsec.sh&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;racoon.setkey.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;racoon.conf.aes.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;run-logs.tgz&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337047"&gt;setup.log.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 May 2016 08:57:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469166#M74129</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-05-13T08:57:00Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469167#M74130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please try to check CAAM, using section 9 (Security) in "i.MX_Linux_User's_Guide.pdf".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/webapp/Download?colCode=L4.1.15_1.1.0_LINUX_DOCS&amp;amp;Parent_nodeId=1337699481071706174845&amp;amp;Parent_pageType=product" title="http://www.nxp.com/webapp/Download?colCode=L4.1.15_1.1.0_LINUX_DOCS&amp;amp;Parent_nodeId=1337699481071706174845&amp;amp;Parent_pageType=product"&gt;http://www.nxp.com/webapp/Download?colCode=L4.1.15_1.1.0_LINUX_DOCS&amp;amp;Parent_nodeId=1337699481071706174845&amp;amp;Parent_pageType…&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Yuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 06:54:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469167#M74130</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-05-17T06:54:48Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469168#M74131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri, &lt;/P&gt;&lt;P&gt;Thanks for your post. Unfortunately it does not help:&lt;/P&gt;&lt;P&gt;Chapter 9 of the "i.MX_Linux_User's_Guide.pdf" is related to the use of caam over cryptodev. cryptodev is the user-space interface to the Linux-Kernel cryptographic layers. In Linux, ESP-IPSEC encryption does not happen in user-space but only in kernel-mode. So cryptodev is not involved here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hubert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 07:48:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469168#M74131</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-05-18T07:48:10Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469169#M74132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; look slike You should use Scatterlist Crypto API.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://www.kernel.org/doc/Documentation/crypto/api-intro.txt" title="https://www.kernel.org/doc/Documentation/crypto/api-intro.txt"&gt;https://www.kernel.org/doc/Documentation/crypto/api-intro.txt&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless, You can test it via cryprodev as mentioned yearlier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 May 2016 08:04:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469169#M74132</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2016-05-18T08:04:13Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469170#M74133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yuri, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the link. You are right that the Scatter-API is involved here. &lt;/P&gt;&lt;P&gt;The Linux CAAM driver is actually intensively using the Linux scatter-list API.&lt;/P&gt;&lt;P&gt;The Linux CAAM driver is delivered by NXP/Freescale.&lt;/P&gt;&lt;P&gt;The problem is that this Linux CAAM driver that you deliver fails under some conditions. &lt;/P&gt;&lt;P&gt;I am not the programmer of the CAAM driver, I though Freescale/NXP was. If I could fix this driver I would do it, but without deep knowledge of the CAAM hardware and debugging facilities, it is just impossible. That 's why I did report this issue, with the hope that I can get help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am addressing a very specific issue that happens only under certain conditions. Let me rephrase it briefly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Linux with the CAAM driver, when an unencrypted packet gets switched from eth0 (FEC) to eth1 and it matches an outgoing IPSEC policy involving AES encryption, it then gets wrongly encrypted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this issue involves IPSEC with AES (i.e. CAAM Hardware/CAAM driver) _AND_ packet switching (i.e. FEC ethernet controller/FEC driver) simultaneously. If you just test IPSEC (with AES encryption) without packet switching over eth0, you will no be able to reproduce the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for cryptodev, I will underline once more that these test-conditions can _NOT_ be reproduced with any cryptodev stuff because, in Linux, ipsec is always processed in kernel-mode and cryptodev is not involved. The Linux IPSEC implementation forwards the buffers to encrypt directly to the CAAM driver. &lt;/P&gt;&lt;P&gt;I don't know any Linux ipsec implementation based on cryptodev. Therefore, I don't understand what you expect me to do with cryptodev and user-space APIs ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hubert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 07:10:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469170#M74133</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-05-20T07:10:19Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469171#M74134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hubert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have come close to replicating this issue. Please forward any configuration files you have and also the log of issues that you faced with accessing aes encryption using caam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Utkarsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 19:53:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469171#M74134</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-02T19:53:36Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469172#M74135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;Added the file&amp;nbsp; "Network_Schema.pdf" for a schematic description of the test setup.&lt;/LI&gt;&lt;LI&gt;Added the archive "run-logs.tgz" containing log files and traces&lt;/LI&gt;&lt;LI&gt;The ipsec racoon configuration on the i.mx6 is detailed in the attachment "setup.log.zip"&lt;/LI&gt;&lt;LI&gt;The network configuration of the i.mx6 is as follow:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;root@imx6qsabresd:~# cat /etc/network/interfaces&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# The loopback interface&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;auto lo&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iface lo inet loopback&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;# Wired or wireless interfaces&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;auto eth0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iface eth0 inet static&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address 10.1.1.1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netmask 255.255.255.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; network 10.1.1.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;auto eth1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iface eth1 inet static&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; address 192.168.3.77&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netmask 255.255.255.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; network 192.168.3.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gateway 192.168.3.1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The compressed sd-card image of the MCIMX6Q-SDB BSP Board is available for download under the following URL:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://extranet.garderos.com/files/?v=share/2B0D4DC9632B442A902AA1A482E34099"&gt;https://extranet.garderos.com/files/?v=share/2B0D4DC9632B442A902AA1A482E34099&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This URL is protected with a password: nxp-freescale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 13:34:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469172#M74135</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-06-03T13:34:12Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469173#M74136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you forgot to attach network schema and run logs files.&lt;/P&gt;&lt;P&gt;_________________________________________________&lt;/P&gt;&lt;P&gt;Sorry found it ni original post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 17:37:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469173#M74136</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-03T17:37:05Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469174#M74137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you also share the ipsec.sh and racoon.conf.aes scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Utkarsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 18:56:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469174#M74137</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-08T18:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469175#M74138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Added as attachment ipsec.sh, racoon.setkey and racoon.conf.aes :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/etc/racoon/&lt;STRONG&gt;ipsec.sh&lt;/STRONG&gt; : ipsec start script on the i.MX6 - This script must always be called between 2 tests to ensure kernel policies are properly cleaned-up. Policies are defined in /etc/racoon/racoon.setkey&lt;/LI&gt;&lt;LI&gt;/etc/racoon/&lt;STRONG&gt;racoon.setkey&lt;/STRONG&gt; : ipsec policies on i.MX6 device&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionaly, all files of the i.MX6 device are available on the sd-card bootable&amp;nbsp; image referenced above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;/etc/racoon/&lt;STRONG&gt;racoon.conf.aes&lt;/STRONG&gt; : racoon configuration file on the VPN server (ip-address: 192.168.3.1)&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 06:49:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469175#M74138</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-06-09T06:49:16Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469176#M74139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the sd card bootable image seems to be corrupted. I am unable to extract it. Can you send that again. thanks.&lt;/P&gt;&lt;P&gt;tar -xJvf imx6q-aes.sd.xz &lt;/P&gt;&lt;P&gt;xz: (stdin): File format not recognized&lt;/P&gt;&lt;P&gt;tar: Child returned status 1&lt;/P&gt;&lt;P&gt;tar: Error is not recoverable: exiting now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 17:13:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469176#M74139</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-09T17:13:55Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469177#M74140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition can you describe if my understanding of your network configuration is correct. If not can you modify and describe it more clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/59121i64F9B2334384BD35/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would need help in creating a VPN server. Should it be through a linux machine running racoon (if yes I would need the configuration files) or is it a VPN through dd-wrt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Utkarsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 04:56:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469177#M74140</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-10T04:56:49Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469178#M74141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, something went wrong with the compression. Sorry for that. &lt;BR /&gt;Now it has been corrected, please use the following new link:&lt;/P&gt;&lt;P&gt;&lt;A href="https://extranet.garderos.com/files/?v=share/4EA09E8B02294413928527BB2CCADB06&amp;amp;c=1" title="https://extranet.garderos.com/files/?v=share/4EA09E8B02294413928527BB2CCADB06&amp;amp;c=1"&gt;https://extranet.garderos.com/files/?v=share/4EA09E8B02294413928527BB2CCADB06&amp;amp;c=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;password is: nxp-freescale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 07:36:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469178#M74141</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-06-10T07:36:46Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469179#M74142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your network setup is exactly like mine and you will be able to reproduce the issue with it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not mandatory to have a separate machine on the 10.0.3.0/24 network: pinging from the external test client to the ip 10.0.3.1 on the VPN gateway is sufficient. Please note that you really need an external test client, source pinging from the i.MX6Q will &lt;STRONG&gt;not&lt;/STRONG&gt; reproduce the issue (because in this case the packet is directly processed by the kernel without being switched over the eth0 interface). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, you can use whatever VPN-server you want. I would suggest to use an ubuntu&amp;nbsp; 14.04 machine with racoon, since I am not an expert in dd-wrt. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will post some configuration files for racoon on ubuntu 14.04&amp;nbsp; in the course of the day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 07:50:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469179#M74142</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-06-10T07:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469180#M74143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding the&amp;nbsp; VPN-Server configuration on Ubuntu 14.04, you will need the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;install racoon:&amp;nbsp; &lt;EM&gt;sudo apt-get install ipsec-tools&lt;/EM&gt; &lt;/LI&gt;&lt;LI&gt;and stop it:&amp;nbsp; &lt;EM&gt;sudo /etc/racoon stop &lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;configure one interface (for example &lt;EM&gt;eth0&lt;/EM&gt;)&amp;nbsp; of&amp;nbsp; the VPN server with ip &lt;EM&gt;192.168.3.1/24&lt;/EM&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;cat /etc/interfaces&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; auto eth0&lt;BR /&gt;&amp;nbsp; iface eth0 inet static&lt;BR /&gt;&amp;nbsp; address 192.168.3.1&lt;BR /&gt;&amp;nbsp; netmask 255.255.255.0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;and restart networking: &lt;EM&gt;sudo service networking restart&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt; &lt;/EM&gt;activate ipv4 routing:&amp;nbsp; &lt;EM&gt;sudo su - ; echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt; configure another interface of the VPN server with the&amp;nbsp; ip 10.0.3.1/24 &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This one can be configured manually: &lt;BIG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/BIG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SMALL&gt;&lt;BIG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo ifconfig &amp;lt;yourIfaceName&amp;gt; 10.0.3.1/24; &lt;/BIG&gt;&lt;/SMALL&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo ifconfig &lt;EM&gt;&lt;SMALL&gt;&lt;BIG&gt;&amp;lt;yourIfaceName&amp;gt; up ; &lt;/BIG&gt;&lt;/SMALL&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp; maybe it is wise to deactivate the NetworkManager: &lt;EM&gt;sudo service network-manager stop&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt; move the&amp;nbsp; attached&amp;nbsp; file &lt;EM&gt;"racoon.conf.aes&lt;/EM&gt;"&amp;nbsp; in the&amp;nbsp; &lt;EM&gt;/etc/racoon/ &lt;/EM&gt;directory&lt;EM&gt; &lt;/EM&gt; of the&amp;nbsp; VPN-Server&lt;/LI&gt;&lt;LI&gt; add 2 lines&amp;nbsp; in the &lt;EM&gt;/etc/racoon/psk.txt&lt;/EM&gt; file&amp;nbsp; of the VPN -Server as follow&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;grs.garderos.com&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; garderos&lt;BR /&gt; 192.168.3.1&amp;nbsp;&amp;nbsp;&amp;nbsp; garderos&lt;/EM&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; start racoon in foreground with the following commands &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sudo su - ; &lt;EM&gt;setkey -PF ; sleep 2 ; racoon -ddddFf /etc/racoon/racoon.conf.aes&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt; Policies don't need to be configured there, they are automatically generated by racoon when the VPN-client connects&lt;/P&gt;&lt;P&gt; Now you are done.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You can start to ping from client and check the packets coming in the VPN-gateway with tcpdump: &lt;EM&gt;tcpdump -an -i any&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 13:30:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469180#M74143</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-06-10T13:30:13Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469181#M74144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for all the information. I burned an SD card with .sd image however I couldnt boot it on the baord. I burned it with following commands.&lt;/P&gt;&lt;P&gt;sudo dd if=&amp;lt;&amp;gt;.sd of=/dev/sdX bs=512 &amp;amp;&amp;amp; sync&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2016 22:33:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469181#M74144</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-13T22:33:19Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469182#M74145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I was able to reproduce the problem finally with all the inputs provided and I see that there might be few patches that might need to apply to make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please apply the attached patches and let me know if that fixes the issue at your side too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also attached the logs for external client, mx6q encrypting packets and vpn server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Utkarsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jun 2016 21:47:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469182#M74145</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-06-28T21:47:40Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469183#M74146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;I will the patches and I give you feedback as soon as I can. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 07:30:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469183#M74146</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-06-29T07:30:11Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469184#M74147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried these patches, at least those which were not in the 4.1.15 nxp branch already.&lt;/P&gt;&lt;P&gt;as a result , I get following kernel Oops when configuring aes in ipsec phase 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Internal error: Oops: 805 [#1] ARM&lt;BR /&gt; Modules linked in: xfrm6_mode_tunnel xfrm4_mode_tunnel xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 ipv6 ath9k_htc(O)b&lt;BR /&gt; CPU: 0 PID: 0 Comm: swapper Tainted: G O 4.1.27 #3&lt;BR /&gt; Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)&lt;BR /&gt; task: 8064fe38 ti: 80648000 task.ti: 80648000&lt;BR /&gt; PC is at v7_dma_clean_range+0x1c/0x34&lt;BR /&gt; LR is at dma_cache_maint_page+0xb4/0x160&lt;BR /&gt; pc : [&amp;lt;800184c4&amp;gt;] lr : [&amp;lt;800148e0&amp;gt;] psr: 00000113&lt;BR /&gt; sp : 80649ba0 ip : 80018510 fp : 8064a04c&lt;BR /&gt; r10: 8fb77000 r9 : 00000414 r8 : 00000000&lt;BR /&gt; r7 : 00000001 r6 : 00000000 r5 : 00000000 r4 : 00000000&lt;BR /&gt; r3 : 0000001f r2 : 00000020 r1 : 70000000 r0 : 70000000&lt;BR /&gt; Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel&lt;BR /&gt; Control: 10c53c7d Table: 18f44059 DAC: 00000015&lt;BR /&gt; Process swapper (pid: 0, stack limit = 0x80648208)&lt;BR /&gt; Stack: (0x80649ba0 to 0x8064a000)&lt;BR /&gt; 9ba0: 00000001 8fdb7000 00000000 88b9f940 8cf36810 00000000 8d249800 00000000&lt;BR /&gt; 9bc0: 8d244b80 800154f8 80018510 8cf36810 800154ac 8037b9f8 00000001 00000000&lt;BR /&gt; 9be0: 00000003 00000000 18d8627e 00000001 00000000 00000000 00000010 00000000&lt;BR /&gt; 9c00: 88b9f980 88b9f9d0 88b9f940 8d244700 88b9f940 88d8627e 88b9f9d0 88b9f900&lt;BR /&gt; 9c20: 88b9f9c0 8d53a800 00000036 7f2379e4 80649cd4 8cf1c380 8fda03b8 00000004&lt;BR /&gt; 9c40: 00000060 88b9f900 0000000c 00000000 88b9f900 00000001 00000008 00000000&lt;BR /&gt; 9c60: 80451c00 8d244700 8d244700 00000054 00000000 8d244700 8d53a800 00000001&lt;BR /&gt; 9c80: 00000000 000005dc 8064aec8 8045a42c 80649cdc 803e05c0 8cd19380 8064b5ec&lt;BR /&gt; 9ca0: 8d4ac800 8d244700 80649cdc 8d244700 80649cbc 8d244700 00000000 00000000&lt;BR /&gt; 9cc0: 00000000 8d244700 8d2447b4 8044fb08 00000000 8044fcec 8064aec8 00000004&lt;BR /&gt; 9ce0: 80000000 8064b502 00000000 890f6000 00000000 8044fad4 80649d04 00000001&lt;BR /&gt; 9d00: 00000000 803fcaa0 88b9f800 88d8628e 88b9f800 88d8628e 00000000 803fceb4&lt;BR /&gt; 9d20: 00000000 00000002 80000000 0381a802 8d4ac800 890f6000 00000000 803fca20&lt;BR /&gt; 9d40: 88d86240 88d8628e 88d86240 00000000 00000000 8d244700 8d4ac800 803fae5c&lt;BR /&gt; 9d60: 8d4ac800 8064b5cc 0000004e 88d86240 00000000 00000000 8d244700 803fb708&lt;BR /&gt; 9d80: 00000050 00000000 80000000 00000002 8d4ac800 00000000 00000000 803fad3c&lt;BR /&gt; 9da0: 80000000 8d244700 8064ebd4 8d4ac800 8d4ac848 00000008 8d4ac85c 803b182c&lt;BR /&gt; 9dc0: 8064ebcc 00000000 0000000e 00000000 8d4ac800 8d244700 00000002 8d4ac85c&lt;BR /&gt; 9de0: 00000066 8d244700 00000003 00000000 8d244700 9099e0e0 00000001 00000000&lt;BR /&gt; 9e00: 8d4ac800 803b4528 00000001 00000000 8d244700 803b502c 00000002 00000000&lt;BR /&gt; 9e20: 9099e0e0 802fa870 ffffffe0 00000001 061c1380 00000040 00000010 8d4ac830&lt;BR /&gt; 9e40: 8cd62000 02000022 0000001c 00000000 00000002 00000000 00000001 00000000&lt;BR /&gt; 9e60: 00000000 00000000 8d4accb8 00000040 8d4acc60 8d4acd30 40002710 00004c4b&lt;BR /&gt; 9e80: 00989680 8d4acd30 00000001 00000040 0000012c 80683240 ffff9822 80649eb0&lt;BR /&gt; 9ea0: 80649eb8 803b4c5c 80649ed8 80656290 80649eb0 80649eb0 80649eb8 80649eb8&lt;BR /&gt; 9ec0: 00000000 00000000 80684c8c 80684c80 80684c80 80655da0 00000100 00000003&lt;BR /&gt; 9ee0: 00000003 8002bf70 00000000 8c14e400 80652090 0000000a ffff9821 00200000&lt;BR /&gt; 9f00: 412fc09a 8065d800 00000000 00000000 00000096 8c006000 412fc09a 90802100&lt;BR /&gt; 9f20: 00000000 8002c324 8065d800 80050d98 9080210c 00000096 00000086 8064a350&lt;BR /&gt; 9f40: 80649f68 80009324 8000fbdc 8000fbe0 60000013 ffffffff 80649f9c 00000001&lt;BR /&gt; 9f60: 8fffc280 800120c0 00000007 806569c0 80649fb8 800189c0 8064a0a0 8064a0a0&lt;BR /&gt; 9f80: 8068337b 8068337b 00000001 412fc09a 8fffc280 00000000 000af9f4 80649fb0&lt;BR /&gt; 9fa0: 8000fbdc 8000fbe0 60000013 ffffffff 00000000 8004ab04 806834c0 80611bf0&lt;BR /&gt; 9fc0: ffffffff ffffffff 80611670 00000000 00000000 806414f0 00000000 80683694&lt;BR /&gt; 9fe0: 8064a050 806414ec 80650f48 10004059 00000000 10008078 00000000 00000000&lt;BR /&gt; [&amp;lt;800184c4&amp;gt;] (v7_dma_clean_range) from [&amp;lt;800148e0&amp;gt;] (dma_cache_maint_page+0xb4/0x160)&lt;BR /&gt; [&amp;lt;800148e0&amp;gt;] (dma_cache_maint_page) from [&amp;lt;800154f8&amp;gt;] (arm_dma_sync_single_for_device+0x4c/0x60)&lt;BR /&gt; [&amp;lt;800154f8&amp;gt;] (arm_dma_sync_single_for_device) from [&amp;lt;8037b9f8&amp;gt;] (aead_givencrypt+0x508/0xb10)&lt;BR /&gt; [&amp;lt;8037b9f8&amp;gt;] (aead_givencrypt) from [&amp;lt;7f2379e4&amp;gt;] (esp_output+0x348/0x4d8 [esp4])&lt;BR /&gt; [&amp;lt;7f2379e4&amp;gt;] (esp_output [esp4]) from [&amp;lt;8045a42c&amp;gt;] (xfrm_output_resume+0x15c/0x3cc)&lt;BR /&gt; [&amp;lt;8045a42c&amp;gt;] (xfrm_output_resume) from [&amp;lt;8044fb08&amp;gt;] (__xfrm4_output+0x34/0x38)&lt;BR /&gt; [&amp;lt;8044fb08&amp;gt;] (__xfrm4_output) from [&amp;lt;8044fcec&amp;gt;] (xfrm4_output+0x8c/0x9c)&lt;BR /&gt; [&amp;lt;8044fcec&amp;gt;] (xfrm4_output) from [&amp;lt;803fcaa0&amp;gt;] (ip_forward_finish+0x80/0x9c)&lt;BR /&gt; [&amp;lt;803fcaa0&amp;gt;] (ip_forward_finish) from [&amp;lt;803fceb4&amp;gt;] (ip_forward+0x3f8/0x484)&lt;BR /&gt; [&amp;lt;803fceb4&amp;gt;] (ip_forward) from [&amp;lt;803fae5c&amp;gt;] (ip_rcv_finish+0x120/0x2f4)&lt;BR /&gt; [&amp;lt;803fae5c&amp;gt;] (ip_rcv_finish) from [&amp;lt;803fb708&amp;gt;] (ip_rcv+0x2a4/0x3cc)&lt;BR /&gt; [&amp;lt;803fb708&amp;gt;] (ip_rcv) from [&amp;lt;803b182c&amp;gt;] (__netif_receive_skb_core+0x5b0/0x998)&lt;BR /&gt; [&amp;lt;803b182c&amp;gt;] (__netif_receive_skb_core) from [&amp;lt;803b4528&amp;gt;] (netif_receive_skb_internal+0x24/0x60)&lt;BR /&gt; [&amp;lt;803b4528&amp;gt;] (netif_receive_skb_internal) from [&amp;lt;803b502c&amp;gt;] (napi_gro_receive+0x78/0xa4)&lt;BR /&gt; [&amp;lt;803b502c&amp;gt;] (napi_gro_receive) from [&amp;lt;802fa870&amp;gt;] (fec_enet_rx_napi+0x424/0xc78)&lt;BR /&gt; [&amp;lt;802fa870&amp;gt;] (fec_enet_rx_napi) from [&amp;lt;803b4c5c&amp;gt;] (net_rx_action+0xe4/0x2a4)&lt;BR /&gt; [&amp;lt;803b4c5c&amp;gt;] (net_rx_action) from [&amp;lt;8002bf70&amp;gt;] (__do_softirq+0xd8/0x228)&lt;BR /&gt; [&amp;lt;8002bf70&amp;gt;] (__do_softirq) from [&amp;lt;8002c324&amp;gt;] (irq_exit+0xa8/0xf4)&lt;BR /&gt; [&amp;lt;8002c324&amp;gt;] (irq_exit) from [&amp;lt;80050d98&amp;gt;] (__handle_domain_irq+0x50/0xa0)&lt;BR /&gt; [&amp;lt;80050d98&amp;gt;] (__handle_domain_irq) from [&amp;lt;80009324&amp;gt;] (gic_handle_irq+0x20/0x58)&lt;BR /&gt; [&amp;lt;80009324&amp;gt;] (gic_handle_irq) from [&amp;lt;800120c0&amp;gt;] (__irq_svc+0x40/0x54)&lt;BR /&gt; Exception stack(0x80649f68 to 0x80649fb0)&lt;BR /&gt; 9f60: 00000007 806569c0 80649fb8 800189c0 8064a0a0 8064a0a0&lt;BR /&gt; 9f80: 8068337b 8068337b 00000001 412fc09a 8fffc280 00000000 000af9f4 80649fb0&lt;BR /&gt; 9fa0: 8000fbdc 8000fbe0 60000013 ffffffff&lt;BR /&gt; [&amp;lt;800120c0&amp;gt;] (__irq_svc) from [&amp;lt;8000fbe0&amp;gt;] (arch_cpu_idle+0x30/0x3c)&lt;BR /&gt; [&amp;lt;8000fbe0&amp;gt;] (arch_cpu_idle) from [&amp;lt;8004ab04&amp;gt;] (cpu_startup_entry+0xe4/0x13c)&lt;BR /&gt; [&amp;lt;8004ab04&amp;gt;] (cpu_startup_entry) from [&amp;lt;80611bf0&amp;gt;] (start_kernel+0x340/0x3ac)&lt;BR /&gt; Code: e3a02004 e1a02312 e2423001 e1c00003 (ee070f3a) &lt;BR /&gt; ---[ end trace 839f0387a8e09c55 ]---&lt;BR /&gt; Kernel panic - not syncing: Fatal exception in interrupt&lt;BR /&gt; ---[ end Kernel panic - not syncing: Fatal exception in interrupt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 10:35:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469184#M74147</guid>
      <dc:creator>h_eznt</dc:creator>
      <dc:date>2016-08-01T10:35:41Z</dc:date>
    </item>
    <item>
      <title>Re:  Encryption of IPSEC ESP-packets coming from eth0 fails with CAAM when using AES</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469185#M74148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you made any other changes apart from the patches to the kernel? Is this reproducible directly after applying the patches on 4.1.15 release on 6Q board?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 23:29:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Encryption-of-IPSEC-ESP-packets-coming-from-eth0-fails-with-CAAM/m-p/469185#M74148</guid>
      <dc:creator>utkarsh_gupta</dc:creator>
      <dc:date>2016-08-11T23:29:13Z</dc:date>
    </item>
  </channel>
</rss>

