<div dir="ltr">Hi Donald,<div><br></div><div> Thanks for your response. I am giving you background on the issue:</div><div> We were initially using quagga 0.99.23 in our solution. Quagga 0.99.23 was not having FPM support so the FPM related changes were ported to Quagga 0.99.23.</div><div> Later there was a requirement for reverse FPM support in Quagga so there was additional patch added to quagga for reverse FPM support.</div><div>  Now there is a latest requirement where we wanted to have bfd support in quagga. The patch for bfd support was available in the older version of quagga. When I tried patching those change it was referring to some deprecated functions which were removed due to some memory leak.  I tried porting the changes to the new functions instead of those deprecated function but quagga was not working as expected so we did not pursue further on that path. </div><div><br></div><div>  The next option we had was to use FRR which already supports BFD. So as part of the latest approach  I compared the fpm and reverse fpm patch with the code present in FRR and could see most of the FPM logic was already present. I have added the reverse FPM patch and also some patch which was part of fpm but missing in the latest code as I was not sure on the significance of those changes. It is one of those FPM changes which is causing this compilation issue.</div><div><br></div><div>  If I do not have that change which is causing issue and if I have following line in zebra configuration then the configuration was not getting recognized. So I was concentrating on making this change work:</div><div><br></div><div><div>!</div><div>hostname cord-zebra</div><div>password cord</div><div>!</div><div>fpm connection ip <IP> port 2620</div><div>!</div><div>!</div><div>log file /var/log/zebra.log</div><div>!</div><div>end</div></div><div><br></div><div>The line fpm connection was reported as command not supported error message. Hence I was concentrating on fixing this issue.</div><div> Please find attached the patch which we are trying and please let me know what all issue you see in the patch.</div><div>The patch also has some code to dockerize frr which can be ignored for this issue. However if you see any issue in the Dockerfile script which has compilation instructions for frr then also please let us know on that.</div><div>We want zebra, bgpd, bfdd, fpm, and reverse fpm(added by us) for our solutions to work.</div><div><br></div><div>Thanks and Regards,</div><div>Mayank</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 15, 2018 at 10:04 AM, Donald Sharp <span dir="ltr"><<a href="mailto:sharpd@cumulusnetworks.com" target="_blank">sharpd@cumulusnetworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mayank -<br>
<br>
The FPM code is already in FRR, why are you trying to forward port the<br>
same code?<br>
<br>
donald<br>
<br>
On Tue, Aug 7, 2018 at 3:08 PM, Mayank Tiwari <<a href="mailto:mike.tiwari@gmail.com">mike.tiwari@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
><br>
><br>
>   We are using quagga in our solution for FPM connection and Reverse FPM<br>
> connection with ONOS. In order to support BFD feature I need to upgrade from<br>
> quagga to FRR. For that I was patching the changes present in quagga to FRR.<br>
> During that patching process the following patch is causing compilation<br>
> issue:<br>
><br>
><br>
><br>
> diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c<br>
><br>
> index 43d76a6..03c4a6b 100644<br>
><br>
> --- a/zebra/zebra_vty.c<br>
><br>
> +++ b/zebra/zebra_vty.c<br>
><br>
> @@ -20,6 +20,7 @@<br>
><br>
><br>
><br>
> #include <zebra.h><br>
><br>
><br>
><br>
> +#include "zebra_fpm.h"<br>
><br>
> #include "memory.h"<br>
><br>
> #include "zebra_memory.h"<br>
><br>
> #include "if.h"<br>
><br>
><br>
><br>
> +<br>
><br>
> +/* function to write the fpm config info */<br>
><br>
> +static int config_write_fpm (struct vty *vty)<br>
><br>
> +{<br>
><br>
> +  return fpm_remote_srv_write (vty);<br>
><br>
> +}<br>
><br>
> +<br>
><br>
> +/* Zebra node  */<br>
><br>
> +static struct cmd_node zebra_node =<br>
><br>
> +{<br>
><br>
> +  ZEBRA_NODE,<br>
><br>
> +  "",<br>
><br>
> +  1<br>
><br>
> +};<br>
><br>
><br>
><br>
> /* Route VTY.  */<br>
><br>
> void zebra_vty_init(void)<br>
><br>
> {<br>
><br>
>         /* Install configuration write function. */<br>
><br>
>         install_node(&table_node, config_write_table);<br>
><br>
>         install_node(&forwarding_node, config_write_forwarding);<br>
><br>
> +    install_node (&zebra_node, config_write_fpm);<br>
><br>
><br>
><br>
><br>
><br>
>         install_element(VIEW_NODE, &show_ip_forwarding_cmd);<br>
><br>
>         install_element(CONFIG_NODE, &ip_forwarding_cmd);<br>
><br>
><br>
><br>
><br>
><br>
> diff --git a/zebra/zebra_fpm.h b/zebra/zebra_fpm.h<br>
><br>
> new file mode 100644<br>
><br>
> index 0000000..9291ffa<br>
><br>
> --- /dev/null<br>
><br>
> +++ b/zebra/zebra_fpm.h<br>
><br>
> @@ -0,0 +1,35 @@<br>
><br>
> +/*<br>
><br>
> + * Router ID for zebra daemon.<br>
><br>
> + *<br>
><br>
> + * Copyright (C) 2004 James R. Leu<br>
><br>
> + *<br>
><br>
> + * This file is part of Quagga routing suite.<br>
><br>
> + *<br>
><br>
> + * Quagga is free software; you can redistribute it and/or modify it<br>
><br>
> + * under the terms of the GNU General Public License as published by the<br>
><br>
> + * Free Software Foundation; either version 2, or (at your option) any<br>
><br>
> + * later version.<br>
><br>
> + *<br>
><br>
> + * Quagga is distributed in the hope that it will be useful, but<br>
><br>
> + * WITHOUT ANY WARRANTY; without even the implied warranty of<br>
><br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
><br>
> + * General Public License for more details.<br>
><br>
> + *<br>
><br>
> + * You should have received a copy of the GNU General Public License along<br>
><br>
> + * with this program; see the file COPYING; if not, write to the Free<br>
> Software<br>
><br>
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA<br>
><br>
> + */<br>
><br>
> +<br>
><br>
> +#ifndef _ZEBRA_VTY_H_<br>
><br>
> +#define _ZEBRA_VTY_H_<br>
><br>
> +<br>
><br>
> +#include <zebra.h><br>
><br>
> +#include "memory.h"<br>
><br>
> +#include "prefix.h"<br>
><br>
> +#include "zclient.h"<br>
><br>
> +#include "if.h"<br>
><br>
> +<br>
><br>
> +<br>
><br>
> +static int fpm_remote_srv_write (struct vty *vty );<br>
><br>
> +<br>
><br>
> +#endif<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> The function 'fpm_remote_srv_write'  is already defined in zebra_fpm.c file<br>
> which I need to use zebra_vty.c file. I have created a header with name<br>
> zebra_fpm.h and declared that function there and later included this header<br>
> in zebra_vty.c. The compilation of zebra_vty.c fails as it is not able to<br>
> find  'fpm_remote_srv_write' function<br>
><br>
><br>
><br>
> This is the compilation error:<br>
><br>
><br>
><br>
>   CCLD     zebra/<a href="http://zebra_irdp.la" rel="noreferrer" target="_blank">zebra_irdp.la</a><br>
><br>
>   CC       zebra/zebra_fpm.lo<br>
><br>
>   CC       zebra/zebra_fpm_netlink.lo<br>
><br>
> …..<br>
><br>
> …..<br>
><br>
><br>
><br>
>   CC       zebra/zebra_vty.o<br>
><br>
> In file included from zebra/zebra_vty.c:23:0:<br>
><br>
> zebra/zebra_fpm.h:33:12: warning: 'fpm_remote_srv_write' used but never<br>
> defined<br>
><br>
> static int fpm_remote_srv_write (struct vty *vty );<br>
><br>
>             ^<br>
><br>
>   CC       zebra/zebra_vxlan.o<br>
><br>
>   CC       zebra/zserv.o<br>
><br>
>   CC       zebra/zebra_netns_id.o<br>
><br>
>   CC       zebra/zebra_netns_notify.o<br>
><br>
>   CC       zebra/table_manager.o<br>
><br>
>   CC       zebra/zapi_msg.o<br>
><br>
>   CCLD     zebra/zebra<br>
><br>
> zebra/zebra_vty.o: In function `config_write_fpm':<br>
><br>
> /frr/zebra/zebra_vty.c:3697: undefined reference to `fpm_remote_srv_write'<br>
><br>
> collect2: error: ld returned 1 exit status<br>
><br>
> make[2]: *** [zebra/zebra] Error 1<br>
><br>
> Makefile:3246: recipe for target 'zebra/zebra' failed<br>
><br>
> make[2]: Leaving directory '/frr'<br>
><br>
> Makefile:4421: recipe for target 'all-recursive' failed<br>
><br>
> make[1]: Leaving directory '/frr'<br>
><br>
> make[1]: *** [all-recursive] Error 1<br>
><br>
> make: *** [all] Error 2<br>
><br>
><br>
><br>
>   I have observed that zebra_fpm.c is compiled as zebra_fpm.lo instead of<br>
> zebra_fpm.o. I am not sure if that can cause this issue. Please suggest what<br>
> I am missing here and what approach I need to take to fix this issue.<br>
><br>
><br>
><br>
> Thanks and Regards,<br>
><br>
> Mayank<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> dev mailing list<br>
> <a href="mailto:dev@lists.frrouting.org">dev@lists.frrouting.org</a><br>
> <a href="https://lists.frrouting.org/listinfo/dev" rel="noreferrer" target="_blank">https://lists.frrouting.org/<wbr>listinfo/dev</a><br>
><br>
</blockquote></div><br></div>