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 9EB011BD2A for ; Thu, 20 Dec 2018 19:01:36 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EABE041A51; Thu, 20 Dec 2018 18:01:35 +0000 (UTC) Received: from [10.36.112.60] (ovpn-112-60.ams2.redhat.com [10.36.112.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 090ED27CD5; Thu, 20 Dec 2018 18:01:31 +0000 (UTC) To: Jens Freimann , dev@dpdk.org Cc: tiwei.bie@intel.com References: <20181220105624.31046-1-jfreimann@redhat.com> From: Maxime Coquelin Message-ID: <6b65a101-3293-004b-5220-972e394f81d2@redhat.com> Date: Thu, 20 Dec 2018 19:01:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181220105624.31046-1-jfreimann@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 20 Dec 2018 18:01:36 +0000 (UTC) Subject: Re: [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 18:01:36 -0000 On 12/20/18 11:56 AM, Jens Freimann wrote: > 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); > } > > Thanks Jens for the quick fix: Reviewed-by: Maxime Coquelin Maxime