mirror_frr/zebra
Udaya Shankara KS 711ff0ba94 zebra: Enable fpm module to connect to remote fpm server
FPM aims to provide cross platform mechanism to support the scenario
where the router has forwarding path distinct fromt the kernel.Commonly
Hardware based fast path.Hence it is non-configurable paramter.This
limits us to use funcationality to update FIB information to remote
hosts, like SDN controller.

This implementation provides the CLI to configure remote hosts and port
information of remote fpm controller.Otherwise default fpm server will
be localhost and default fpm port will be well know port 2620.

* zebra_fpm.c: added fpm_server paramter to zfpm_global_t handler.
    Implemented CLI for configuring the fpm server and no fpm
    command to revert back to default configuration.

* zserv.c: Install zebra node to write fpm configuration info
   on console/config file.

Further documentation supplied:
-------------------------------

               ZEBRA : CLI CONFIGURATION FOR FPM MODULE
         ========================================================

1. INTRODUCTION
================================
   1.1 scope

     This memo discusses the configuration option for zebra to update
     FIB information to local and remote modules.
     This will also helps to address the issue associated with CORD project.
     https://jira.onosproject.org/browse/CORD-411

2. REFERENCE
================================
  Quagga version 99.24+ ( main branch committed on 29-sep-2015)

3. PROBLEM DESCRIPTION
================================

    Once FPM is enabled, Quagga periodically tries to initiate fpm
connection to localhost:2620.  These values are non configurable in
existing implementation.  There is no CLI available to configure
"host:port".  hence limits us to use it for hardware based fast path
modules only.

4. PROPOSED CHANGES
================================
Following changes are done to the quagga code
   a) Added new CLI to configure "host address : port".
      The CLI format
      <conf t>
           $ fpm connection ip <ipv4 address> port <tcp port num>

      and no fpm command to revert back to default
      <conf t>
           $ no fpm connection ip <ipv4 address> port <tcp port num>

   b) Allowed values are ipv4 address and tcp port range <1-65535>

   c) FPM initialization code has been enhanced to pick the "host
      address : port" values from zebra.conf.  if not found then
      default values as localhost:2620 will be used.  and updated the
      information on to config file on write config command

5. FILES MODIFIED
================================
  1) fpm/fpm.h :
     a) Added MACRO to represent network order loopback ip

  2) zebra/zebra_fpm.h :

     a) introduced fpm_server variable in zfpm_glob_t handler to hold
        the remote fpm server address

     b) Hooked 'fpm_remote_ip_cmd' and 'no_fpm_remote_ip_cmd' at CONFIG
        node to configure remote fpm detail and to revert back to
        default respectively

  3) zebra/zserv.c :
     a) Hooked 'config_write_fpm' callback function, at ZEBRA_NODE to
        display the fpm connection details on console on entering
        command

         $ show running_config
        and to write to configuration file on entering command
         $ write config

6. TESTING DETAILS
================================

   6.1. default behavior

          In default configuration FPM will attempt to connect to
          localhost:2620

   6.2. update fpm info
        a) Using CLI command user can configure fpm host:port details
           and can be able to write to config file(zebra.conf) using
           write config command.  this parameters has no
           dependency/impact on other parameters of config file

        b) show running-config/write config will display the fpm
           information if configured.  and will not display any
           information related to fpm for default configuration

        c) these configured information will be stored to config file.
           only on write config command.

   6.3 loading from config file
        a) zebra attempts to connect to fpm server if fpm parameter
           found in config file.else connects to default parameters.

        b) if fpm connection drops, fpm will periodically attempts to
           connect to remote server.

        c) if fpm connections already established. then newly
           configured fpm parameters will not disconnect the existing
           connection.  new connection to the different fpm server will
           happen only after existing connection closes by either of
           the end.

fix fpm prototype
2016-09-23 12:12:16 -04:00
..
.gitignore [administrivia] Update gitignore files 2008-08-22 20:02:08 +01:00
client_main.c lib, vtysh: Return actual problem further up 2016-04-06 20:07:27 -04:00
connected.c Quagga: Fix MPLS LSP scheduling to follow nexthop route update 2016-09-23 09:30:59 -04:00
connected.h Zebra: Remove reliance on NEXTHOP_TYPE_IPV4_ONLINK 2015-11-16 12:48:07 -08:00
debug.c Quagga: Static LSP configuration 2016-09-23 09:30:54 -04:00
debug.h Quagga: Static LSP configuration 2016-09-23 09:30:54 -04:00
GNOME-PRODUCT-ZEBRA-MIB Initial revision 2002-12-13 20:15:29 +00:00
GNOME-SMI Initial revision 2002-12-13 20:15:29 +00:00
if_ioctl_solaris.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
if_ioctl.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
if_netlink.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
if_null.c lib, zebra: Rework zebra_ns to be a bit more modular 2016-04-14 20:56:57 -04:00
if_sysctl.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
interface.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
interface.h lib, zebra: unify link layer type and hardware address handling 2016-09-03 11:05:50 -04:00
ioctl_null.c Add missing GPL headers, and copyright claims that certainly apply. 2016-05-26 01:06:59 +00:00
ioctl_solaris.c zebra/ioctl_solaris: Fix use of prefix2str in if_prefix_add/delete_ipv6 2016-06-09 10:52:16 -04:00
ioctl_solaris.h build/solaris: create ioctl_solaris.h 2016-06-09 10:51:59 -04:00
ioctl.c *: fix more initialisers (for BSD) 2016-06-08 15:01:33 -04:00
ioctl.h [zebra/solaris] Interface state fixups for Solaris. 2006-01-25 04:31:40 +00:00
ipforward_proc.c zebra: fix warnings in forward proc 2011-12-07 01:24:09 +04:00
ipforward_solaris.c 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
ipforward_sysctl.c build: remove INRIA, NRL and MUSICA IPv6 quirks 2016-06-03 14:40:03 -04:00
ipforward.h 2005-06-28 Paul Jakma <paul.jakma@sun.com> 2005-06-28 17:17:12 +00:00
irdp_interface.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
irdp_main.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
irdp_packet.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
irdp.h zebra: deal with irdp compile warnings 2009-12-10 14:22:44 +03:00
kernel_netlink.c Initial revision 2002-12-13 20:15:29 +00:00
kernel_null.c mpls: add null driver 2016-09-23 09:31:13 -04:00
kernel_socket.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
kernel_socket.h mpls: add support to the OpenBSD kernel 2016-09-23 09:31:15 -04:00
main.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
Makefile.am zebra: install MPLS CLI commands only if MPLS is enabled. 2016-09-23 09:31:20 -04:00
misc_null.c zebra: clean up misc_null pragmas 2016-06-07 09:43:32 -04:00
redistribute_null.c Update Traffic Engineering Support for OSPFD 2016-09-03 11:05:50 -04:00
redistribute.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
redistribute.h Update Traffic Engineering Support for OSPFD 2016-09-03 11:05:50 -04:00
rib.h Revert "Make route flags a 32bit field" 2016-09-23 12:11:21 -04:00
router-id.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
router-id.h zebra: maintain the router-id per VRF 2015-10-30 00:19:15 -07:00
rt_ioctl.c zebra: remove unused code from zebra netlink 2016-09-09 12:15:13 -04:00
rt_netlink.c Revert "zebra: use link scope for interface routes" 2016-09-23 12:11:09 -04:00
rt_netlink.h mpls: add null driver 2016-09-23 09:31:13 -04:00
rt_socket.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
rt.h zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
rtadv_null.c BGP: Trigger IPv6 router advertisements upon config of unnumbered neighbor 2016-05-02 13:53:38 -07:00
rtadv.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
rtadv.h zebra: fix build with rtadv disabled 2016-06-08 14:15:47 -04:00
rtread_getmsg.c zebra: Refactor rib_add_ipv[4|6] to a common function 2016-09-01 07:20:18 -04:00
rtread_netlink.c lib, zebra: The Bulk of the conversion over to NS and VRF 2016-02-01 10:55:42 -08:00
rtread_sysctl.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
test_main.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
testrib.conf zebra: Build the test client, can be useful, and add IPv6 to testrib.conf 2016-05-26 01:13:58 +00:00
zebra_fpm_netlink.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zebra_fpm_private.h zebra: add module to communicate routes to FPM 2012-11-30 21:41:17 +01:00
zebra_fpm.c zebra: Enable fpm module to connect to remote fpm server 2016-09-23 12:12:16 -04:00
zebra_fpm.h zebra: Enable fpm module to connect to remote fpm server 2016-09-23 12:12:16 -04:00
zebra_memory.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_memory.h *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_mpls_netlink.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_mpls_null.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_mpls_openbsd.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_mpls_vty.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_mpls.c zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_mpls.h zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00
zebra_ns.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_ns.h lib, vtysh: support multiple VRFs by using linux netns 2016-09-09 12:15:14 -04:00
zebra_ptm_null.c Zebra and bgpd: VRF support for BFD 2016-03-08 05:10:56 -08:00
zebra_ptm_redistribute.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_ptm_redistribute.h Zebra and bgpd: VRF support for BFD 2016-03-08 05:10:56 -08:00
zebra_ptm.c *: fix trivial build errors on *BSD 2016-08-07 21:05:26 -04:00
zebra_ptm.h bfd: Fix for missing BFD client regs/deregs from quagga clients 2016-06-21 03:39:58 -07:00
zebra_rib.c Revert "zebra: use link scope for interface routes" 2016-09-23 12:11:09 -04:00
zebra_rnh_null.c Zebra: Fix static NHT to work properly in a VRF 2016-02-26 19:13:34 +00:00
zebra_rnh.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_rnh.h Zebra: Fix static NHT to work properly in a VRF 2016-02-26 19:51:34 +00:00
zebra_routemap.c *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs 2016-09-19 16:31:04 -04:00
zebra_routemap.h zebra: Add route-map support to ip import-table 2016-05-12 20:22:53 -04:00
zebra_snmp.c *: snmp: add a load of "static" specifiers 2016-07-28 07:27:47 -04:00
zebra_static.c Revert "zebra: support FIB override routes" 2016-09-23 12:11:00 -04:00
zebra_static.h zebra: install MPLS CLI commands only if MPLS is enabled. 2016-09-23 09:31:20 -04:00
zebra_vrf.c Quagga: Static LSP configuration 2016-09-23 09:30:54 -04:00
zebra_vrf.h Quagga: Fix MPLS LSP scheduling to follow nexthop route update 2016-09-23 09:30:59 -04:00
zebra_vty.c Revert "zebra: support FIB override routes" 2016-09-23 12:11:00 -04:00
zebra.conf.sample Initial revision 2002-12-13 20:15:29 +00:00
zserv_null.c zebra: Refactor zebra_vrf 2016-04-14 20:57:04 -04:00
zserv.c zebra: Enable fpm module to connect to remote fpm server 2016-09-23 12:12:16 -04:00
zserv.h zebra: check at startup if the kernel supports MPLS 2016-09-23 09:31:25 -04:00