aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-09-22 16:37:29 +0200
committerJohn Lo <loj@cisco.com>2016-09-22 22:47:34 +0000
commitb1136586a094f867f9bf2f3d76af2694026c78c8 (patch)
tree427ae3feaee9afe3d1cf39ebbba8be8409c5c020 /vnet
parent87e40696d37492e470ff103a11ff3672d0f1e965 (diff)
l2_output: fix packet drop error reporting when mapping is in progress
Change-Id: I64aa4c28e87e82a742313e9b89409c957fa62101 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/l2/l2_output.h12
1 files changed, 11 insertions, 1 deletions
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;