]> git.puffer.fish Git - mirror/frr.git/commitdiff
pathd: kill *_memory.[ch]
authorDavid Lamparter <equinox@diac24.net>
Mon, 22 Mar 2021 17:53:23 +0000 (18:53 +0100)
committerDavid Lamparter <equinox@diac24.net>
Mon, 22 Mar 2021 17:53:23 +0000 (18:53 +0100)
Ouch, MTYPE_PCEP is used in 81 places :(

Signed-off-by: David Lamparter <equinox@diac24.net>
13 files changed:
pathd/path_cli.c
pathd/path_memory.c [deleted file]
pathd/path_memory.h [deleted file]
pathd/path_pcep.c
pathd/path_pcep.h
pathd/path_pcep_cli.c
pathd/path_pcep_lib.c
pathd/path_pcep_memory.c [deleted file]
pathd/path_pcep_memory.h [deleted file]
pathd/path_pcep_pcc.c
pathd/pathd.c
pathd/pathd.h
pathd/subdir.am

index a46ec5fac4233d108e84c7d6f4a379c40890e288..cf14aa8c61689e4a3d3e5d2189805f96677bf34f 100644 (file)
@@ -20,6 +20,7 @@
 #include <math.h>
 #include <zebra.h>
 
+#include "memory.h"
 #include "log.h"
 #include "command.h"
 #include "mpls.h"
@@ -28,7 +29,6 @@
 
 #include "pathd/pathd.h"
 #include "pathd/path_nb.h"
-#include "pathd/path_memory.h"
 #ifndef VTYSH_EXTRACT_PL
 #include "pathd/path_cli_clippy.c"
 #endif
diff --git a/pathd/path_memory.c b/pathd/path_memory.c
deleted file mode 100644 (file)
index 7a78c09..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2020  NetDEF, Inc.
- *
- * This program 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 of the License, or (at your option)
- * any later version.
- *
- * This program 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 this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <zebra.h>
-
-#include <memory.h>
-
-#include "pathd/path_memory.h"
-
-DEFINE_MGROUP(PATHD, "pathd");
diff --git a/pathd/path_memory.h b/pathd/path_memory.h
deleted file mode 100644 (file)
index a0896cd..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2020  NetDEF, Inc.
- *
- * This program 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 of the License, or (at your option)
- * any later version.
- *
- * This program 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 this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _FRR_PATH_MEMORY_H_
-#define _FRR_PATH_MEMORY_H_
-
-#include "memory.h"
-
-DECLARE_MGROUP(PATHD);
-
-#endif /* _FRR_PATH_MEMORY_H_ */
index 5dcba965a298a599de4fbda4477f5daa70d9517a..d6cd48ecdb207322ee1f388c5a6d489a30aa8060 100644 (file)
@@ -19,6 +19,7 @@
 #include <zebra.h>
 #include "pceplib/pcep_utils_counters.h"
 
+#include "memory.h"
 #include "log.h"
 #include "command.h"
 #include "libfrr.h"
 
 #include "pathd/pathd.h"
 #include "pathd/path_errors.h"
-#include "pathd/path_pcep_memory.h"
 #include "pathd/path_pcep.h"
 #include "pathd/path_pcep_cli.h"
 #include "pathd/path_pcep_controller.h"
 #include "pathd/path_pcep_lib.h"
 #include "pathd/path_pcep_config.h"
 
+DEFINE_MTYPE(PATHD, PCEP, "PCEP module");
 
 /*
  * Globals.
index b131b3144529a54c4367591a8b3d5a32c5d6ace8..654d089cbc01bb2559e0be121af78885b1ef669a 100644 (file)
 #include <stdbool.h>
 #include <debug.h>
 #include <netinet/tcp.h>
+#include "memory.h"
 #include "pceplib/pcep_utils_logging.h"
 #include "pceplib/pcep_pcc_api.h"
 #include "mpls.h"
 #include "pathd/pathd.h"
-#include "pathd/path_pcep_memory.h"
+
+DECLARE_MTYPE(PCEP);
 
 #define PCEP_DEFAULT_PORT 4189
 #define MAX_PCC 32
index 7bbed9464d279c17701ceaae367284aefea3f2c1..355790be8f271ef41dd573706f06b786724a5098 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "pathd/pathd.h"
 #include "pathd/path_errors.h"
-#include "pathd/path_pcep_memory.h"
 #include "pathd/path_pcep.h"
 #include "pathd/path_pcep_cli.h"
 #include "pathd/path_pcep_controller.h"
index 1d2f25889ea55cba576015e433499de05fd8513f..e9d699de47137a906c95e7543da4ad2ba4a22ba0 100644 (file)
 
 #include <zebra.h>
 
+#include "memory.h"
+
 #include <debug.h>
 #include "pceplib/pcep_utils_counters.h"
 #include "pceplib/pcep_timers.h"
 #include "pathd/path_errors.h"
-#include "pathd/path_memory.h"
 #include "pathd/path_pcep.h"
 #include "pathd/path_pcep_lib.h"
 #include "pathd/path_pcep_debug.h"
-#include "pathd/path_pcep_memory.h"
+
+DEFINE_MTYPE_STATIC(PATHD, PCEPLIB_INFRA,    "PCEPlib Infrastructure");
+DEFINE_MTYPE_STATIC(PATHD, PCEPLIB_MESSAGES, "PCEPlib PCEP Messages");
 
 #define CLASS_TYPE(CLASS, TYPE) (((CLASS) << 16) | (TYPE))
 #define DEFAULT_LSAP_SETUP_PRIO 4
diff --git a/pathd/path_pcep_memory.c b/pathd/path_pcep_memory.c
deleted file mode 100644 (file)
index 5cb5fb3..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2020  NetDEF, Inc.
- *
- * This program 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 of the License, or (at your option)
- * any later version.
- *
- * This program 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 this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <zebra.h>
-
-#include <memory.h>
-
-#include "pathd/path_pcep_memory.h"
-
-DEFINE_MTYPE(PATHD, PCEP, "PCEP module");
-DEFINE_MTYPE(PATHD, PCEPLIB_INFRA, "PCEPlib Infrastructure");
-DEFINE_MTYPE(PATHD, PCEPLIB_MESSAGES, "PCEPlib PCEP Messages");
diff --git a/pathd/path_pcep_memory.h b/pathd/path_pcep_memory.h
deleted file mode 100644 (file)
index a44d178..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2020  NetDEF, Inc.
- *
- * This program 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 of the License, or (at your option)
- * any later version.
- *
- * This program 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 this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _FRR_PATH_PCEP_MEMORY_H_
-#define _FRR_PATH_PCEP_MEMORY_H_
-
-#include "pathd/path_memory.h"
-
-DECLARE_MTYPE(PCEP);
-DECLARE_MTYPE(PCEPLIB_INFRA);
-DECLARE_MTYPE(PCEPLIB_MESSAGES);
-
-#endif /* _FRR_PATH_PCEP_MEMORY_H_ */
index 986aa3c456e623026035f009339298efd3bcf4e3..a2c1e7cd4cef0363f781780dc6c6136d8a66c852 100644 (file)
@@ -41,7 +41,6 @@
 #include "pathd/pathd.h"
 #include "pathd/path_zebra.h"
 #include "pathd/path_errors.h"
-#include "pathd/path_pcep_memory.h"
 #include "pathd/path_pcep.h"
 #include "pathd/path_pcep_controller.h"
 #include "pathd/path_pcep_lib.h"
index 4893da880a6bfad4efaed74290250f23281cff42..ae8218631584d7b8ec9cbf188d8e0ce530e1dc27 100644 (file)
 #include "network.h"
 
 #include "pathd/pathd.h"
-#include "pathd/path_memory.h"
 #include "pathd/path_zebra.h"
 #include "pathd/path_debug.h"
 
 #define HOOK_DELAY 3
 
+DEFINE_MGROUP(PATHD, "pathd");
+
 DEFINE_MTYPE_STATIC(PATHD, PATH_SEGMENT_LIST, "Segment List");
 DEFINE_MTYPE_STATIC(PATHD, PATH_SR_POLICY, "SR Policy");
 DEFINE_MTYPE_STATIC(PATHD, PATH_SR_CANDIDATE, "SR Policy candidate path");
index e3d26a0ac5458165925bcf95db136078366b3b47..9c4d256ceff27f5328a3e88004728f8cbe4d2c0e 100644 (file)
 #ifndef _FRR_PATHD_H_
 #define _FRR_PATHD_H_
 
+#include "lib/memory.h"
 #include "lib/mpls.h"
 #include "lib/ipaddr.h"
 #include "lib/srte.h"
 #include "lib/hook.h"
 
+DECLARE_MGROUP(PATHD);
+
 enum srte_protocol_origin {
        SRTE_ORIGIN_UNDEFINED = 0,
        SRTE_ORIGIN_PCEP = 1,
index 452d8246699935beee60c70084c0438ae801bd30..b4501214bfe8ec4905b3d5876e41510987137b89 100644 (file)
@@ -23,7 +23,6 @@ pathd_libpath_a_SOURCES = \
        pathd/path_debug.c \
        pathd/path_errors.c \
        pathd/path_main.c \
-       pathd/path_memory.c \
        pathd/path_nb.c \
        pathd/path_nb_config.c \
        pathd/path_nb_state.c \
@@ -39,14 +38,12 @@ clippy_scan += \
 noinst_HEADERS += \
        pathd/path_debug.h \
        pathd/path_errors.h \
-       pathd/path_memory.h \
        pathd/path_nb.h \
        pathd/path_pcep.h \
        pathd/path_pcep_cli.h \
        pathd/path_pcep_controller.h \
        pathd/path_pcep_debug.h \
        pathd/path_pcep_lib.h \
-       pathd/path_pcep_memory.h \
        pathd/path_pcep_config.h \
        pathd/path_pcep_pcc.h \
        pathd/path_zebra.h \
@@ -65,7 +62,6 @@ pathd_pathd_pcep_la_SOURCES = \
        pathd/path_pcep_controller.c \
        pathd/path_pcep_debug.c \
        pathd/path_pcep_lib.c \
-       pathd/path_pcep_memory.c \
        pathd/path_pcep_config.c \
        pathd/path_pcep_pcc.c \
        # end