From b1136586a094f867f9bf2f3d76af2694026c78c8 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 22 Sep 2016 16:37:29 +0200 Subject: l2_output: fix packet drop error reporting when mapping is in progress Change-Id: I64aa4c28e87e82a742313e9b89409c957fa62101 Signed-off-by: Damjan Marion --- vnet/vnet/l2/l2_output.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vnet/vnet/l2/l2_output.h b/vnet/vnet/l2/l2_output.h index 0aabbc0505a..6a846f377ba 100644 --- a/vnet/vnet/l2/l2_output.h +++ b/vnet/vnet/l2/l2_output.h @@ -123,7 +123,8 @@ _(L2OUTPUT, "L2 output packets") \ _(EFP_DROP, "L2 EFP filter pre-rewrite drops") \ _(VTR_DROP, "L2 output tag rewrite drops") \ _(SHG_DROP, "L2 split horizon drops") \ -_(DROP, "L2 output drops") +_(DROP, "L2 output drops") \ +_(MAPPING_DROP, "L2 Output interface mapping in progress") typedef enum { @@ -245,6 +246,15 @@ l2_output_dispatch (vlib_main_t * vlib_main, sw_if_index, &next_nodes->output_node_index_vec); + if (*next0 == L2OUTPUT_NEXT_DROP) + { + vnet_hw_interface_t *hw0; + hw0 = vnet_get_sup_hw_interface (vnet_main, sw_if_index); + + if (hw0->flags & VNET_HW_INTERFACE_FLAG_L2OUTPUT_MAPPED) + b0->error = node->errors[L2OUTPUT_ERROR_MAPPING_DROP]; + } + /* Update the one-entry cache */ *cached_sw_if_index = sw_if_index; *cached_next_index = *next0; -- cgit 1.2.3-korg