mirror_frr/zebra
Donald Sharp c87f5c2392 zebra: Notice when an interface is turned on w/ mpls and enable mpls subsystem
Currently when FRR starts up it queries the kernel to see if mpls is turned on.
If not FRR does not enable zebra's mpls subsection.  If at a later time mpls
is turned on, let's notice that an interface now is enabled for mpls( thus
implying that all the bits and bobs in the kernel are now setup properly ).

a) convert mpls_enabled to a bool
b) abstract a new function zebra_mpls_turned_on and call it
when FRR notices that an interface now has mpls enabled.
c) mpls_processq_init cannot fail, so actually notice that
and don't have special code to detect a failure.

New results:

sharpd@eva ~> vtysh -c "show zebra"
 OS                           Linux(5.10.0-12-amd64)
 ECMP Maximum                 128
 v4 Forwarding                On
 v6 Forwarding                On
 MPLS                         Off
 EVPN                         Off
 Kernel socket buffer size    90000000
 VRF                          l3mdev Available
 ASIC offload                 Unavailable
 RA                           Compiled in
 RFC 5549                     BGP is not using
 Kernel NHG                   Available
 v4 All LinkDown Routes       Off
 v4 Default LinkDown Routes   Off
 v6 All LinkDown Routes       Off
 v6 Default LinkDown Routes   Off
 v4 All MC Forwarding         On
 v4 Default MC Forwarding     Off
 v6 All MC Forwarding         On
 v6 Default MC Forwarding     Off

                            Route      Route      Neighbor   LSP        LSP
VRF                         Installs   Removals    Updates   Installs   Removals
default                           26          7          0          0          0
<turn on mpls_iptunnel and mpls_router modules in the kernel and then do this>:
sharpd@eva ~> sudo sysctl -w net.mpls.conf.enp39s0.input=1
[sudo] password for sharpd:
net.mpls.conf.enp39s0.input = 1
sharpd@eva ~> vtysh -c "show zebra"
 OS                           Linux(5.10.0-12-amd64)
 ECMP Maximum                 128
 v4 Forwarding                On
 v6 Forwarding                On
 MPLS                         On
 EVPN                         Off
 Kernel socket buffer size    90000000
 VRF                          l3mdev Available
 ASIC offload                 Unavailable
 RA                           Compiled in
 RFC 5549                     BGP is not using
 Kernel NHG                   Available
 v4 All LinkDown Routes       Off
 v4 Default LinkDown Routes   Off
 v6 All LinkDown Routes       Off
 v6 Default LinkDown Routes   Off
 v4 All MC Forwarding         On
 v4 Default MC Forwarding     Off
 v6 All MC Forwarding         On
 v6 Default MC Forwarding     Off

                            Route      Route      Neighbor   LSP        LSP
VRF                         Installs   Removals    Updates   Installs   Removals
default                           26          7          0          0          0
sharpd@eva ~>

I am doing this work because FRR keeps having operators not know about how
to properly use mpls.  Let's make FRR behave a bit better in this weird edge
case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-08 09:15:22 -04:00
..
dpdk zebra: PBR dpdk programming 2022-06-27 08:08:02 -04:00
.gitignore
connected.c *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
connected.h lib,zebra: use more const 2021-09-14 10:31:45 -04:00
debug_nl.c zebra: debug decode RTA_EXPIRES and RTA_MFC_STATS 2022-07-07 11:36:44 +02:00
debug.c zebra: infastructure for the new dataplane plugin 2022-06-27 07:56:55 -04:00
debug.h zebra: infastructure for the new dataplane plugin 2022-06-27 07:56:55 -04:00
dplane_fpm_nl.c Merge pull request #10427 from sworleys/Protodown-Reason-Upstream 2022-03-15 19:58:16 -04:00
if_ioctl.c zebra: Remove usage of newline in zlog_X message 2022-07-29 18:31:58 -04:00
if_netlink.c zebra: netlink rtm tunnel msg parsing 2022-06-24 07:33:34 -04:00
if_netlink.h zebra: netlink rtm tunnel msg parsing 2022-06-24 07:33:34 -04:00
if_socket.c zebra: add boilerplate protodown updates for *bsd 2022-03-09 18:02:44 -05:00
if_sysctl.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
interface.c zebra: Notice when an interface is turned on w/ mpls and enable mpls subsystem 2022-08-08 09:15:22 -04:00
interface.h zebra: Add IF_ZEBRA_DATA_X define 2022-08-08 09:15:22 -04:00
ioctl.c zebra: Attempt to make ioctl.c have a bit more useful log messges 2022-06-15 10:34:30 -04:00
ioctl.h *: Remove solaris from FRR 2020-09-21 10:02:20 -04:00
ipforward_proc.c
ipforward_sysctl.c *: Remove solaris from FRR 2020-09-21 10:02:20 -04:00
ipforward.h
irdp_interface.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
irdp_main.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
irdp_packet.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
irdp.h *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
kernel_netlink.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
kernel_netlink.h zebra: new netlink parse utility for rta 2022-05-16 10:45:14 -07:00
kernel_socket.c zebra: handle FreeBSD routing socket ENOBUFS 2022-07-01 10:21:41 -03:00
kernel_socket.h
label_manager.c Merge pull request #7756 from pjdruddy/bgplu-fixes 2021-01-09 15:48:22 -05:00
label_manager.h zebra: expose label-manager util-funcs 2021-01-05 18:19:44 +00:00
main.c zebra: move allow_delete to zrouter.allow_delete 2022-07-01 07:59:53 -04:00
Makefile
netconf_netlink.c zebra: Add ability for netconf dplane to handle global values 2022-06-27 16:30:20 -04:00
netconf_netlink.h zebra: use dataplane to read interface NETCONF info 2022-02-25 10:18:32 -05:00
redistribute.c zebra: Fix ships in the night issue 2022-02-07 16:10:03 -05:00
redistribute.h zebra: Fix redistribute.h up to our standards 2022-01-18 08:39:40 -05:00
rib.h zebra: clean up rtadv integration 2022-05-21 14:14:01 +02:00
router-id.c lib, zebra, pimd: clean up/fix VRF DECLVAR macros 2022-04-28 11:09:26 +02:00
router-id.h
rt_netlink.c zebra: Avoid buffer overflow using netlink_parse_rtattr_nested() 2022-07-17 22:31:48 +03:00
rt_netlink.h zebra: add support for protodown reason code 2022-03-09 17:52:44 -05:00
rt_socket.c zebra: Do not complain if deletion fails 2022-03-19 07:44:54 -04:00
rt.h zebra: add boilerplate protodown updates for *bsd 2022-03-09 18:02:44 -05:00
rtadv.c zebra: Add some more data to rtadv socket failures 2022-07-19 13:57:56 -04:00
rtadv.h zebra: clean up rtadv integration 2022-05-21 14:14:01 +02:00
rtread_netlink.c zebra: use more const 2021-07-19 10:36:12 -04:00
rtread_sysctl.c zebra: use more const 2021-07-19 10:36:12 -04:00
rule_netlink.c zebra: Add tracepoint for netlink_rule_change 2022-04-20 09:43:47 -04:00
rule_netlink.h zebra: netlink message batching 2020-08-10 21:42:43 +02:00
rule_socket.c
sample_plugin.c *: require semicolon after FRR_DAEMON_INFO & co. 2021-03-17 06:18:39 +01:00
subdir.am configure, zebra: include DPDK headers and shared libs in the dp-dpdk build 2022-06-27 07:56:55 -04:00
table_manager.c zebra, ospf6d: Do not check if NULL for XCALLOC() 2022-05-08 15:43:21 +03:00
table_manager.h zebra: extend table manager per vrf, add vty configuration 2021-09-21 18:37:30 +02:00
testrib.conf
zapi_msg.c lib, zebra, bgpd: Move route EVPN flag to nexthop 2022-06-10 17:12:48 +08:00
zapi_msg.h zebra: name the route_entry opaque struct more specifically 2022-01-31 08:50:50 -05:00
zebra_dplane.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
zebra_dplane.h zebra: pass PBR expanded actions to the dataplane 2022-06-27 07:56:55 -04:00
zebra_errors.c zebra: add support for protodown reason code 2022-03-09 17:52:44 -05:00
zebra_errors.h zebra: add support for protodown reason code 2022-03-09 17:52:44 -05:00
zebra_evpn_mac.c zebra: correctly display one debug flag about ES Peer 2022-07-15 19:24:24 -04:00
zebra_evpn_mac.h Merge pull request #10726 from chiragshah6/fdev2 2022-03-22 22:05:47 -07:00
zebra_evpn_mh.c zebra: delay setting esi in zebra_evpn_local_es_update() 2022-05-16 09:40:49 -04:00
zebra_evpn_mh.h bgpd,zebra: correct one debug log for evpn-mh 2022-05-12 02:19:51 -04:00
zebra_evpn_neigh.c zebra: remove redundant flags assignment 2022-07-12 14:18:18 -04:00
zebra_evpn_neigh.h zebra: Convert to struct zebra_neigh as per our internal standard 2021-09-02 10:33:23 -04:00
zebra_evpn_vxlan.h *: cleanup ifp->vrf_id 2021-11-22 20:47:23 +03:00
zebra_evpn.c Zebra EVPN Debug: Fixing log flooding when disabling MLAG leaf configuration 2022-06-21 18:18:14 -07:00
zebra_evpn.h zebra: Convert to struct zebra_vtep as per our internal standard 2021-09-02 10:33:22 -04:00
zebra_fpm_dt.c zebra: replace inet_ntoa 2020-10-22 13:37:25 -04:00
zebra_fpm_netlink.c lib, zebra, bgpd: Move route EVPN flag to nexthop 2022-06-10 17:12:48 +08:00
zebra_fpm_private.h zebra: Fix IPv4 routes with IPv6 link local next hops install in FPM 2021-09-13 08:39:43 -07:00
zebra_fpm_protobuf.c
zebra_fpm.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
zebra_gr.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
zebra_l2.c *: cleanup ifp->vrf_id 2021-11-22 20:47:23 +03:00
zebra_l2.h zebra: clean up rtadv integration 2022-05-21 14:14:01 +02:00
zebra_mlag_private.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
zebra_mlag_vty.c
zebra_mlag_vty.h
zebra_mlag.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
zebra_mlag.h *: require semicolon after DEFINE_HOOK & co. 2021-03-17 06:18:17 +01:00
zebra_mpls_netlink.c zebra: dplane FPM handle LSP install/update/delete 2020-11-27 16:32:01 +00:00
zebra_mpls_null.c
zebra_mpls_openbsd.c zebra: Convert to struct zebra_nhlfe as per our internal standard 2021-09-02 10:33:23 -04:00
zebra_mpls_vty.c *: Properly use memset() when zeroing 2022-05-11 14:08:47 +03:00
zebra_mpls.c zebra: Notice when an interface is turned on w/ mpls and enable mpls subsystem 2022-08-08 09:15:22 -04:00
zebra_mpls.h zebra: Notice when an interface is turned on w/ mpls and enable mpls subsystem 2022-08-08 09:15:22 -04:00
zebra_mroute.c zebra, pimd: Add a field family in the message ZEBRA_IPMR_ROUTE_STATS 2022-04-28 01:10:49 -07:00
zebra_mroute.h zebra: Modify base code to get ipv6 stats from kernel 2022-04-28 01:10:49 -07:00
zebra_nb_config.c zebra: remove one unnecessary check for l3vni nb 2022-05-20 03:11:27 -04:00
zebra_nb_rpcs.c zebra: display rpc error msg to vtysh 2020-10-05 13:57:54 -07:00
zebra_nb_state.c *: Avoid casting to the same type as on the left 2022-05-08 16:07:42 +03:00
zebra_nb.c zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_nb.h zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_neigh.c zebra: free neighbor state before exit to avoid memleaks 2022-07-14 12:20:01 -04:00
zebra_neigh.h zebra: add support for maintaining local neigh entries 2022-06-27 07:56:55 -04:00
zebra_netns_id.c zebra: ret is always -1 or 0 at this point so remove the if test 2022-06-16 16:31:35 -04:00
zebra_netns_id.h zebra: dynamically detect vxlan link interfaces in other netns 2020-09-11 18:26:23 +02:00
zebra_netns_notify.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
zebra_netns_notify.h
zebra_nhg_private.h
zebra_nhg.c zebra: Cleanup unguarded debug 2022-08-08 09:15:22 -04:00
zebra_nhg.h zebra: Fix memory leaks and use after frees in nhg's on shutdown 2022-08-05 07:51:27 -04:00
zebra_ns.c *: rework renaming the default VRF 2021-12-21 22:09:29 +03:00
zebra_ns.h zebra: Make netlink buffer reads resizeable when needed 2022-02-08 17:28:19 -05:00
zebra_opaque.c *: frr_with_mutex change to follow our standard 2022-07-20 15:50:32 -04:00
zebra_opaque.h
zebra_pbr.c zebra: make rib_process_dplane_results own ctx freeing 2022-06-29 15:24:20 -04:00
zebra_pbr.h zebra: pass PBR expanded actions to the dataplane 2022-06-27 07:56:55 -04:00
zebra_ptm_redistribute.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_ptm_redistribute.h
zebra_ptm.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
zebra_ptm.h *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
zebra_pw.c zebra: Convert thread_cancel to THREAD_OFF 2022-07-21 08:30:50 -04:00
zebra_pw.h *: use FRR interface name definition everywhere 2022-05-02 13:00:12 -03:00
zebra_rib.c *: frr_with_mutex change to follow our standard 2022-07-20 15:50:32 -04:00
zebra_rnh.c zebra: add a few const in RNH code 2022-03-27 14:57:22 +02:00
zebra_rnh.h zebra: add a few const in RNH code 2022-03-27 14:57:22 +02:00
zebra_routemap_nb_config.c zebra: remove checks for src address existence when using "set src" 2021-08-02 18:35:30 +03:00
zebra_routemap_nb.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
zebra_routemap_nb.h zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_routemap.c lib, zebra, pimd: clean up/fix VRF DECLVAR macros 2022-04-28 11:09:26 +02:00
zebra_routemap.h zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_router.c zebra: Fix memory leaks and use after frees in nhg's on shutdown 2022-08-05 07:51:27 -04:00
zebra_router.h zebra: zrouter.in_shutdown is an atomic variable 2022-08-05 07:51:27 -04:00
zebra_script.c build: first header *must* be zebra.h or config.h 2022-04-04 18:33:10 +02:00
zebra_script.h zebra: Add encoders/decoders for zebra 2021-10-20 00:56:00 +08:00
zebra_snmp.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
zebra_srte.c *: When matching against a nexthop send and process what it matched against 2022-03-12 11:18:45 -05:00
zebra_srte.h zebra: Convert to struct zebra_lsp as per our internal standard 2021-09-02 10:33:23 -04:00
zebra_srv6_vty.c zebra: output optional param "func-bits" for SRv6 2022-03-28 17:37:45 +09:00
zebra_srv6_vty.h *: new cli-nodes for SRv6 manager (step2) 2021-06-02 10:24:47 -04:00
zebra_srv6.c zebra: elliminate srv6 locator auto allocation by zlicnet request 2021-09-07 12:54:39 +00:00
zebra_srv6.h *: fix code format accourding to checkpatch 2021-06-02 10:24:48 -04:00
zebra_trace.c zebra: Add initial zebra tracepoint support 2022-04-20 09:39:47 -04:00
zebra_trace.h zebra: Name variable better in zebra_trace.h 2022-04-20 09:49:36 -04:00
zebra_vrf.c zebra: clean up rtadv integration 2022-05-21 14:14:01 +02:00
zebra_vrf.h zebra: clean up rtadv integration 2022-05-21 14:14:01 +02:00
zebra_vty.c zebra: Delete the malloced memory under show zebra 2022-07-16 19:01:12 -04:00
zebra_vxlan_private.h zebra: Convert to struct zebra_l3nvi as per our internal standard 2021-09-02 10:33:22 -04:00
zebra_vxlan.c zebra: fix bond down for evpn-mh 2022-08-03 02:47:16 -04:00
zebra_vxlan.h zebra: remove unnecessary check for "zevpn_vrf" 2022-05-13 23:31:52 -04:00
zserv.c *: frr_with_mutex change to follow our standard 2022-07-20 15:50:32 -04:00
zserv.h zebra: clean up rtadv integration 2022-05-21 14:14:01 +02:00