From 630b9741659b9a4b68c64ebbeb675761c6f26842 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Sat, 25 Nov 2017 10:04:32 -0800 Subject: FIB: store the node type not the function pointer. Saves memory at no appreciable performance cost. before: DBGvpp# sh fib mem FIB memory Name Size in-use /allocated totals Entry 80 7 / 150 560/12000 after: DBGvpp# sh fib mem FIB memory Name Size in-use /allocated totals Entry 72 7 / 7 504/504 Change-Id: Ic5d3920ceb57b54260dc9af2078c26484335fef1 Signed-off-by: Neale Ranns --- src/vnet/gre/interface.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/vnet/gre/interface.c') diff --git a/src/vnet/gre/interface.c b/src/vnet/gre/interface.c index d574e596779..ae5da93e0f0 100644 --- a/src/vnet/gre/interface.c +++ b/src/vnet/gre/interface.c @@ -153,9 +153,7 @@ gre_tunnel_db_remove (const gre_tunnel_t *t) static gre_tunnel_t * gre_tunnel_from_fib_node (fib_node_t *node) { -#if (CLIB_DEBUG > 0) ASSERT(FIB_NODE_TYPE_GRE_TUNNEL == node->fn_type); -#endif return ((gre_tunnel_t*) (((char*)node) - STRUCT_OFFSET_OF(gre_tunnel_t, node))); } -- cgit 1.2.3-korg