diff options
author | John Lo <loj@cisco.com> | 2016-05-31 16:25:13 -0400 |
---|---|---|
committer | John Lo <loj@cisco.com> | 2016-05-31 16:25:13 -0400 |
commit | 245576a4389a9b21b27314afa04722f589676b47 (patch) | |
tree | 3a9b27a1fe66fd374436f7da1c7f3dfb63146553 | |
parent | 68660906e60416dcb573402bff5a40b26c2213c2 (diff) |
VPP97: Flooding of pkts with multiple buffers in BD with BVI crashes VPP
The loopback interface should use vnet_interface_output_no_flatten so
follow-on buffers of a jumbo packet do not get put on the output frame
and be sent back to ethernet-input or l2-input node.
The replication_recycle_callback() function should not assume follow-on
buffers of a jumbo packet are on the buffer free list.
Change-Id: Ide646a6d9b43e82782c0581ea3022a9e70f82582
Signed-off-by: John Lo <loj@cisco.com>
-rw-r--r-- | vnet/vnet/ethernet/interface.c | 1 | ||||
-rw-r--r-- | vnet/vnet/replication.c | 11 |
2 files changed, 3 insertions, 9 deletions
diff --git a/vnet/vnet/ethernet/interface.c b/vnet/vnet/ethernet/interface.c index 833ee3008b1..76b8a9c7449 100644 --- a/vnet/vnet/ethernet/interface.c +++ b/vnet/vnet/ethernet/interface.c @@ -343,6 +343,7 @@ VNET_DEVICE_CLASS (ethernet_simulated_device_class) = { .format_device_name = format_simulated_ethernet_name, .tx_function = simulated_ethernet_interface_tx, .admin_up_down_function = simulated_ethernet_admin_up_down, + .no_flatten_output_chains = 1, }; int vnet_create_loopback_interface (u32 * sw_if_indexp, u8 *mac_address) diff --git a/vnet/vnet/replication.c b/vnet/vnet/replication.c index 9e614ada69d..4e12f0b89dd 100644 --- a/vnet/vnet/replication.c +++ b/vnet/vnet/replication.c @@ -148,7 +148,6 @@ static void replication_recycle_callback (vlib_main_t *vm, u32 * to_next = 0; u32 bi0, pi0; vlib_buffer_t *b0; - vlib_buffer_t *bnext0; int i; replication_main_t * rm = &replication_main; replication_context_t * ctx; @@ -208,8 +207,8 @@ static void replication_recycle_callback (vlib_main_t *vm, pi0 = from[1]; vlib_prefetch_buffer_with_index(vm,pi0,LOAD); } - - bnext0 = b0 = vlib_get_buffer (vm, bi0); + + b0 = vlib_get_buffer (vm, bi0); // Mark that this buffer was just recycled b0->flags |= VLIB_BUFFER_IS_RECYCLED; @@ -218,12 +217,6 @@ static void replication_recycle_callback (vlib_main_t *vm, if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED)) f->flags |= VLIB_FRAME_TRACE; - while (bnext0->flags & VLIB_BUFFER_NEXT_PRESENT) - { - from += 1; - n_left_from -= 1; - bnext0 = vlib_get_buffer (vm, bnext0->next_buffer); - } to_next[0] = bi0; from++; |