From: Eyal Bari Date: Sun, 2 Sep 2018 14:08:22 +0000 (+0300) Subject: l2_output:skip processing if no features are enabled X-Git-Tag: v18.10-rc1~277 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F14614%2F3;p=vpp.git l2_output:skip processing if no features are enabled Change-Id: I7fcc082376b451c6179ec2ef58f98c931adfed27 Signed-off-by: Eyal Bari --- diff --git a/src/vnet/l2/l2_output.c b/src/vnet/l2/l2_output.c index 2811215307f..321a531e19f 100644 --- a/src/vnet/l2/l2_output.c +++ b/src/vnet/l2/l2_output.c @@ -260,8 +260,12 @@ l2output_process_batch (vlib_main_t * vm, vlib_node_runtime_t * node, { u32 feature_bitmap = config->feature_bitmap & ~L2OUTPUT_FEAT_OUTPUT; if (config->shg == 0 && feature_bitmap == 0) - l2output_process_batch_inline (vm, node, config, b, cdo, next, n_left, - l2_efp, l2_vtr, l2_pbb, 0, 0); + { + if ((l2_efp | l2_vtr | l2_pbb) == 0) + return; + l2output_process_batch_inline (vm, node, config, b, cdo, next, n_left, + l2_efp, l2_vtr, l2_pbb, 0, 0); + } else if (config->shg == 0) l2output_process_batch_inline (vm, node, config, b, cdo, next, n_left, l2_efp, l2_vtr, l2_pbb, 0, 1);