From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id B616F1B94E for ; Thu, 20 Dec 2018 11:56:30 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 217E3C059B88; Thu, 20 Dec 2018 10:56:30 +0000 (UTC) Received: from localhost (unknown [10.36.118.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90C4E5D76C; Thu, 20 Dec 2018 10:56:25 +0000 (UTC) From: Jens Freimann To: dev@dpdk.org Cc: tiwei.bie@intel.com, maxime.coquelin@redhat.com Date: Thu, 20 Dec 2018 11:56:24 +0100 Message-Id: <20181220105624.31046-1-jfreimann@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 20 Dec 2018 10:56:30 +0000 (UTC) Subject: [dpdk-dev] [PATCH] net/virtio: avoid double accounting of bytes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2018 10:56:31 -0000 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 --- drivers/net/virtio/virtio_rxtx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 8564f18a7..8a08606fb 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -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); } -- 2.17.2