Typos. A bunch of typos I've been collecting.
[vpp.git] / src / vnet / bier / bier_disp_entry.c
index 3326aba..98508ad 100644 (file)
  * limitations under the License.
  */
 /**
- * bier_dispositon : The BIER dispositon object
+ * bier_dispositon : The BIER disposition object
  *
- * A BIER dispositon object is present in the IP mcast output list
- * and represents the dispositon of a BIER bitmask. After BIER header
- * dispositon the packet is forward within the appropriate/specifid
+ * A BIER disposition object is present in the IP mcast output list
+ * and represents the disposition of a BIER bitmask. After BIER header
+ * disposition the packet is forward within the appropriate/specified
  * BIER table
  */
 
@@ -145,6 +145,7 @@ bier_disp_entry_restack (bier_disp_entry_t *bde,
         fib_path_list_contribute_forwarding(pli,
                                             fib_forw_chain_type_from_dpo_proto(
                                                 bier_hdr_proto_to_dpo(pproto)),
+                                            FIB_PATH_LIST_FWD_FLAG_COLLAPSE,
                                             &via_dpo);
 
         bier_disp_entry_path_list_walk_ctx_t ctx = {
@@ -254,24 +255,26 @@ format_bier_disp_entry (u8* s, va_list *args)
 
     bde = bier_disp_entry_get(bdei);
 
-    s = format(s, "bier-disp:[%d]", bdei);
+    s = format(s, "%Ubier-disp:[%d]", format_white_space, indent, bdei);
 
     FOR_EACH_BIER_HDR_PROTO(pproto)
     {
         if (INDEX_INVALID != bde->bde_pl[pproto])
         {
-            s = format(s, "\n");
-            s = fib_path_list_format(bde->bde_pl[pproto], s);
+            s = format(s, "\n%U%U\n",
+                       format_white_space, indent+2,
+                       format_bier_hdr_proto, pproto);
+            s = format(s, "%U", format_fib_path_list, bde->bde_pl[pproto], indent+4);
 
             if (flags & BIER_SHOW_DETAIL)
             {
                 s = format(s, "\n%UForwarding:",
-                           format_white_space, indent);
+                           format_white_space, indent+4);
                 s = format(s, "\n%Urpf-id:%d",
-                           format_white_space, indent+1,
+                           format_white_space, indent+6,
                            bde->bde_fwd[pproto].bde_rpf_id);
                 s = format(s, "\n%U%U",
-                           format_white_space, indent+1,
+                           format_white_space, indent+6,
                            format_dpo_id, &bde->bde_fwd[pproto].bde_dpo, indent+2);
             }
         }
@@ -312,7 +315,7 @@ bier_disp_entry_dpo_unlock (dpo_id_t *dpo)
 static void
 bier_disp_entry_dpo_mem_show (void)
 {
-    fib_show_memory_usage("BIER dispositon",
+    fib_show_memory_usage("BIER disposition",
                           pool_elts(bier_disp_entry_pool),
                           pool_len(bier_disp_entry_pool),
                           sizeof(bier_disp_entry_t));
@@ -372,8 +375,15 @@ show_bier_disp_entry (vlib_main_t * vm,
     }
     else
     {
-        vlib_cli_output(vm, "%U", format_bier_disp_entry, bdei, 1,
-                        BIER_SHOW_DETAIL);
+        if (pool_is_free_index(bier_disp_entry_pool, bdei))
+        {
+            vlib_cli_output(vm, "No such BIER disp entry: %d", bdei);
+        }
+        else
+        {
+            vlib_cli_output(vm, "%U", format_bier_disp_entry, bdei, 1,
+                            BIER_SHOW_DETAIL);
+        }
     }
     return (NULL);
 }