<font class="Apple-style-span" face="arial, helvetica, sans-serif">Hi All</font><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">First let me thank Paul. Only because of prompt responses to all my queries I was able to achieve my milestone of run Openswan (2.6.33) on my ARM Soc running linux 2..6.37 (netkey).</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">When I started IPsec porting I have little idea about scope of this activity and I must say its been a steep learning curve. In my next hurdle I am trying to test support of H/W accelerators for IPsec processing. For that I got drivers for accelerators supported on my SoC from my vendor. I just enabled the support of OCF (suggested by my vendor). Everything got compiled without any issues. But when I started IPsec (tunnels got created ) and pinged I got kernel panic. Log is attached below. I tried to Google material that connect all the dots (OCF/ IPsec crypto library requirements/ H/W accelerators/ Linux kernel) but I was not very successful. Finally I decided to use my trusted source: Openswan mailing list. So here I am! </font></div>
<div><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; ">After going through mailing lists and google reading I came up I with following queries: </span></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">1. Whats best way to go solving problem of add H/W accelerator support for Openswan? No much on Goggling on this.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">2. Should I use OCF or CryptoAPI? From what I read Linux native crypto api do not support H/W accelerators. Do I really need any of these? Whats NSS good for? I know last question is naive!</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">3. Is NETKEY compatible with OCF? If Yes, do I need to recompile my openswan with OCF support? If no as<a href="https://bugs.xelerance.com/projects/openswan/wiki/_Hardware_Crypto_Acceleration_"> this</a> link says, what my best next option? KLIPs?</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">4. Should openswan (2.6.33) + linux kernel 2.6.37 (netwkey and OCF support enabled) | H/W drivers from vendors combo work ? Anything missing or any mismatch for H?W accelerator support.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">5. What Flags/compiler option/ libraries I MAY need to enable to make things work fine. </font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Apologies for long post. I understand these are far too many queries of a single post buut I hardly have any better options. Appreciate your patience </font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">If anyone have any suggestion regarding this please do share.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">-SP</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">++++++++++++++++++++++++++++++++++++++++++++++++++</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Crash/panic log:</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">+++++++++++++++++++++++++++++++++++++++++++++++++++</font></div>
<div><br></div><div><br></div><div><div>root@R3BTS-CP-PFS1.0# ping 192.168.11.45</div><div>PING 192.168.11.Unable to handle kernel paging request at virtual address 70207000</div><div>45 (192.168.11.4pgd = ef8e4000</div><div>
5): 56 data byte[70207000] *pgd=00000000s</div><div><br></div><div>Internal error: Oops: 805 [#1]</div><div>last sysfs file: /sys/devices/virtual/dmb_gpio/dmb_gpio1/dev</div><div>Modules linked in:</div><div>CPU: 0 Not tainted (2.6.37-svn3005 #11)</div>
<div>PC is at v7_dma_clean_range+0x1c/0x34</div><div>LR is at dma_cache_maint_page+0x34/0x3c</div><div>pc : [<c00446cc>] lr : [<c0041854>] psr: 00000113</div><div>sp : ee8ffea0 ip : c0444000 fp : ee8ffeac</div>
<div>r10: 00000001 r9 : efa480d8 r8 : 00000000</div><div>r7 : 00000000 r6 : 00000001 r5 : efa480d8 r4 : efa480e8</div><div>r3 : 0000003f r2 : 00000040 r1 : 70207000 r0 : 70207000</div><div>Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user</div>
<div>Control: 10c5387d Table: af8e4019 DAC: 00000015</div><div>Process ping (pid: 657, stack limit = 0xee8fe2e8)</div><div>Stack: (0xee8ffea0 to 0xee900000)</div><div>fea0: ee8ffec4 ee8ffeb0 c004187c c004182c c0044718 efa48080 ee8ffef4 ee8ffec8</div>
<div>fec0: c0041b34 c0041868 00000001 00000000 efa4818c eea8cc80 efa4814c 00000006</div><div>fee0: 00000009 c042fcc0 ee8fff14 ee8ffef8 c0223788 c0041aec efa4818c eea8cc80</div><div>ff00: 00000001 efa4814c ee8fff34 ee8fff18 c0223fe0 c02236dc 00000000 00000100</div>
<div>ff20: 00000018 00000001 ee8fff4c ee8fff38 c005ee58 c0223f24 ee8fe000 00000100</div><div>ff40: ee8fff84 ee8fff50 c005f44c c005edf4 ee8fff6c ee8fff60 c00489dc 00000074</div><div>ff60: 00000000 0000000e 0002e9ec 00000000 ee8fe000 001ecc60 ee8fff94 ee8fff88</div>
<div>ff80: c005f51c c005f3d8 ee8fffac ee8fff98 c0031080 c005f4e0 ffffffff fa200000</div><div>ffa0: 00000000 ee8fffb0 c02f27bc c003100c 0000000e 0002e9ec 00000000 00000000</div><div>ffc0: 00000040 00000001 0000000e 0002e9ec 00000000 bec6ce64 001ecc60 bec6ce64</div>
<div>ffe0: 0002e9ec bec6ca40 0002e914 000ed420 80000010 ffffffff 92e25cdc 09e80cd2</div><div>Backtrace: </div><div>[<c0041820>] (dma_cache_maint_page+0x0/0x3c) from [<c004187c>] (___dma_page_cpu_to_dev+0x20/0x2c)</div>
<div>[<c004185c>] (___dma_page_cpu_to_dev+0x0/0x2c) from [<c0041b34>] (dma_map_sg+0x54/0xf4)</div><div>[<c0041ae0>] (dma_map_sg+0x0/0xf4) from [<c0223788>] (nss_sham_update_cdma_start+0xb8/0x120)</div>
<div>[<c02236d0>] (nss_sham_update_cdma_start+0x0/0x120) from [<c0223fe0>] (nss_sham_done_task+0xc8/0x108)</div><div> r7:efa4814c r6:00000001 r5:eea8cc80 r4:efa4818c</div><div>[<c0223f18>] (nss_sham_done_task+0x0/0x108) from [<c005ee58>] (tasklet_action+0x70/0xc0)</div>
<div> r7:00000001 r6:00000018 r5:00000100 r4:00000000</div><div>[<c005ede8>] (tasklet_action+0x0/0xc0) from [<c005f44c>] (__do_softirq+0x80/0x108)</div><div> r5:00000100 r4:ee8fe000</div><div>[<c005f3cc>] (__do_softirq+0x0/0x108) from [<c005f51c>] (irq_exit+0x48/0x94)</div>
<div>[<c005f4d4>] (irq_exit+0x0/0x94) from [<c0031080>] (asm_do_IRQ+0x80/0xa0)</div><div>[<c0031000>] (asm_do_IRQ+0x0/0xa0) from [<c02f27bc>] (__irq_usr+0x3c/0xa0)</div><div>Exception stack(0xee8fffb0 to 0xee8ffff8)</div>
<div>ffa0: 0000000e 0002e9ec 00000000 00000000</div><div>ffc0: 00000040 00000001 0000000e 0002e9ec 00000000 bec6ce64 001ecc60 bec6ce64</div><div>ffe0: 0002e9ec bec6ca40 0002e914 000ed420 80000010 ffffffff</div>
<div> r5:fa200000 r4:ffffffff</div><div>Code: e3a02004 e1a02312 e2423001 e1c00003 (ee070f3a) </div><div>---[ end trace 70e1f34cfd579ce9 ]---</div><div>Kernel panic - not syncing: Fatal exception in interrupt</div><div>Backtrace: </div>
<div>[<c003fb44>] (dump_backtrace+0x0/0x110) from [<c02f0564>] (dump_stack+0x18/0x1c)</div><div> r7:c00446d0 r6:ee8ffce7 r5:c00446ce r4:c040f390</div><div>[<c02f054c>] (dump_stack+0x0/0x1c) from [<c02f05c8>] (panic+0x60/0x17c)</div>
<div>[<c02f0568>] (panic+0x0/0x17c) from [<c003fed8>] (die+0x284/0x2d8)</div><div> r3:00000100 r2:c0420b42 r1:00000000 r0:c038591e</div><div>[<c003fc54>] (die+0x0/0x2d8) from [<c0042384>] (__do_kernel_fault+0x6c/0x8c)</div>
<div>[<c0042318>] (__do_kernel_fault+0x0/0x8c) from [<c02f4594>] (do_page_fault+0x1f0/0x20c)</div><div> r9:00000805 r8:70207000 r7:ee946180 r6:e57178c0 r5:ee8ffe58</div><div>r4:c03e4518</div><div>[<c02f43a4>] (do_page_fault+0x0/0x20c) from [<c02f45d4>] (do_translation_fault+0x24/0xa8)</div>
<div>[<c02f45b0>] (do_translation_fault+0x0/0xa8) from [<c00312a4>] (do_DataAbort+0x3c/0x9c)</div><div> r7:ee8ffe58 r6:00000805 r5:c03e4568 r4:c03e4518</div><div>[<c0031268>] (do_DataAbort+0x0/0x9c) from [<c02f256c>] (__dabt_svc+0x4c/0x60)</div>
<div>Exception stack(0xee8ffe58 to 0xee8ffea0)</div><div>fe40: 70207000 70207000</div><div>fe60: 00000040 0000003f efa480e8 efa480d8 00000001 00000000 00000000 efa480d8</div>
<div>fe80: 00000001 ee8ffeac c0444000 ee8ffea0 c0041854 c00446cc 00000113 ffffffff</div><div> r8:00000000 r7:00000000 r6:00000001 r5:ee8ffe8c r4:ffffffff</div><div>[<c0041820>] (dma_cache_maint_page+0x0/0x3c) from [<c004187c>] (___dma_page_cpu_to_dev+0x20/0x2c)</div>
<div>[<c004185c>] (___dma_page_cpu_to_dev+0x0/0x2c) from [<c0041b34>] (dma_map_sg+0x54/0xf4)</div><div>[<c0041ae0>] (dma_map_sg+0x0/0xf4) from [<c0223788>] (nss_sham_update_cdma_start+0xb8/0x120)</div>
<div>[<c02236d0>] (nss_sham_update_cdma_start+0x0/0x120) from [<c0223fe0>] (nss_sham_done_task+0xc8/0x108)</div><div> r7:efa4814c r6:00000001 r5:eea8cc80 r4:efa4818c</div><div>[<c0223f18>] (nss_sham_done_task+0x0/0x108) from [<c005ee58>] (tasklet_action+0x70/0xc0)</div>
<div> r7:00000001 r6:00000018 r5:00000100 r4:00000000</div><div>[<c005ede8>] (tasklet_action+0x0/0xc0) from [<c005f44c>] (__do_softirq+0x80/0x108)</div><div> r5:00000100 r4:ee8fe000</div><div>[<c005f3cc>] (__do_softirq+0x0/0x108) from [<c005f51c>] (irq_exit+0x48/0x94)</div>
<div>[<c005f4d4>] (irq_exit+0x0/0x94) from [<c0031080>] (asm_do_IRQ+0x80/0xa0)</div><div>[<c0031000>] (asm_do_IRQ+0x0/0xa0) from [<c02f27bc>] (__irq_usr+0x3c/0xa0)</div><div>Exception stack(0xee8fffb0 to 0xee8ffff8)</div>
<div>ffa0: 0000000e 0002e9ec 00000000 00000000</div><div>ffc0: 00000040 00000001 0000000e 0002e9ec 00000000 bec6ce64 001ecc60 bec6ce64</div><div>ffe0: 0002e9ec bec6ca40 0002e914 000ed420 80000010 ffffffff</div>
<div> r5:fa200000 r4:ffffffff</div></div><div><br></div><div><br></div><div><br></div>