<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div></div><span><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">Hi,</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">Under high load, the<span style="mso-spacerun: yes;"> 
</span>check_and_put_init_hash() function returns ALREADY_DONE ( for some of
the IKE_SA_INIT new requests ) at IKE responder end. In such case, <span style="mso-spacerun: yes;"> </span>if I create the new IKE_SA in checkout_by_message
() function, it works fine. <span style="mso-spacerun: yes;"> </span>I mean , all
the 250k security associations are getting established with 1000 TPS. <span style="mso-spacerun: yes;"> </span>Can anyone please verify the below stated changes
and suggest if it will lead to other problems? Thanks in advance for your help
and support. <span style="mso-spacerun: yes;"> </span></font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"> </font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*,</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 1;">                </span>private_ike_sa_manager_t*
this, message_t *message)</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">{</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt; text-indent: 0.5in;"><font face="Calibri">---------------------------;</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 1;">                </span>---------------------------;</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"> </font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">switch (check_and_put_init_hash(this, hash, &our_spi))</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 2;">                                </span>{</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 2;">                                </span>---------------------------;</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 2;">                                </span>---------------------------;</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"> </font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 3;">                                                </span>case
NOT_FOUND:</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt 1in; text-indent: 0.5in;"><font face="Calibri">case
ALREADY_DONE:</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 3;">                                                </span>{<span style="mso-tab-count: 1;">              </span><span style="mso-tab-count: 2;">                                </span></font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt 2in; text-indent: 0.5in;"><font face="Calibri">---------------------------;</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 3;">                                                </span><span style="mso-tab-count: 2;">                                </span>---------------------------;</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 5;">                                                                                </span>ike_sa
= ike_sa_create(id, FALSE, ike_version);</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"><span style="mso-tab-count: 1;">                </span><span style="mso-tab-count: 2;">                                </span>}</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt 1in; text-indent: 0.5in;"><font face="Calibri">//case
ALREADY_DONE:</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri"> </font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">}</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">Regards,</font></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><font face="Calibri">Chinmaya</font></div><div><font face="Times New Roman">

</font></div></span><div></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Monday, June 2, 2014 1:09 PM, Chinmaya Dwibedy <ckdwibedy@yahoo.com> wrote:<br> </font> </div>  <br><br> <div><div id="yiv4980557939"><div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><span><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Hi Martin/All,</font></span></span></div><div style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 16px; font-style: normal; background-color:
 transparent;"><span><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri"><br clear="none"></font></span></span></div><div style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 16px; font-style: normal; background-color: transparent;"><span><span style="line-height: 115%; font-size: 12pt;">I think, my email missed your kind attention.  Thus I request your goodness to have a look into this and respond. Your help in this regard will be highly appreciated.</span></span></div><div style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt; font-style: normal; background-color: transparent;"><span><span style="line-height: 115%; font-size: 12pt;"><br clear="none"></span></span></div><div style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 12pt; font-style: normal; background-color: transparent;"><span><span style="line-height: 115%; font-size: 12pt;">Regards,</span></span></div><div style="color: rgb(0, 0, 0);
 font-family: Calibri; font-size: 12pt; font-style: normal; background-color: transparent;"><span><span style="line-height: 115%; font-size: 12pt;">Chinmaya </span></span></div> <div><br clear="none"><br clear="none"></div><div id="yiv4980557939yqt67807"><div style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Thursday, May 29, 2014 6:39 PM,
 Chinmaya Dwibedy <ckdwibedy@yahoo.com> wrote:<br clear="none"> </font> </div>  <br clear="none"><br clear="none"> <div><div id="yiv4980557939"><div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><span><br clear="none"></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><br clear="none"></div><span></span><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Hi Martin,</font></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Can you
please have a look into the below stated and let me know if it a bug with
strongswan-5.0.4 in high load?</font></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">The
IKE_SA-Manager is responsible for managing all initiated and responded
IKE_SA's. Under high load (i.e. 900-1000 TPS and 250k IPsec tunnels), the IKE
Responder end does not respond to all the IKE_SA_INIT request messages received
from IKE Initiator. <span> </span>During debugging I found
that, <span> </span><span> </span>at IKE responder end, <span> </span><span> </span>the call
to checkout_by_message () does return the IKE_SA for some of IKE_SA_INIT request
messages (not retransmission message). Surprisingly the check_and_put_init_hash()
function returns ALREADY_DONE saying that, the message with the given hash has
been seen before. I think, if a responder receives an IKE_SA_INIT request, it determines
whether the packet is a retransmission belonging to an existing<span>  </span>half-open IKE_SA (in which case the responder
retransmits the same<span>  </span>response), or a new
request (in which case the responder creates a new IKE_SA and sends a fresh
response). But I find Charon daemon (IKE Responder) drops some of the new requests
and all the retransmitted packets. But with reduced setup rate (200+),
everything works as expected. </font></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri"> </font></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Regards,</font></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Chinmaya <span> </span><span> </span></font></span></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><font face="Times New Roman">

<br clear="none"></font></div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px; font-style: normal; background-color: transparent;"><br clear="none"></div> <div><br clear="none"><br clear="none"></div><div id="yiv4980557939yqt19626"><div style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Tuesday, May 27, 2014 7:42 PM, Chinmaya Dwibedy <ckdwibedy@yahoo.com> wrote:<br clear="none"> </font> </div>  <br clear="none"><br clear="none"> <div><div id="yiv4980557939"><div><div style="color: rgb(0, 0, 0); font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;
 background-color: rgb(255, 255, 255);"><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Hi,</font></span></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Using the
load tester plugin of strongswan (5.0.4), could able to achieve the 250k IPsec
tunnels with 1000 tunnels per second. However I found that, some of the tunnels
(approximately 10-20) were not getting up. Upon debugging found that, at IKE
responder end, the checkout_by_message() of ike_sa_manager_t does not return
pointer to ike_sa_t for some of the IKE_SA_INIT request messages (in execute()
routine of job). But if I reduce the setup rate to 200, all the tunnels come
up. Is it an bug with strongswan 5.0.4 in high load? Can anyone please suggest
what might be the issue? Thanks in advance for your support.</font></span></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri"> </font></span></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Regards,</font></span></div><div><font face="Times New Roman">

</font></div><div style="margin: 0in 0in 10pt;"><span style="line-height: 115%; font-size: 12pt;"><font face="Calibri">Chinmaya</font></span></div><div><font face="Times New Roman">

</font><br clear="none"></div></div></div></div><br clear="none"><br clear="none"></div>  </div> </div>  </div></div> </div></div></div><br clear="none"><br clear="none"></div>  </div> </div>  </div></div> </div></div></div><br><br></div>  </div> </div>  </div> </div></body></html>