]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_router.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / zebra_router.c
index c66849863e86b14c4584ba1014420fa03835f2ed..21e09a81f7550fe8584f69a99976772ce9b3e547 100644 (file)
@@ -1,23 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Zebra Router Code.
  * 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.
  */
 #include "zebra.h"
 
@@ -30,6 +14,7 @@
 #include "zebra_mlag.h"
 #include "zebra_nhg.h"
 #include "zebra_neigh.h"
+#include "zebra/zebra_tc.h"
 #include "debug.h"
 #include "zebra_script.h"
 
@@ -312,9 +297,34 @@ void zebra_router_init(bool asic_offload, bool notify_on_ack)
                hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal,
                                 "Zebra Router Nexthop Groups ID index");
 
+       zrouter.rules_hash =
+               hash_create_size(8, zebra_pbr_rules_hash_key,
+                                zebra_pbr_rules_hash_equal, "Rules Hash");
+
+       zrouter.qdisc_hash =
+               hash_create_size(8, zebra_tc_qdisc_hash_key,
+                                zebra_tc_qdisc_hash_equal, "TC (qdisc) Hash");
+       zrouter.class_hash = hash_create_size(8, zebra_tc_class_hash_key,
+                                             zebra_tc_class_hash_equal,
+                                             "TC (classes) Hash");
+       zrouter.filter_hash = hash_create_size(8, zebra_tc_filter_hash_key,
+                                              zebra_tc_filter_hash_equal,
+                                              "TC (filter) Hash");
+
        zrouter.asic_offloaded = asic_offload;
        zrouter.notify_on_ack = notify_on_ack;
 
+       /*
+        * If you start using asic_notification_nexthop_control
+        * come talk to the FRR community about what you are doing
+        * We would like to know.
+        */
+#if CONFDATE > 20251231
+       CPP_NOTICE(
+               "Remove zrouter.asic_notification_nexthop_control as that it's not being maintained or used");
+#endif
+       zrouter.asic_notification_nexthop_control = false;
+
 #ifdef HAVE_SCRIPTING
        zebra_script_init();
 #endif