net/virtio: avoid double accounting of bytes
authorJens Freimann <jfreimann@redhat.com>
Thu, 20 Dec 2018 10:56:24 +0000 (11:56 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Dec 2018 15:22:41 +0000 (16:22 +0100)
Accounting of bytes was moved to a common function, so at the moment we do
it twice. This patches fixes it for sending packets with packed virtqueues.

Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_rxtx.c

index 8564f18..8a08606 100644 (file)
@@ -1931,7 +1931,6 @@ virtio_xmit_pkts_packed(void *tx_queue, struct rte_mbuf **tx_pkts,
                /* Enqueue Packet buffers */
                virtqueue_enqueue_xmit_packed(txvq, txm, slots, can_push);
 
-               txvq->stats.bytes += txm->pkt_len;
                virtio_update_packet_stats(&txvq->stats, txm);
        }