X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdpo%2Flookup_dpo.c;h=3bda3b8118661e335542c77edfde9f672f6016bf;hb=ae8098350cb7b96f7495fa4d4180238064256e14;hp=ebdbc127cc609d0642d2f78886e8002418acb33e;hpb=ce9e0b4d48705d693f4e03093e3f506bdecaf141;p=vpp.git diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c index ebdbc127cc6..3bda3b81186 100644 --- a/src/vnet/dpo/lookup_dpo.c +++ b/src/vnet/dpo/lookup_dpo.c @@ -1305,9 +1305,9 @@ lookup_dpo_ip_dst_mcast_inline (vlib_main_t * vm, ip6_header_t * ip0; ip0 = vlib_buffer_get_current (b0); - mfei0 = ip6_mfib_table_lookup2(ip6_mfib_get(fib_index0), - &ip0->src_address, - &ip0->dst_address); + mfei0 = ip6_mfib_table_fwd_lookup(ip6_mfib_get(fib_index0), + &ip0->src_address, + &ip0->dst_address); if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) { lookup_trace_t *tr = vlib_add_trace (vm, node, @@ -1482,6 +1482,46 @@ const static char* const * const lookup_dst_from_interface_nodes[DPO_PROTO_NUM] [DPO_PROTO_MPLS] = lookup_dst_from_interface_mpls_nodes, }; +static clib_error_t * +lookup_dpo_show (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + index_t lkdi = INDEX_INVALID; + + while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT) + { + if (unformat (input, "%d", &lkdi)) + ; + else + break; + } + + if (INDEX_INVALID != lkdi) + { + vlib_cli_output (vm, "%U", format_lookup_dpo, lkdi); + } + else + { + lookup_dpo_t *lkd; + + pool_foreach(lkd, lookup_dpo_pool, + ({ + vlib_cli_output (vm, "[@%d] %U", + lookup_dpo_get_index(lkd), + format_lookup_dpo, + lookup_dpo_get_index(lkd)); + })); + } + + return 0; +} + +VLIB_CLI_COMMAND (replicate_show_command, static) = { + .path = "show lookup-dpo", + .short_help = "show lookup-dpo []", + .function = lookup_dpo_show, +}; void lookup_dpo_module_init (void)