All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Zhiyong Yang <zhiyong.yang@intel.com>
Cc: dev@dpdk.org, maxime.coquelin@redhat.com
Subject: Re: [PATCH] net/virtio: fix remove the redundant computing
Date: Thu, 23 Feb 2017 14:20:48 +0800	[thread overview]
Message-ID: <20170223062048.GW18844@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1487824113-41570-1-git-send-email-zhiyong.yang@intel.com>

On Thu, Feb 23, 2017 at 12:28:33PM +0800, Zhiyong Yang wrote:
> This is not a bug.

Then adding "fix" prefix and fixline here doesn't seem proper to me.

> The minor change aims to remove the redundant
> computing and make it easier to understand the code.
> Fixes:01ad44fd374f("net/virtio: split Rx/Tx queue")
> Cc: yuanhan.liu@linux.intel.com
> Cc: maxime.coquelin@redhat.com
> 
> Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
> ---
>  drivers/net/virtio/virtio_rxtx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index cab6e8f..14c88c0 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -791,9 +791,9 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
>  
>  		VIRTIO_DUMP_PACKET(rxm, rxm->data_len);
>  
> -		rx_pkts[nb_rx++] = rxm;
> +		rx_pkts[nb_rx] = rxm;
>  
> -		rxvq->stats.bytes += rx_pkts[nb_rx - 1]->pkt_len;
> +		rxvq->stats.bytes += rx_pkts[nb_rx++]->pkt_len;

Why not use "rxm->pkt_len" directly?

	--yliu

  reply	other threads:[~2017-02-23  6:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23  4:28 [PATCH] net/virtio: fix remove the redundant computing Zhiyong Yang
2017-02-23  6:20 ` Yuanhan Liu [this message]
2017-02-23  6:31   ` Yang, Zhiyong
2017-02-23  7:11 ` [PATCH v2] net/virtio: " Zhiyong Yang
2017-02-23  7:34   ` Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170223062048.GW18844@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=zhiyong.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.