memif: 14 bytes extra overhead issue fixed. 93/21793/4
authorMrityunjay Kumar <kumarnitp@gmail.com>
Thu, 5 Sep 2019 05:10:25 +0000 (05:10 +0000)
committerDamjan Marion <dmarion@me.com>
Thu, 14 May 2020 12:24:31 +0000 (12:24 +0000)
Type: fix

Signed-off-by: Mrityunjay Kumar <kumarnitp@gmail.com>
Change-Id: I31cc5e853b57e285064647503231b251e5152d3f

src/plugins/memif/node.c

index aef8ffb..dd8f9ba 100644 (file)
@@ -596,7 +596,7 @@ memif_device_input_zc_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
       d0 = &ring->desc[s0];
       hb = b0 = vlib_get_buffer (vm, bi0);
       b0->current_data = start_offset;
-      b0->current_length = start_offset + d0->length;
+      b0->current_length = d0->length;
       n_rx_bytes += d0->length;
 
       if (0 && memif_desc_is_invalid (mif, d0, buffer_length))
@@ -619,7 +619,7 @@ memif_device_input_zc_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
          /* current buffer */
          b0 = vlib_get_buffer (vm, bi0);
          b0->current_data = start_offset;
-         b0->current_length = start_offset + d0->length;
+         b0->current_length = d0->length;
          hb->total_length_not_including_first_buffer += d0->length;
          n_rx_bytes += d0->length;