summaryrefslogtreecommitdiffstats
path: root/zebra
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-21 13:40:27 +0200
committerGitHub <noreply@github.com>2019-06-21 13:40:27 +0200
commit2bc398c3c4af0e3e7c821b81ba97d287246ed2ef (patch)
tree1bb05678fe57348b51e9ccc7cd5838bfaceef388 /zebra
parentMerge pull request #4531 from donaldsharp/repeaty_mcrepeat (diff)
parentripngd: use MTYPE_STATIC (diff)
downloadfrr-2bc398c3c4af0e3e7c821b81ba97d287246ed2ef.tar.xz
frr-2bc398c3c4af0e3e7c821b81ba97d287246ed2ef.zip
Merge pull request #4573 from opensourcerouting/mtype_cleanup
MTYPE cleanup pass
Diffstat (limited to 'zebra')
-rw-r--r--zebra/rtadv.c2
-rw-r--r--zebra/zebra_dplane.c4
-rw-r--r--zebra/zebra_memory.c6
-rw-r--r--zebra/zebra_memory.h8
-rw-r--r--zebra/zebra_rnh.c2
-rw-r--r--zebra/zebra_router.c2
-rw-r--r--zebra/zebra_vrf.c3
7 files changed, 10 insertions, 17 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index e181b495b..5841c44b0 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -50,6 +50,8 @@ extern struct zebra_privs_t zserv_privs;
#if defined(HAVE_RTADV)
+DEFINE_MTYPE_STATIC(ZEBRA, RTADV_PREFIX, "Router Advertisement Prefix")
+
#ifdef OPEN_BSD
#include <netinet/icmp6.h>
#endif
diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c
index abe1879c2..f93562b31 100644
--- a/zebra/zebra_dplane.c
+++ b/zebra/zebra_dplane.c
@@ -36,8 +36,8 @@
#include "zebra/debug.h"
/* Memory type for context blocks */
-DEFINE_MTYPE(ZEBRA, DP_CTX, "Zebra DPlane Ctx")
-DEFINE_MTYPE(ZEBRA, DP_PROV, "Zebra DPlane Provider")
+DEFINE_MTYPE_STATIC(ZEBRA, DP_CTX, "Zebra DPlane Ctx")
+DEFINE_MTYPE_STATIC(ZEBRA, DP_PROV, "Zebra DPlane Provider")
#ifndef AOK
# define AOK 0
diff --git a/zebra/zebra_memory.c b/zebra/zebra_memory.c
index ee041b1c3..a9c2c5fe5 100644
--- a/zebra/zebra_memory.c
+++ b/zebra/zebra_memory.c
@@ -26,11 +26,5 @@
#include "zebra_memory.h"
DEFINE_MGROUP(ZEBRA, "zebra")
-DEFINE_MTYPE(ZEBRA, RTADV_PREFIX, "Router Advertisement Prefix")
-DEFINE_MTYPE(ZEBRA, ZEBRA_VRF, "ZEBRA VRF")
DEFINE_MTYPE(ZEBRA, RE, "Route Entry")
-DEFINE_MTYPE(ZEBRA, RIB_QUEUE, "RIB process work queue")
-DEFINE_MTYPE(ZEBRA, STATIC_ROUTE, "Static route")
DEFINE_MTYPE(ZEBRA, RIB_DEST, "RIB destination")
-DEFINE_MTYPE(ZEBRA, RIB_TABLE_INFO, "RIB table info")
-DEFINE_MTYPE(ZEBRA, RNH, "Nexthop tracking object")
diff --git a/zebra/zebra_memory.h b/zebra/zebra_memory.h
index 667c73b22..e15f97249 100644
--- a/zebra/zebra_memory.h
+++ b/zebra/zebra_memory.h
@@ -29,17 +29,9 @@ extern "C" {
#endif
DECLARE_MGROUP(ZEBRA)
-DECLARE_MTYPE(RTADV_PREFIX)
DECLARE_MTYPE(ZEBRA_NS)
-DECLARE_MTYPE(ZEBRA_VRF)
DECLARE_MTYPE(RE)
-DECLARE_MTYPE(RIB_QUEUE)
-DECLARE_MTYPE(STATIC_ROUTE)
DECLARE_MTYPE(RIB_DEST)
-DECLARE_MTYPE(RIB_TABLE_INFO)
-DECLARE_MTYPE(RNH)
-DECLARE_MTYPE(DP_CTX)
-DECLARE_MTYPE(DP_PROV)
#ifdef __cplusplus
}
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 0a8dbfdde..5f397eb8c 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -50,6 +50,8 @@
#include "zebra/zebra_memory.h"
#include "zebra/zebra_errors.h"
+DEFINE_MTYPE_STATIC(ZEBRA, RNH, "Nexthop tracking object")
+
static void free_state(vrf_id_t vrf_id, struct route_entry *re,
struct route_node *rn);
static void copy_state(struct rnh *rnh, struct route_entry *re,
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index 4352d688a..1e9f9e4ec 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -32,6 +32,8 @@
#include "zebra_nhg.h"
#include "debug.h"
+DEFINE_MTYPE_STATIC(ZEBRA, RIB_TABLE_INFO, "RIB table info")
+
struct zebra_router zrouter = {
.multipath_num = MULTIPATH_NUM,
.ipv4_multicast_mode = MCAST_NO_CONFIG,
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index fdf0cbc69..fcc94a7be 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -48,7 +48,8 @@ static void zebra_vrf_table_create(struct zebra_vrf *zvrf, afi_t afi,
static void zebra_rnhtable_node_cleanup(struct route_table *table,
struct route_node *node);
-DEFINE_MTYPE_STATIC(ZEBRA, OTHER_TABLE, "Other Table");
+DEFINE_MTYPE_STATIC(ZEBRA, ZEBRA_VRF, "ZEBRA VRF")
+DEFINE_MTYPE_STATIC(ZEBRA, OTHER_TABLE, "Other Table")
/* VRF information update. */
static void zebra_vrf_add_update(struct zebra_vrf *zvrf)