fib: remove misleading FIB_PATH_TYPE_LAST 31/29931/2
authorBenoît Ganne <bganne@cisco.com>
Fri, 13 Nov 2020 17:33:39 +0000 (18:33 +0100)
committerNeale Ranns <nranns@cisco.com>
Mon, 16 Nov 2020 09:55:00 +0000 (09:55 +0000)
FIB_PATH_TYPE_LAST seems to not have been updated accordingly. It is
unused anyway, just remove it.

Type: improvement

Change-Id: I195e556a6695e3250cc03070ffd9262349f2c77b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/fib/fib_path.c

index 6b1e833..2cee846 100644 (file)
@@ -106,17 +106,8 @@ typedef enum fib_path_type_t_ {
      * via a DVR.
      */
     FIB_PATH_TYPE_DVR,
-    /**
-     * Marker. Add new types before this one, then update it.
-     */
-    FIB_PATH_TYPE_LAST = FIB_PATH_TYPE_BIER_FMASK,
 } __attribute__ ((packed)) fib_path_type_t;
 
-/**
- * The maximum number of path_types
- */
-#define FIB_PATH_TYPE_MAX (FIB_PATH_TYPE_LAST + 1)
-
 #define FIB_PATH_TYPES {                                       \
     [FIB_PATH_TYPE_ATTACHED_NEXT_HOP] = "attached-nexthop",    \
     [FIB_PATH_TYPE_ATTACHED]          = "attached",            \
@@ -133,11 +124,6 @@ typedef enum fib_path_type_t_ {
     [FIB_PATH_TYPE_DVR]               = "dvr",                 \
 }
 
-#define FOR_EACH_FIB_PATH_TYPE(_item)           \
-    for (_item = FIB_PATH_TYPE_FIRST;           \
-         _item <= FIB_PATH_TYPE_LAST;           \
-         _item++)
-
 /**
  * Enurmeration of path operational (i.e. derived) attributes
  */