]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vrf.h
isisd: implement the 'lsp-too-large' notification
[mirror_frr.git] / zebra / zebra_vrf.h
index 5c5d2f5225f86ef37d83f8991765f65f02b5d2d8..c28025403b48fbb184269e200b58a2588af251fa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Zebra Vrf Header
  * Copyright (C) 2016 Cumulus Networks
- *                    Donald Sahrp
+ *                    Donald Sharp
  *
  * This file is part of Quagga.
  *
@@ -22,6 +22,8 @@
 #if !defined(__ZEBRA_VRF_H__)
 #define __ZEBRA_VRF_H__
 
+#include "vxlan.h"
+
 #include <zebra/zebra_ns.h>
 #include <zebra/zebra_pw.h>
 #include <lib/vxlan.h>
@@ -32,6 +34,11 @@ typedef struct mpls_srgb_t_ {
        uint32_t end_label;
 } mpls_srgb_t;
 
+struct zebra_rmap {
+       char *name;
+       struct route_map *map;
+};
+
 /* Routing table instance.  */
 struct zebra_vrf {
        /* Back pointer */
@@ -53,9 +60,6 @@ struct zebra_vrf {
        /* Routing table.  */
        struct route_table *table[AFI_MAX][SAFI_MAX];
 
-       /* Static route configuration.  */
-       struct route_table *stable[AFI_MAX][SAFI_MAX];
-
        /* Recursive Nexthop table */
        struct route_table *rnh_table[AFI_MAX];
 
@@ -95,6 +99,9 @@ struct zebra_vrf {
        struct zebra_pw_head pseudowires;
        struct zebra_static_pw_head static_pseudowires;
 
+       struct zebra_rmap proto_rm[AFI_MAX][ZEBRA_ROUTE_MAX + 1];
+       struct zebra_rmap nht_rm[AFI_MAX][ZEBRA_ROUTE_MAX + 1];
+
        /* MPLS processing flags */
        uint16_t mpls_flags;
 #define MPLS_FLAG_SCHEDULE_LSPS    (1 << 0)
@@ -118,13 +125,38 @@ struct zebra_vrf {
        /* l3-vni info */
        vni_t l3vni;
 
+       bool dup_addr_detect;
+
+       int dad_time;
+       uint32_t dad_max_moves;
+       bool dad_freeze;
+       uint32_t dad_freeze_time;
+
+       /*
+        * Flooding mechanism for BUM packets for VxLAN-EVPN.
+        */
+       enum vxlan_flood_control vxlan_flood_ctrl;
+
        /* Route Installs */
        uint64_t installs;
        uint64_t removals;
+       uint64_t installs_queued;
+       uint64_t removals_queued;
        uint64_t neigh_updates;
        uint64_t lsp_installs;
        uint64_t lsp_removals;
 };
+#define PROTO_RM_NAME(zvrf, afi, rtype) zvrf->proto_rm[afi][rtype].name
+#define NHT_RM_NAME(zvrf, afi, rtype) zvrf->nht_rm[afi][rtype].name
+#define PROTO_RM_MAP(zvrf, afi, rtype) zvrf->proto_rm[afi][rtype].map
+#define NHT_RM_MAP(zvrf, afi, rtype) zvrf->nht_rm[afi][rtype].map
+
+/*
+ * special macro to allow us to get the correct zebra_vrf
+ */
+#define ZEBRA_DECLVAR_CONTEXT(A, B)                                            \
+       struct vrf *A = VTY_GET_CONTEXT(vrf);                                  \
+       struct zebra_vrf *B = (A) ? A->info : vrf_info_lookup(VRF_DEFAULT)
 
 static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
 {
@@ -159,8 +191,7 @@ extern struct zebra_vrf *zebra_vrf_lookup_by_id(vrf_id_t vrf_id);
 extern struct zebra_vrf *zebra_vrf_lookup_by_name(const char *);
 extern struct zebra_vrf *zebra_vrf_alloc(void);
 extern struct route_table *zebra_vrf_table(afi_t, safi_t, vrf_id_t);
-extern struct route_table *zebra_vrf_static_table(afi_t, safi_t,
-                                                 struct zebra_vrf *zvrf);
+
 extern struct route_table *
 zebra_vrf_other_route_table(afi_t afi, uint32_t table_id, vrf_id_t vrf_id);
 extern int zebra_vrf_has_config(struct zebra_vrf *zvrf);