#include <vnet/fib/fib_path_list.h>
#include <vnet/fib/fib_test.h>
#include <vnet/fib/fib_table.h>
+#include <vnet/fib/mpls_fib.h>
#include <vnet/dpo/replicate_dpo.h>
#include <vnet/adj/adj_mcast.h>
static int
mfib_test_validate_rep_v (const replicate_t *rep,
u16 n_buckets,
- va_list ap)
+ va_list *ap)
{
const dpo_id_t *dpo;
adj_index_t ai;
for (bucket = 0; bucket < n_buckets; bucket++)
{
- dt = va_arg(ap, int); // type promotion
- ai = va_arg(ap, adj_index_t);
+ dt = va_arg(*ap, int); // type promotion
+ ai = va_arg(*ap, adj_index_t);
dpo = replicate_get_bucket_i(rep, bucket);
MFIB_TEST_REP((dt == dpo->dpoi_type),
format_mfib_prefix, &pfx,
format_dpo_type, tmp.dpoi_type);
- res = mfib_test_validate_rep_v(rep, n_buckets, ap);
+ res = mfib_test_validate_rep_v(rep, n_buckets, &ap);
dpo_reset(&tmp);
}
MFIB_TEST(3 == adj_mcast_db_size(), "3 MCAST adjs");
/* Find or create FIB table 11 */
- fib_index = mfib_table_find_or_create_and_lock(PROTO, 11);
+ fib_index = mfib_table_find_or_create_and_lock(PROTO, 11, MFIB_SOURCE_API);
mfib_prefix_t pfx_dft = {
.fp_len = 0,
/*
* MPLS enable an interface so we get the MPLS table created
*/
+ mpls_table_create(MPLS_FIB_DEFAULT_TABLE_ID, FIB_SOURCE_API, NULL);
mpls_sw_interface_enable_disable(&mpls_main,
tm->hw[0]->sw_if_index,
- 1);
+ 1, 0);
lfei = fib_table_entry_update_one_path(0, // default MPLS Table
&pfx_3500,
/*
* Unlock the table - it's the last lock so should be gone thereafter
*/
- mfib_table_unlock(fib_index, PROTO);
+ mfib_table_unlock(fib_index, PROTO, MFIB_SOURCE_API);
MFIB_TEST((FIB_NODE_INDEX_INVALID ==
mfib_table_find(PROTO, fib_index)),
*/
mpls_sw_interface_enable_disable(&mpls_main,
tm->hw[0]->sw_if_index,
- 0);
+ 0, 0);
+ mpls_table_delete(MPLS_FIB_DEFAULT_TABLE_ID, FIB_SOURCE_API);
/*
* test we've leaked no resources