[dpdk-dev,v2] net/virtio: remove the redundant computing
Checks
Commit Message
The minor change aims to remove the redundant computing and make
it easier to understand the code.
Cc: yuanhan.liu@linux.intel.com
Cc: maxime.coquelin@redhat.com
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
v2 changes:
remove the prefix "fix" and fixline according to yuanhan's advice.
drivers/net/virtio/virtio_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Feb 23, 2017 at 03:11:42PM +0800, Zhiyong Yang wrote:
> The minor change aims to remove the redundant computing and make
> it easier to understand the code.
>
> Cc: yuanhan.liu@linux.intel.com
> Cc: maxime.coquelin@redhat.com
>
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Applied to dpdk-next-virtio.
Thanks.
--yliu
@@ -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);
}