X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fl2%2Fl2_output.c;h=e15f0ac45b2d0619c6c49397d374c1819a91f5f2;hb=178cf493d009995b28fdf220f04c98860ff79a9b;hp=4b933315a8c9edcc0af678ede9910733cc7cb3f6;hpb=a23caded85ebc754b8e355d04cc747adfde5d467;p=vpp.git diff --git a/src/vnet/l2/l2_output.c b/src/vnet/l2/l2_output.c index 4b933315a8c..e15f0ac45b2 100644 --- a/src/vnet/l2/l2_output.c +++ b/src/vnet/l2/l2_output.c @@ -50,6 +50,7 @@ format_l2_output_features (u8 * s, va_list * args) #undef _ }; u32 feature_bitmap = va_arg (*args, u32); + u32 verbose = va_arg (*args, u32); if (feature_bitmap == 0) { @@ -59,8 +60,18 @@ format_l2_output_features (u8 * s, va_list * args) int i; for (i = L2OUTPUT_N_FEAT - 1; i >= 0; i--) - if (feature_bitmap & (1 << i)) - s = format (s, "%17s (%s)\n", display_names[i], l2output_feat_names[i]); + { + if (feature_bitmap & (1 << i)) + { + if (verbose) + s = + format (s, "%17s (%s)\n", display_names[i], + l2output_feat_names[i]); + else + s = format (s, "%s ", l2output_feat_names[i]); + } + } + return s; } @@ -415,9 +426,9 @@ VLIB_NODE_FN (l2output_node) (vlib_main_t * vm, vlib_add_trace (vm, node, b[0], sizeof (*t)); t->sw_if_index = vnet_buffer (b[0])->sw_if_index[VLIB_TX]; h = vlib_buffer_get_current (b[0]); - clib_memcpy (t->src, h->src_address, 6); - clib_memcpy (t->dst, h->dst_address, 6); - clib_memcpy (t->raw, &h->type, sizeof (t->raw)); + clib_memcpy_fast (t->src, h->src_address, 6); + clib_memcpy_fast (t->dst, h->dst_address, 6); + clib_memcpy_fast (t->raw, &h->type, sizeof (t->raw)); } /* next */ n_left--; @@ -612,7 +623,8 @@ l2output_intf_config (u32 sw_if_index) /** Enable (or disable) the feature in the bitmap for the given interface. */ void -l2output_intf_bitmap_enable (u32 sw_if_index, u32 feature_bitmap, u32 enable) +l2output_intf_bitmap_enable (u32 sw_if_index, + l2output_feat_masks_t feature_bitmap, u32 enable) { l2output_main_t *mp = &l2output_main; l2_output_config_t *config;