<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Times;
        panose-1:0 0 5 0 0 0 0 2 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:148328098;
        mso-list-type:hybrid;
        mso-list-template-ids:-1873744964 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:1585263337;
        mso-list-type:hybrid;
        mso-list-template-ids:-410465938 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi BIRD team!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">We found a case when BMP code is trying to connect with BMP collector service with sk_open(), this causes increasing CPU utilization. To reproduce this case, you have just:<o:p></o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">Server machine where BMP PDU packets will be sent, should be reachable (so it can be pinged).<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">BMP collector service itself should not be running on this server.<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:11.0pt">Run BIRD with enabled BMP protocol.<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">After that you should observe that BIRD process has significantly increased CPU utilization. This is related somehow with “BIRD socket” because when I capture network traffic on host machine (where BIRD is
 running), I can see massive amount of TCP packets which are exchange between BIRD host machine and BMP collector machine. At the moment socket type related with BMP connection is SK_TCP_ACTIVE.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Do you have any idea what is going wrong or how BIRD socket should be properly use?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">As a temporary fix, I have provided patch allows to avoid this issue but it is very ugly hack because it frees BIRD socket outside of IO code (sk_free()) and initialize again socket again every time when ECONNREFUSED
 error is passing to err_hook callback.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I need also a tip if there is a way to get notification from BIRD socket if we lost connection with BMP collector service? One option is to check if sk_send() failed but what in situation when there are no
 updates to send by longer time and I would like to get a notification ASAP when I lost connection with BMP collector service. Is this possible with current BIRD implementation or I should to add some timer's callback which will check somehow if BMP collector
 service is alive? This mechanism is needed for me to synchronize/re-send all BMP data to the collector.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Currently we have switched to BMP code provided on bmp branch from gitlab BIRD repo.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Additionally I have a question referring to enclosed code. Can I free list node and node data itself when sk_send() returns value greater or equal to 0 (>= 0), like in the below code?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">  WALK_LIST_DELSAFE(tx_data, tx_data_next, p->tx_queue)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">  {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    rv = sk_send(p->sk, data_size);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    if (rv < 0) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">      return;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    mb_free(tx_data->data);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    rem_node((node *) tx_data);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    mb_free(tx_data);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    if (rv == 0) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">      return;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">    ...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Or I should to do that only if sk_send() return value greater than 0 (> 0) ? My goal is sending all data from list if there was only "temporary" problem with sk_send().<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="360" style="width:3.75in">
<tbody>
<tr>
<td style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt">----<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:11.0pt;display:none"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="360" style="width:3.75in">
<tbody>
<tr style="height:7.5pt">
<td colspan="3" valign="bottom" style="padding:0in 0in 4.5pt 0in;height:7.5pt">
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#0099CC">Pawel Maslanka</span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#0099CC"><br>
</span><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#666666">Senior Software Engineer</span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#0099CC"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="3" valign="bottom" style="padding:0in 0in 4.5pt 0in">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Times"><img width="242" height="45" style="width:2.5208in;height:.4687in" id="Picture_x0020_7" src="cid:image001.jpg@01D758DF.ABA7A140" alt="signature_1256476543"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" valign="top" style="border:none;border-bottom:solid #8F9194 1.0pt;padding:0in 0in 0in 0in">
</td>
<td style="padding:0in 0in 0in 0in"></td>
</tr>
<tr style="height:3.75pt">
<td valign="top" style="padding:4.5pt 0in 0in 0in;height:3.75pt">
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:#333333">Office:</span></b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:#333333"> +1.617.444.1234<br>
<b>Cell:</b> +1.617.444.1234</span><span style="font-size:11.0pt;font-family:Times"><o:p></o:p></span></p>
</td>
<td style="padding:4.5pt 0in 0in 0in;height:3.75pt">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:#333333">Akamai Technologies<br>
150 Broadway<br>
Cambridge, MA 02142</span><span style="font-size:11.0pt;font-family:Times"><o:p></o:p></span></p>
</td>
<td style="padding:0in 0in 0in 0in;height:3.75pt"></td>
</tr>
<tr style="height:5.25pt">
<td colspan="2" valign="top" style="background:white;padding:0in 0in 0in 0in;height:5.25pt">
</td>
<td style="padding:0in 0in 0in 0in;height:5.25pt"></td>
</tr>
<tr style="height:3.75pt">
<td width="148" style="width:111.0pt;padding:7.5pt 0in 0in 0in;height:3.75pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Arial",sans-serif;color:#666666">Connect with Us:<o:p></o:p></span></p>
</td>
<td width="222" style="width:166.5pt;padding:7.5pt 0in 0in .75pt;height:3.75pt">
<p class="MsoNormal"><a href="https://community.akamai.com/" target="_blank"><span style="font-size:11.0pt;font-family:Times;color:blue;text-decoration:none"><img border="0" width="23" height="23" style="width:.2395in;height:.2395in" id="Picture_x0020_6" src="cid:image002.jpg@01D758DF.ABA7A140" alt="signature_580743884"></span></a><span style="font-size:11.0pt;font-family:Times"> </span><a href="http://blogs.akamai.com/" target="_blank"><span style="font-size:11.0pt;font-family:Times;color:blue;text-decoration:none"><img border="0" width="23" height="23" style="width:.2395in;height:.2395in" id="Picture_x0020_5" src="cid:image003.png@01D758DF.ABA7A140" alt="signature_1866338322"></span></a><span style="font-size:11.0pt;font-family:Times"> </span><a href="https://twitter.com/akamai" target="_blank"><span style="font-size:11.0pt;font-family:Times;color:blue;text-decoration:none"><img border="0" width="23" height="23" style="width:.2395in;height:.2395in" id="Picture_x0020_4" src="cid:image004.png@01D758DF.ABA7A140" alt="signature_2113959087"></span></a><span style="font-size:11.0pt;font-family:Times"> </span><a href="http://www.facebook.com/AkamaiTechnologies" target="_blank"><span style="font-size:11.0pt;font-family:Times;color:blue;text-decoration:none"><img border="0" width="23" height="23" style="width:.2395in;height:.2395in" id="Picture_x0020_3" src="cid:image005.png@01D758DF.ABA7A140" alt="signature_447607273"></span></a><span style="font-size:11.0pt;font-family:Times"> </span><a href="http://www.linkedin.com/company/akamai-technologies" target="_blank"><span style="font-size:11.0pt;font-family:Times;color:blue;text-decoration:none"><img border="0" width="23" height="23" style="width:.2395in;height:.2395in" id="Picture_x0020_2" src="cid:image006.png@01D758DF.ABA7A140" alt="signature_1901210113"></span></a><span style="font-size:11.0pt;font-family:Times"> </span><a href="http://www.youtube.com/user/akamaitechnologies?feature=results_main" target="_blank"><span style="font-size:11.0pt;font-family:Times;color:blue;text-decoration:none"><img border="0" width="23" height="23" style="width:.2395in;height:.2395in" id="Picture_x0020_1" src="cid:image007.png@01D758DF.ABA7A140" alt="signature_1973184621"></span></a><span style="font-size:11.0pt;font-family:Times"><o:p></o:p></span></p>
</td>
<td style="padding:0in 0in 0in 0in;height:3.75pt"></td>
</tr>
<tr>
<td colspan="2" valign="top" style="padding:0in 0in 0in 0in"></td>
<td style="padding:0in 0in 0in 0in"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>