X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fl2%2Fl2_flood.c;h=97a4ff59da7b585bfbeb9cb4e29a113c400b545d;hb=b474380f;hp=97f1387ee945e4d0533d143dfce4392cf197a277;hpb=055b231d25074a2d3cac5d28f3ab0862a57e0630;p=vpp.git diff --git a/src/vnet/l2/l2_flood.c b/src/vnet/l2/l2_flood.c index 97f1387ee94..97a4ff59da7 100644 --- a/src/vnet/l2/l2_flood.c +++ b/src/vnet/l2/l2_flood.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -156,11 +155,12 @@ l2flood_node_fn (vlib_main_t * vm, while (n_left_from > 0 && n_left_to_next > 0) { - u32 next0, sw_if_index0, bi0, ci0; u16 n_clones, n_cloned, clone0; l2_bridge_domain_t *bd_config; + u32 sw_if_index0, bi0, ci0; l2_flood_member_t *member; vlib_buffer_t *b0, *c0; + u16 next0; u8 in_shg; i32 mi; @@ -168,7 +168,7 @@ l2flood_node_fn (vlib_main_t * vm, bi0 = from[0]; from += 1; n_left_from -= 1; - next0 = L2FLOOD_NEXT_DROP; + next0 = L2FLOOD_NEXT_L2_OUTPUT; b0 = vlib_get_buffer (vm, bi0); @@ -214,7 +214,7 @@ l2flood_node_fn (vlib_main_t * vm, vec_reset_length (msm->clones[thread_index]); /* - * the header offset needs to be large enoguh to incorporate + * the header offset needs to be large enough to incorporate * all the L3 headers that could be touched when doing BVI * processing. So take the current l2 length plus 2 * IPv6 * headers (for tunnel encap) @@ -263,7 +263,6 @@ l2flood_node_fn (vlib_main_t * vm, /* Do normal L2 forwarding */ vnet_buffer (c0)->sw_if_index[VLIB_TX] = member->sw_if_index; - next0 = L2FLOOD_NEXT_L2_OUTPUT; vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, @@ -314,7 +313,7 @@ l2flood_node_fn (vlib_main_t * vm, msm->vnet_main, c0, member->sw_if_index, &msm->l3_next, &next0); - if (PREDICT_FALSE (rc)) + if (PREDICT_FALSE (rc != TO_BVI_ERR_OK)) { if (rc == TO_BVI_ERR_BAD_MAC) { @@ -324,13 +323,13 @@ l2flood_node_fn (vlib_main_t * vm, { c0->error = node->errors[L2FLOOD_ERROR_BVI_ETHERTYPE]; } + next0 = L2FLOOD_NEXT_DROP; } } else { /* Do normal L2 forwarding */ vnet_buffer (c0)->sw_if_index[VLIB_TX] = member->sw_if_index; - next0 = L2FLOOD_NEXT_L2_OUTPUT; } vlib_validate_buffer_enqueue_x1 (vm, node, next_index, @@ -373,10 +372,12 @@ VLIB_REGISTER_NODE (l2flood_node,static) = { [L2FLOOD_NEXT_DROP] = "error-drop", }, }; -/* *INDENT-ON* */ VLIB_NODE_FUNCTION_MULTIARCH (l2flood_node, l2flood_node_fn) - clib_error_t *l2flood_init (vlib_main_t * vm) +/* *INDENT-ON* */ + +clib_error_t * +l2flood_init (vlib_main_t * vm) { l2flood_main_t *mp = &l2flood_main;