summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-06-19 20:25:37 +0200
committerDamjan Marion <dmarion@me.com>2019-06-20 03:43:28 +0000
commit5e1794dc93cc2371068b4919b5e607716cafe8e1 (patch)
tree699ddf4d1bd5edf173b2cd99d26dda50d97fb09e /src/vnet
parent97d54ed43eb69f6ea731c02305ebe0ca0b1a5cc4 (diff)
tap: fix the total length of packet for stats byte
Type: fix Fixes: 8389fb9 Change-Id: I31076db78507736631609146d4cca28597aca704 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/devices/virtio/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index 686d90c3d00..4602d566055 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -313,12 +313,12 @@ virtio_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{
virtio_input_trace_t *tr;
vlib_trace_buffer (vm, node, next0, b0,
- /* follow_chain */ 0);
+ /* follow_chain */ 1);
vlib_set_trace_count (vm, node, --n_trace);
tr = vlib_add_trace (vm, node, b0, sizeof (*tr));
tr->next_index = next0;
tr->hw_if_index = vif->hw_if_index;
- tr->len = len;
+ tr->len = len + b0->total_length_not_including_first_buffer;
clib_memcpy_fast (&tr->hdr, hdr, hdr_sz);
}
@@ -336,7 +336,7 @@ virtio_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
/* next packet */
n_rx_packets++;
- n_rx_bytes += len;
+ n_rx_bytes += (len + b0->total_length_not_including_first_buffer);
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}