From: Zhiyong Yang Date: Thu, 23 Feb 2017 07:11:42 +0000 (+0800) Subject: net/virtio: remove the redundant computing X-Git-Tag: spdx-start~3924 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f53fe364d6d982a2f18bd941f4750721dd68739e;p=dpdk.git net/virtio: remove the redundant computing The minor change aims to remove the redundant computing and make it easier to understand the code. Signed-off-by: Zhiyong Yang --- diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index cab6e8fc06..fcd9e9304f 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -793,7 +793,7 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rx_pkts[nb_rx++] = rxm; - rxvq->stats.bytes += rx_pkts[nb_rx - 1]->pkt_len; + rxvq->stats.bytes += rxm->pkt_len; virtio_update_packet_stats(&rxvq->stats, rxm); }