From patchwork Thu Dec 20 10:56:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Freimann X-Patchwork-Id: 49172 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8874A1BA8F; Thu, 20 Dec 2018 11:56:32 +0100 (CET) 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Maxime Coquelin --- 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); }