diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index c6677fb..8d738c2 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -41,6 +41,7 @@
 #include <vnet/bier/bier_fmask.h>
 #include <vnet/bier/bier_table.h>
 #include <vnet/bier/bier_imp.h>
+#include <vnet/bier/bier_disp_table.h>
 
 /**
  * Enurmeration of path types
@@ -286,13 +287,9 @@
 	} recursive;
 	struct {
             /**
-             * The next-hop
+             * BIER FMask ID
              */
-            ip46_address_t fp_nh;
-            /**
-             * The BIER FIB the fmask is in
-             */
-            index_t fp_bier_fib;
+            index_t fp_bier_fmask;
 	} bier_fmask;
 	struct {
             /**
@@ -369,13 +366,13 @@
          */
         fib_node_index_t fp_via_fib;
         /**
-         * the resolving bier-fmask
-         */
-        index_t fp_via_bier_fmask;
-        /**
          * the resolving bier-table
          */
         index_t fp_via_bier_tbl;
+        /**
+         * the resolving bier-fmask
+         */
+        index_t fp_via_bier_fmask;
     };
 
     /**
@@ -409,8 +406,8 @@
 {       		          				\
     u8 *_tmp = NULL;						\
     _tmp = fib_path_format(fib_path_get_index(_p), _tmp);	\
-    clib_warning("path:[%d:%s]:" _fmt,				\
-		 fib_path_get_index(_p), _tmp,			\
+    clib_warning("path:[%d:%U]:" _fmt,				\
+		 fib_path_get_index(_p), format_fib_path, _p, 0,\
 		 ##_args);					\
     vec_free(_tmp);						\
 }
@@ -446,12 +443,17 @@
 u8 *
 format_fib_path (u8 * s, va_list * args)
 {
-    fib_path_t *path = va_arg (*args, fib_path_t *);
+    fib_node_index_t path_index = va_arg (*args, fib_node_index_t);
+    u32 indent = va_arg (*args, u32);
     vnet_main_t * vnm = vnet_get_main();
     fib_path_oper_attribute_t oattr;
     fib_path_cfg_attribute_t cattr;
+    fib_path_t *path;
 
-    s = format (s, "      index:%d ", fib_path_get_index(path));
+    path = fib_path_get(path_index);
+
+    s = format (s, "%Upath:[%d] ", format_white_space, indent,
+                fib_path_get_index(path));
     s = format (s, "pl-index:%d ", path->fp_pl_index);
     s = format (s, "%U ", format_dpo_proto, path->fp_nh_proto);
     s = format (s, "weight=%d ", path->fp_weight);
@@ -473,7 +475,7 @@
 	    }
 	}
     }
-    s = format(s, "\n       ");
+    s = format(s, "\n%U", format_white_space, indent+2);
 
     switch (path->fp_type)
     {
@@ -501,19 +503,20 @@
 	}
 	if (!dpo_id_is_valid(&path->fp_dpo))
 	{
-	    s = format(s, "\n          unresolved");
+	    s = format(s, "\n%Uunresolved", format_white_space, indent+2);
 	}
 	else
 	{
-	    s = format(s, "\n          %U",
-		       format_dpo_id,
+	    s = format(s, "\n%U%U",
+		       format_white_space, indent,
+                       format_dpo_id,
 		       &path->fp_dpo, 13);
 	}
 	break;
     case FIB_PATH_TYPE_ATTACHED:
 	if (path->fp_oper_flags & FIB_PATH_OPER_FLAG_DROP)
 	{
-	    s = format (s, " if_index:%d", path->attached_next_hop.fp_interface);
+	    s = format (s, "if_index:%d", path->attached_next_hop.fp_interface);
 	}
 	else
 	{
@@ -551,7 +554,7 @@
 
 	break;
     case FIB_PATH_TYPE_UDP_ENCAP:
-        s = format (s, " UDP-encap ID:%d", path->udp_encap.fp_udp_encap_id);
+        s = format (s, "UDP-encap ID:%d", path->udp_encap.fp_udp_encap_id);
         break;
     case FIB_PATH_TYPE_BIER_TABLE:
         s = format (s, "via bier-table:[%U}",
@@ -562,14 +565,7 @@
                     path->fp_dpo.dpoi_index);
         break;
     case FIB_PATH_TYPE_BIER_FMASK:
-        s = format (s, "via %U",
-                    format_ip46_address,
-                    &path->bier_fmask.fp_nh,
-                    IP46_TYPE_ANY);
-	s = format (s, " in BIER-fib:%d",
-		    path->bier_fmask.fp_bier_fib,
-		    path->fp_via_fib); 
-	s = format (s, " via-fmask:%d", path->fp_via_bier_fmask); 
+	s = format (s, "via-fmask:%d", path->bier_fmask.fp_bier_fmask); 
 	s = format (s, " via-dpo:[%U:%d]",
 		    format_dpo_type, path->fp_dpo.dpoi_type, 
 		    path->fp_dpo.dpoi_index);
@@ -586,7 +582,7 @@
 	if (dpo_id_is_valid(&path->fp_dpo))
 	{
 	    s = format(s, "%U", format_dpo_id,
-		       &path->fp_dpo, 2);
+		       &path->fp_dpo, indent+2);
 	}
 	break;
     }
@@ -604,29 +600,6 @@
     return (format (s, "%U", format_fib_path, path));
 }
 
-u8 *
-fib_path_adj_format (fib_node_index_t pi,
-		     u32 indent,
-		     u8 *s)
-{
-    fib_path_t *path;
-
-    path = fib_path_get(pi);
-    ASSERT(NULL != path);
-
-    if (!dpo_id_is_valid(&path->fp_dpo))
-    {
-	s = format(s, " unresolved");
-    }
-    else
-    {
-	s = format(s, "%U", format_dpo_id,
-		   &path->fp_dpo, 2);
-    }
-
-    return (s);
-}
-
 /*
  * fib_path_last_lock_gone
  *
@@ -832,7 +805,7 @@
 fib_path_bier_fmask_update (fib_path_t *path,
                             dpo_id_t *dpo)
 {
-    bier_fmask_contribute_forwarding(path->fp_via_bier_fmask, dpo);
+    bier_fmask_contribute_forwarding(path->bier_fmask.fp_bier_fmask, dpo);
 
     /*
      * if we are stakcing on the drop, then the path is not resolved
@@ -893,12 +866,8 @@
 	}
 	break;
     case FIB_PATH_TYPE_BIER_FMASK:
-	if (FIB_NODE_INDEX_INVALID != path->fp_via_bier_fmask)
-	{
-	    bier_fmask_child_remove(path->fp_via_bier_fmask,
-                                    path->fp_sibling);
-	    path->fp_via_bier_fmask = FIB_NODE_INDEX_INVALID;
-	}
+        bier_fmask_child_remove(path->fp_via_bier_fmask,
+                                path->fp_sibling);
 	break;
     case FIB_PATH_TYPE_BIER_IMP:
         bier_imp_unlock(path->fp_dpo.dpoi_index);
@@ -1313,8 +1282,7 @@
     else if (rpath->frp_flags & FIB_ROUTE_PATH_BIER_FMASK)
     {
         path->fp_type = FIB_PATH_TYPE_BIER_FMASK;
-        path->bier_fmask.fp_nh = rpath->frp_addr;
-        path->bier_fmask.fp_bier_fib = rpath->frp_bier_fib_index;
+        path->bier_fmask.fp_bier_fmask = rpath->frp_bier_fmask;
     }
     else if (rpath->frp_flags & FIB_ROUTE_PATH_BIER_IMP)
     {
@@ -1549,14 +1517,8 @@
 	    }
 	    break;
 	case FIB_PATH_TYPE_BIER_FMASK:
-	    res = ip46_address_cmp(&path1->bier_fmask.fp_nh,
-				   &path2->bier_fmask.fp_nh);
- 
-	    if (0 == res)
-	    {
-		res = (path1->bier_fmask.fp_bier_fib -
-                       path2->bier_fmask.fp_bier_fib);
-	    }
+            res = (path1->bier_fmask.fp_bier_fmask -
+                   path2->bier_fmask.fp_bier_fmask);
 	    break;
 	case FIB_PATH_TYPE_BIER_IMP:
             res = (path1->bier_imp.fp_bier_imp -
@@ -1691,13 +1653,7 @@
             }
 	    break;
 	case FIB_PATH_TYPE_BIER_FMASK:
-            res = ip46_address_cmp(&path->bier_fmask.fp_nh,
-                                   &rpath->frp_addr);
-
-            if (0 == res)
-            {
-                res = (path->bier_fmask.fp_bier_fib - rpath->frp_bier_fib_index);
-            }
+            res = (path->bier_fmask.fp_bier_fmask - rpath->frp_bier_fmask);
 	    break;
 	case FIB_PATH_TYPE_BIER_IMP:
             res = (path->bier_imp.fp_bier_imp - rpath->frp_bier_imp);
@@ -1944,26 +1900,14 @@
     case FIB_PATH_TYPE_BIER_FMASK:
     {
         /*
-         * Find the BIER f-mask to link to
-         */
-        bier_fmask_id_t fmid = {
-            .bfmi_nh = path->bier_fmask.fp_nh,
-            .bfmi_hdr_type = BIER_HDR_O_MPLS,
-        };
-
-        ASSERT(FIB_NODE_INDEX_INVALID == path->fp_via_bier_fmask);
-
-        path->fp_via_bier_fmask = bier_fmask_db_find(path->bier_fmask.fp_bier_fib,
-                                                &fmid);
-
-        /*
          * become a dependent child of the entry so the path is
          * informed when the forwarding for the entry changes.
          */
-        path->fp_sibling = bier_fmask_child_add(path->fp_via_bier_fmask,
+        path->fp_sibling = bier_fmask_child_add(path->bier_fmask.fp_bier_fmask,
                                                 FIB_NODE_TYPE_PATH,
                                                 fib_path_get_index(path));
 
+        path->fp_via_bier_fmask = path->bier_fmask.fp_bier_fmask;
         fib_path_bier_fmask_update(path, &path->fp_dpo);
 
         break;
@@ -1996,27 +1940,35 @@
 	break;
     case FIB_PATH_TYPE_DEAG:
     {
-	/*
-	 * Resolve via a lookup DPO.
-         * FIXME. control plane should add routes with a table ID
-	 */
-        lookup_input_t input;
-        lookup_cast_t cast;
+        if (DPO_PROTO_BIER == path->fp_nh_proto)
+        {
+            bier_disp_table_contribute_forwarding(path->deag.fp_tbl_id,
+                                                  &path->fp_dpo);
+        }
+        else
+        {
+            /*
+             * Resolve via a lookup DPO.
+             * FIXME. control plane should add routes with a table ID
+             */
+            lookup_input_t input;
+            lookup_cast_t cast;
 
-        cast = (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_RPF_ID ?
-                LOOKUP_MULTICAST :
-                LOOKUP_UNICAST);
-        input = (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_DEAG_SRC ?
-                LOOKUP_INPUT_SRC_ADDR :
-                LOOKUP_INPUT_DST_ADDR);
+            cast = (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_RPF_ID ?
+                    LOOKUP_MULTICAST :
+                    LOOKUP_UNICAST);
+            input = (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_DEAG_SRC ?
+                     LOOKUP_INPUT_SRC_ADDR :
+                     LOOKUP_INPUT_DST_ADDR);
 
-        lookup_dpo_add_or_lock_w_fib_index(path->deag.fp_tbl_id,
-                                           path->fp_nh_proto,
-                                           cast,
-                                           input,
-                                           LOOKUP_TABLE_FROM_CONFIG,
-                                           &path->fp_dpo);
-	break;
+            lookup_dpo_add_or_lock_w_fib_index(path->deag.fp_tbl_id,
+                                               path->fp_nh_proto,
+                                               cast,
+                                               input,
+                                               LOOKUP_TABLE_FROM_CONFIG,
+                                               &path->fp_dpo);
+        }
+        break;
     }
     case FIB_PATH_TYPE_RECEIVE:
 	/*
@@ -2109,7 +2061,7 @@
     case FIB_PATH_TYPE_RECURSIVE:
 	return (path->fp_via_fib);
     case FIB_PATH_TYPE_BIER_FMASK:
- 	return (path->fp_via_bier_fmask);
+ 	return (path->bier_fmask.fp_bier_fmask);
    case FIB_PATH_TYPE_BIER_TABLE:
        return (path->fp_via_bier_tbl);
    case FIB_PATH_TYPE_BIER_IMP:
@@ -2623,8 +2575,7 @@
         api_rpath->rpath.frp_addr = path->attached_next_hop.fp_nh;
         break;
       case FIB_PATH_TYPE_BIER_FMASK:
-        api_rpath->rpath.frp_fib_index = path->bier_fmask.fp_bier_fib;
-        api_rpath->rpath.frp_addr = path->bier_fmask.fp_nh;
+        api_rpath->rpath.frp_bier_fmask = path->bier_fmask.fp_bier_fmask;
         break;
       case FIB_PATH_TYPE_SPECIAL:
         break;
@@ -2673,7 +2624,7 @@
 	if (!pool_is_free_index(fib_path_pool, pi))
 	{
 	    path = fib_path_get(pi);
-	    u8 *s = fib_path_format(pi, NULL);
+	    u8 *s = format(NULL, "%U", format_fib_path, pi, 1);
 	    s = format(s, "children:");
 	    s = fib_node_children_format(path->fp_node.fn_children, s);
 	    vlib_cli_output (vm, "%s", s);
