MPLS Unifom mode
[vpp.git] / src / vnet / mfib / mfib_test.c
index 2562bc1..f60d428 100644 (file)
@@ -180,7 +180,7 @@ mfib_test_mk_intf (u32 ninterfaces)
 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;
@@ -192,8 +192,8 @@ mfib_test_validate_rep_v (const replicate_t *rep,
 
     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),
@@ -232,7 +232,7 @@ fib_forw_chain_type_from_fib_proto (fib_protocol_t proto)
 static int
 mfib_test_entry (fib_node_index_t fei,
                  mfib_entry_flags_t eflags,
-                 u16 n_buckets,
+                 int n_buckets,
                  ...)
 {
     const mfib_entry_t *mfe;
@@ -275,7 +275,7 @@ mfib_test_entry (fib_node_index_t fei,
                       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);
     }
@@ -1108,8 +1108,10 @@ mfib_test_i (fib_protocol_t PROTO,
            .eos = MPLS_EOS,
        },
     };
-    mpls_label_t *l3300 = NULL;
-    vec_add1(l3300, 3300);
+    fib_mpls_label_t *l3300 = NULL, fml3300 = {
+        .fml_value = 3300,
+    };
+    vec_add1(l3300, fml3300);
 
     /*
      * MPLS enable an interface so we get the MPLS table created