<html 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)">
<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:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hello Maria,<br>
<br>
Some hardware platforms require specifying a maximum number of next-hops (NH) in the ECMP group due to resource limitations, while other platforms don’t care about that.<br>
<br>
By default, bird limit merge path to 16 NH. We increased this limit to 32, and it has been sufficient for a while. However, we’re now approaching 64 NH or potentially more.<br>
<br>
While the current limit is acceptable, a router in the fabric with 64 downlink interfaces (64 NH) plus additional uplink interfaces could encounter a scenario where it receives a north-south route (64+X NH). In such cases, Bird skips excess NHs based on its
 internal sorting mechanism, unpredictably dropping either uplink or downlink NHs. Although this scenario could result from either misconfiguration or intentional configuration, it remains a realistic situation.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ideally would be to have on/off for this log if someone is ok with less NH in the kernel than it is in the bird
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">Thanks,<br>
Marcin<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Maria Matejka <maria.matejka@nic.cz><br>
<b>Date: </b>Friday, March 7, 2025 at 3:26</span><span style="font-family:"Arial",sans-serif;color:black"> </span><span style="color:black">PM<br>
<b>To: </b>Saklak, Marcin <msaklak@akamai.com>, Saklak, Marcin via Bird-users <bird-users@network.cz>, bird-users@network.cz <bird-users@network.cz><br>
<b>Subject: </b>Re: Add exceed merge path on limit<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">Hello Marcin, this looks interesting, would you please elaborate on the intended usecase? Is that something like "the hardware goes crazy with too many next hops"?
 I'm wondering whether this is a direct intended use, or some crazy workaround<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">ZjQcmQRYFpfptBannerStart<o:p></o:p></span></p>
</div>
<div style="border:none;border-top:solid #90A4AE 3.0pt;padding:0in 0in 0in 0in;display:block!important;text-align:left!important;margin:0px!important;padding:16px!important;border-radius:4px!important;min-width:200px!important;background-color:#D0D8DC!important;border-top:#90a4ae!important" id="pfptBanner1h32q5h">
<div id="pfptBanner1h32q5h">
<div id="pfptBanner1h32q5h">
<p class="MsoNormal" style="line-height:13.5pt;background:#D0D8DC"><b><span lang="EN" style="font-family:"Arial",sans-serif;color:black">This Message Is From an External Sender
<o:p></o:p></span></b></p>
</div>
<div id="pfptBanner1h32q5h">
<p class="MsoNormal" style="line-height:13.5pt;background:#D0D8DC"><span lang="EN" style="font-family:"Arial",sans-serif;color:black">This message came from outside your organization.
<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="background:#D0D8DC"><span lang="EN" style="color:black"> </span><span lang="EN"><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">ZjQcmQRYFpfptBannerEnd<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Hello Marcin,<br>
<br>
this looks interesting, would you please elaborate on the intended usecase? Is that something like "the hardware goes crazy with too many next hops"?<br>
<br>
I'm wondering whether this is a direct intended use, or some crazy workaround which could be done completely differently if BIRD had the right tooling for your use case.<br>
<br>
Thanks,<br>
Maria<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On March 7, 2025 2:53:37 PM GMT+01:00, "Saklak, Marcin via Bird-users" <bird-users@network.cz> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Hi All,<br>
I’m wondering if it’s possible to add a log entry whenever the merged path limit is exceeded.
<br>
For example, a route can have 64 next hops, but BIRD export to the kernel up to merge limit and skip rest of next hops.<br>
I’d like to be able to detect when this happens.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Below is a potential solution for that:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><br>
</span><span style="font-size:10.0pt;font-family:"Courier New"">---</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">nest/rt-attr.c | 2 ++</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">1 file changed, 2 insertions(+)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">diff --git a/nest/rt-attr.c b/nest/rt-attr.c</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">index c8ef8e08..ef118cb0 100644</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">--- a/nest/rt-attr.c</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">+++ b/nest/rt-attr.c</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">@@ -323,6 +323,8 @@ nexthop_merge(struct nexthop *x, struct nexthop *y, int rx, int ry, int max, lin</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">     n = &((*n)->next);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">   }</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">   *n = NULL;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">+  if (max == -1)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">+    log(L_ERR "Exceeded merge paths on limit!");</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">   return root;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">}</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">--</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">2.34.1</span><span style="font-size:11.0pt"><br>
<br>
</span>If you have any suggestions or a better approach, please let me know!<br>
<br>
Best regards,<br>
Marcin Sakłak<o:p></o:p></p>
</div>
</blockquote>
</div>
<div>
<div>
<p class="MsoNormal">-- <br>
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>