mpls_fib_t *mf;
int i;
- pool_get_aligned(mpls_main.fibs, fib_table, CLIB_CACHE_LINE_BYTES);
+ pool_get(mpls_main.fibs, fib_table);
pool_get_aligned(mpls_main.mpls_fibs, mf, CLIB_CACHE_LINE_BYTES);
ASSERT((fib_table - mpls_main.fibs) ==
(mf - mpls_main.mpls_fibs));
- memset(fib_table, 0, sizeof(*fib_table));
+ clib_memset(fib_table, 0, sizeof(*fib_table));
fib_table->ft_proto = FIB_PROTOCOL_MPLS;
fib_table->ft_index = (fib_table - mpls_main.fibs);
}
hash_free(mf->mf_entries);
+ vec_free(fib_table->ft_src_route_counts);
pool_put(mpls_main.mpls_fibs, mf);
pool_put(mpls_main.fibs, fib_table);
}
n_tables = pool_elts(mpls_main.fibs);
mem = n_tables * sizeof(mpls_fib_t);
- s = format(s, "%=30s %=6ld %=8ld\n", "MPLS", n_tables, mem);
+ s = format(s, "%=30s %=6ld %=12ld\n", "MPLS", n_tables, mem);
return (s);
}
pool_foreach (fib_table, mpls_main.fibs,
({
+ fib_source_t source;
+ u8 *s = NULL;
+
if (table_id >= 0 && table_id != fib_table->ft_table_id)
continue;
- vlib_cli_output (vm, "%v, fib_index %d",
- fib_table->ft_desc, mpls_main.fibs - fib_table);
+ s = format (s, "%v, fib_index:%d locks:[",
+ fib_table->ft_desc, mpls_main.fibs - fib_table);
+ vec_foreach_index(source, fib_table->ft_locks)
+ {
+ if (0 != fib_table->ft_locks[source])
+ {
+ s = format(s, "%U:%d, ",
+ format_fib_source, source,
+ fib_table->ft_locks[source]);
+ }
+ }
+ vlib_cli_output (vm, "%v]", s);
if (MPLS_LABEL_INVALID == label)
{