aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_fib.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-07-08 12:25:38 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-07-09 02:23:00 +0000
commit32dcd3b2f227dec638c39ade0c58d6741d83ec30 (patch)
tree8d9a2a1761b5d5c6ec88445b9385ef8c991df535 /src/vnet/l2/l2_fib.c
parent369db83f91a411977015748a74c5a4579170a16c (diff)
vppinfra: allocate bihash virtual space on demand
Reduces the vpp image virtual size by multiple gigabytes Add a "show bihash" command which displays configured and current virtual space in use by bihash tables. Modify the .py test framework to call "show bihash" on test tear-down Type: refactor Change-Id: Ifc1b7e2c43d29bbef645f6802fa29ff8ef09940c Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/l2/l2_fib.c')
-rw-r--r--src/vnet/l2/l2_fib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index fc518fe9dbf..b7646cac4cd 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -1000,6 +1000,10 @@ l2fib_scan (vlib_main_t * vm, f64 start_time, u8 event_only)
vl_api_l2_macs_event_t *mp = 0;
vl_api_registration_t *reg = 0;
+ /* Don't scan the l2 fib if it hasn't been instantiated yet */
+ if (alloc_arena (h) == 0)
+ return 0.0;
+
if (client)
{
mp = allocate_mac_evt_buf (client, cl_idx);