X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fbier%2Fbier_imp.c;h=2da3f668cacae0e333e05a4bcacc13b9271f8f07;hb=0c936b147f4fc52bdb685f701bc7d93959a1a6a2;hp=bd934b77f16b3eed1bd07571d2ab6432db953c69;hpb=f051072f8518097cbce1a8a20510c4e43cb7167c;p=vpp.git diff --git a/src/vnet/bier/bier_imp.c b/src/vnet/bier/bier_imp.c index bd934b77f16..2da3f668cac 100644 --- a/src/vnet/bier/bier_imp.c +++ b/src/vnet/bier/bier_imp.c @@ -17,7 +17,7 @@ * * A BIER imposition object is present in the IP mcast output list * and represents the imposition of a BIER bitmask. After BIER header - * imposition the packet is forward within the appropriate/specifid + * imposition the packet is forward within the appropriate/specified * BIER table */ @@ -68,7 +68,7 @@ bier_imp_add_or_lock (const bier_table_id_t *bti, pool_get_aligned(bier_imp_pool, bi, CLIB_CACHE_LINE_BYTES); bi->bi_tbl = *bti; - btii = bier_table_add_or_lock(bti, MPLS_LABEL_INVALID); + btii = bier_table_lock(bti); /* * init the BIER header we will paint on in the data plane @@ -80,7 +80,7 @@ bier_imp_add_or_lock (const bier_table_id_t *bti, 0, // entropy sender); bier_hdr_hton(&bi->bi_hdr); - clib_memcpy(&bi->bi_bits, bs->bbs_buckets, bs->bbs_len); + clib_memcpy_fast(&bi->bi_bits, bs->bbs_buckets, bs->bbs_len); bier_imp_lock_i(bi); @@ -275,8 +275,15 @@ show_bier_imp (vlib_main_t * vm, } else { - vlib_cli_output(vm, "%U", format_bier_imp, bii, 1, - BIER_SHOW_DETAIL); + if (pool_is_free_index(bier_imp_pool, bii)) + { + vlib_cli_output(vm, "No such BIER imposition: %d", bii); + } + else + { + vlib_cli_output(vm, "%U", format_bier_imp, bii, 1, + BIER_SHOW_DETAIL); + } } return (NULL); }