X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ffib%2Ffib_node.h;h=532efd54dee3986ec9f564aa5e6f9eca91f5469e;hb=72454dd4c5196594b366883bbf732c9e067c64ec;hp=496929adc6148a0ab43ee45fe0550b1275ee049a;hpb=8082380922c65702251d5242058f7b5f35011574;p=vpp.git diff --git a/src/vnet/fib/fib_node.h b/src/vnet/fib/fib_node.h index 496929adc61..532efd54dee 100644 --- a/src/vnet/fib/fib_node.h +++ b/src/vnet/fib/fib_node.h @@ -42,12 +42,17 @@ typedef enum fib_node_type_t_ { FIB_NODE_TYPE_GRE_TUNNEL, FIB_NODE_TYPE_VXLAN_TUNNEL, FIB_NODE_TYPE_MAP_E, + FIB_NODE_TYPE_VXLAN_GPE_TUNNEL, + FIB_NODE_TYPE_GENEVE_TUNNEL, + FIB_NODE_TYPE_UDP_ENCAP, + FIB_NODE_TYPE_BIER_FMASK, + FIB_NODE_TYPE_BIER_ENTRY, /** * Marker. New types before this one. leave the test last. */ FIB_NODE_TYPE_TEST, FIB_NODE_TYPE_LAST = FIB_NODE_TYPE_TEST, -} fib_node_type_t; +} __attribute__ ((packed)) fib_node_type_t; #define FIB_NODE_TYPE_MAX (FIB_NODE_TYPE_LAST + 1) @@ -65,6 +70,10 @@ typedef enum fib_node_type_t_ { [FIB_NODE_TYPE_GRE_TUNNEL] = "gre-tunnel", \ [FIB_NODE_TYPE_VXLAN_TUNNEL] = "vxlan-tunnel", \ [FIB_NODE_TYPE_MAP_E] = "map-e", \ + [FIB_NODE_TYPE_VXLAN_GPE_TUNNEL] = "vxlan-gpe-tunnel", \ + [FIB_NODE_TYPE_UDP_ENCAP] = "udp-encap", \ + [FIB_NODE_TYPE_BIER_FMASK] = "bier-fmask", \ + [FIB_NODE_TYPE_BIER_ENTRY] = "bier-entry", \ } /** @@ -272,21 +281,24 @@ typedef struct fib_node_vft_t_ { /** * An node in the FIB graph * - * Objects in the FIB form a graph. + * Objects in the FIB form a graph. */ typedef struct fib_node_t_ { -#if CLIB_DEBUG > 0 /** * The node's type. make sure we are dynamic/down casting correctly */ fib_node_type_t fn_type; -#endif + + /** + * Some pad space the concrete/derived type is free to use + */ + u16 fn_pad; /** * The node's VFT. * we could store the type here instead, and lookup the VFT using that. But * I like this better, */ - const fib_node_vft_t *fn_vft; +// const fib_node_vft_t *fn_vft; /** * Vector of nodes that depend upon/use/share this node @@ -300,6 +312,8 @@ typedef struct fib_node_t_ { u32 fn_locks; } fib_node_t; +STATIC_ASSERT(sizeof(fib_node_t) == 12, "FIB node type is growing"); + /** * @brief * Register the function table for a given type