net/virtio: fix Tx packet length stats
authorZhiyong Yang <zhiyong.yang@intel.com>
Tue, 24 Oct 2017 03:06:14 +0000 (11:06 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 24 Oct 2017 19:31:48 +0000 (21:31 +0200)
commitf1216c1eca5a54706af9f13133d06b3477099f8b
tree58ab5f9e448757c22514daa7fcf50ba60b074332
parent1d8161ba02abf28131e52e74f72af4f9cdc75907
net/virtio: fix Tx packet length stats

In the function virtqueue_enqueue_xmit(), when can_push is true,
vtnet_hdr_size is added to pkt_len by calling rte_pktmbuf_prepend.
which is wrong for pkt stats, virtio header length should be subtracted
before calling stats function.

Fixes: 58169a9c8153 ("net/virtio: support Tx checksum offload")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
drivers/net/virtio/virtio_rxtx.c