summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2018-09-02 17:08:22 +0300
committerDamjan Marion <dmarion@me.com>2018-09-04 17:28:49 +0000
commitceb8d5afcb43327eaee019848fad1a57e7aecc6e (patch)
treec2c33778087a807f506814a58c0321459c05f083
parent3b9bf6f1b48f983ec9a383389ca55b1b15c306e1 (diff)
l2_output:skip processing if no features are enabled
Change-Id: I7fcc082376b451c6179ec2ef58f98c931adfed27 Signed-off-by: Eyal Bari <ebari@cisco.com>
-rw-r--r--src/vnet/l2/l2_output.c8
1 files changed, 6 insertions, 2 deletions
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);