]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_router.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / zebra_router.h
index c96c8e5f46c203e3d99b35cc701830cc7f6e22e3..3112fcab4647ecf03863e59ddd2e0add7c5ccb72 100644 (file)
@@ -1,23 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Zebra Router header.
  * Copyright (C) 2018 Cumulus Networks, Inc.
  *                    Donald Sharp
- *
- * This file is part of FRR.
- *
- * FRR 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.
- *
- * FRR 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 FRR; see the file COPYING.  If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
  */
 #ifndef __ZEBRA_ROUTER_H__
 #define __ZEBRA_ROUTER_H__
@@ -159,6 +143,8 @@ struct zebra_router {
        /* Tables and other global info maintained for EVPN multihoming */
        struct zebra_evpn_mh_info *mh_info;
 
+       struct zebra_neigh_info *neigh_info;
+
        /* EVPN MH broadcast domains indexed by the VID */
        struct hash *evpn_vlan_table;
 
@@ -170,6 +156,10 @@ struct zebra_router {
 
        struct hash *iptable_hash;
 
+       struct hash *qdisc_hash;
+       struct hash *class_hash;
+       struct hash *filter_hash;
+
        /* A sequence number used for tracking routes */
        _Atomic uint32_t sequence_num;
 
@@ -218,10 +208,26 @@ struct zebra_router {
        bool asic_offloaded;
        bool notify_on_ack;
 
+       /*
+        * If the asic is notifying us about successful nexthop
+        * allocation/control.  Some developers have made their
+        * asic take control of how many nexthops/ecmp they can
+        * have and will report what is successfull or not
+        */
+       bool asic_notification_nexthop_control;
+
        bool supports_nhgs;
 
+       bool all_mc_forwardingv4, default_mc_forwardingv4;
+       bool all_mc_forwardingv6, default_mc_forwardingv6;
+       bool all_linkdownv4, default_linkdownv4;
+       bool all_linkdownv6, default_linkdownv6;
+
 #define ZEBRA_DEFAULT_NHG_KEEP_TIMER 180
        uint32_t nhg_keep;
+
+       /* Should we allow non FRR processes to delete our routes */
+       bool allow_delete;
 };
 
 #define GRACEFUL_RESTART_TIME 60
@@ -275,6 +281,11 @@ static inline void zebra_router_set_supports_nhgs(bool support)
        zrouter.supports_nhgs = support;
 }
 
+static inline bool zebra_router_in_shutdown(void)
+{
+       return atomic_load_explicit(&zrouter.in_shutdown, memory_order_relaxed);
+}
+
 /* zebra_northbound.c */
 extern const struct frr_yang_module_info frr_zebra_info;