[dev] FRR support for FPM

Mayank Tiwari mike.tiwari at gmail.com
Thu Sep 20 09:16:06 EDT 2018


Hi Philippe,

  Thanks for your response. We have got inputs from Donald for it.

  The FPM module is working successfully in FRR after I activated this
module while starting zebra. This FPM connection takes care of publishing
the routes from FRR to the router on the other side which has FPM
connection with FRR.

 We have an additional requirement where the router on the other side of
the FPM connection has to publish the routes to FRR. We use the term
"Reverse FPM" for this scenario. Please let us know if there is any
existing module in FRR code which takes care of this scenario and if we
need to load any other module to enable it. If not, then is there any patch
for FRR which can take care of this scenario.


Thanks and Regards,

Mayank


On Thu, Sep 20, 2018 at 7:48 AM, Philippe Guibert <
philippe.guibert at 6wind.com> wrote:

> Hi Tiwari,
>
> Sorry for late response.
> Did you solve your issue ? FPM is hosted as a module. Shared libraries
> are used to host that module.
> In FRR code, hook.h API is used for that.
> FPM is an optional module that can be compiled with --enable-fpm option.
> I think you should run zebra with option -M fpm.
>
> Hoping it can help,
> Thanks,
> Philippe
>
>
>
> On Tue, Aug 7, 2018 at 8:37 PM, Tiwari, Mayank (Contractor)
> <Mayank_Tiwari at comcast.com> wrote:
> > Hi,
> >
> >
> >
> >   We are using quagga in our solution for FPM connection and Reverse FPM
> > connection with ONOS. In order to support BFD feature I need to upgrade
> from
> > quagga to FRR. For that I was patching the changes present in quagga to
> FRR.
> > During that patching process the following patch is causing compilation
> > issue:
> >
> >
> >
> > diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
> >
> > index 43d76a6..03c4a6b 100644
> >
> > --- a/zebra/zebra_vty.c
> >
> > +++ b/zebra/zebra_vty.c
> >
> > @@ -20,6 +20,7 @@
> >
> >
> >
> > #include <zebra.h>
> >
> >
> >
> > +#include "zebra_fpm.h"
> >
> > #include "memory.h"
> >
> > #include "zebra_memory.h"
> >
> > #include "if.h"
> >
> >
> >
> > +
> >
> > +/* function to write the fpm config info */
> >
> > +static int config_write_fpm (struct vty *vty)
> >
> > +{
> >
> > +  return fpm_remote_srv_write (vty);
> >
> > +}
> >
> > +
> >
> > +/* Zebra node  */
> >
> > +static struct cmd_node zebra_node =
> >
> > +{
> >
> > +  ZEBRA_NODE,
> >
> > +  "",
> >
> > +  1
> >
> > +};
> >
> >
> >
> > /* Route VTY.  */
> >
> > void zebra_vty_init(void)
> >
> > {
> >
> >         /* Install configuration write function. */
> >
> >         install_node(&table_node, config_write_table);
> >
> >         install_node(&forwarding_node, config_write_forwarding);
> >
> > +    install_node (&zebra_node, config_write_fpm);
> >
> >
> >
> >
> >
> >         install_element(VIEW_NODE, &show_ip_forwarding_cmd);
> >
> >         install_element(CONFIG_NODE, &ip_forwarding_cmd);
> >
> >
> >
> >
> >
> > diff --git a/zebra/zebra_fpm.h b/zebra/zebra_fpm.h
> >
> > new file mode 100644
> >
> > index 0000000..9291ffa
> >
> > --- /dev/null
> >
> > +++ b/zebra/zebra_fpm.h
> >
> > @@ -0,0 +1,35 @@
> >
> > +/*
> >
> > + * Router ID for zebra daemon.
> >
> > + *
> >
> > + * Copyright (C) 2004 James R. Leu
> >
> > + *
> >
> > + * This file is part of Quagga routing suite.
> >
> > + *
> >
> > + * Quagga is free software; you can redistribute it and/or modify it
> >
> > + * under the terms of the GNU General Public License as published by the
> >
> > + * Free Software Foundation; either version 2, or (at your option) any
> >
> > + * later version.
> >
> > + *
> >
> > + * Quagga is distributed in the hope that it will be useful, but
> >
> > + * WITHOUT ANY WARRANTY; without even the implied warranty of
> >
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> >
> > + * General Public License for more details.
> >
> > + *
> >
> > + * You should have received a copy of the GNU General Public License
> along
> >
> > + * with this program; see the file COPYING; if not, write to the Free
> > Software
> >
> > + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
> USA
> >
> > + */
> >
> > +
> >
> > +#ifndef _ZEBRA_VTY_H_
> >
> > +#define _ZEBRA_VTY_H_
> >
> > +
> >
> > +#include <zebra.h>
> >
> > +#include "memory.h"
> >
> > +#include "prefix.h"
> >
> > +#include "zclient.h"
> >
> > +#include "if.h"
> >
> > +
> >
> > +
> >
> > +static int fpm_remote_srv_write (struct vty *vty );
> >
> > +
> >
> > +#endif
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > The function 'fpm_remote_srv_write'  is already defined in zebra_fpm.c
> file
> > which I need to use zebra_vty.c file. I have created a header with name
> > zebra_fpm.h and declared that function there and later included this
> header
> > in zebra_vty.c. The compilation of zebra_vty.c fails as it is not able to
> > find  'fpm_remote_srv_write' function
> >
> >
> >
> > This is the compilation error:
> >
> >
> >
> >   CCLD     zebra/zebra_irdp.la
> >
> >   CC       zebra/zebra_fpm.lo
> >
> >   CC       zebra/zebra_fpm_netlink.lo
> >
> > …..
> >
> > …..
> >
> >
> >
> >   CC       zebra/zebra_vty.o
> >
> > In file included from zebra/zebra_vty.c:23:0:
> >
> > zebra/zebra_fpm.h:33:12: warning: 'fpm_remote_srv_write' used but never
> > defined
> >
> > static int fpm_remote_srv_write (struct vty *vty );
> >
> >             ^
> >
> >   CC       zebra/zebra_vxlan.o
> >
> >   CC       zebra/zserv.o
> >
> >   CC       zebra/zebra_netns_id.o
> >
> >   CC       zebra/zebra_netns_notify.o
> >
> >   CC       zebra/table_manager.o
> >
> >   CC       zebra/zapi_msg.o
> >
> >   CCLD     zebra/zebra
> >
> > zebra/zebra_vty.o: In function `config_write_fpm':
> >
> > /frr/zebra/zebra_vty.c:3697: undefined reference to
> `fpm_remote_srv_write'
> >
> > collect2: error: ld returned 1 exit status
> >
> > make[2]: *** [zebra/zebra] Error 1
> >
> > Makefile:3246: recipe for target 'zebra/zebra' failed
> >
> > make[2]: Leaving directory '/frr'
> >
> > Makefile:4421: recipe for target 'all-recursive' failed
> >
> > make[1]: Leaving directory '/frr'
> >
> > make[1]: *** [all-recursive] Error 1
> >
> > make: *** [all] Error 2
> >
> >
> >
> >   I have observed that zebra_fpm.c is compiled as zebra_fpm.lo instead of
> > zebra_fpm.o. I am not sure if that can cause this issue. Please suggest
> what
> > I am missing here and what approach I need to take to fix this issue.
> >
> >
> >
> > Thanks and Regards,
> >
> > Mayank
> >
> >
> > _______________________________________________
> > dev mailing list
> > dev at lists.frrouting.org
> > https://lists.frrouting.org/listinfo/dev
> >
>
> _______________________________________________
> dev mailing list
> dev at lists.frrouting.org
> https://lists.frrouting.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/dev/attachments/20180920/0f134540/attachment-0001.html>


More information about the dev mailing list