DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Jianfeng Tan <jianfeng.tan@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] examples/vhost: fix statistics error
Date: Thu, 3 Dec 2015 14:28:31 +0800	[thread overview]
Message-ID: <20151203062831.GZ2325@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1449098426-128162-1-git-send-email-jianfeng.tan@intel.com>

On Thu, Dec 03, 2015 at 07:20:26AM +0800, Jianfeng Tan wrote:
> This issue was discovered under the case of software vm2vm
> fowarding. When pkts are received from virtio device 0 and
> tx_route to virtio device 1, tx of device 0 is not updated.
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> Tested-by: Qian Xu <qian.q.xu@intel.com>

Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Thanks.

	--yliu
> ---
>  examples/vhost/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index 9bfda6d..dc3a012 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -1050,8 +1050,8 @@ virtio_tx_local(struct vhost_dev *vdev, struct rte_mbuf *m)
>  					rte_atomic64_add(
>  					&dev_statistics[tdev->device_fh].rx_atomic,
>  					ret);
> -					dev_statistics[tdev->device_fh].tx_total++;
> -					dev_statistics[tdev->device_fh].tx += ret;
> +					dev_statistics[dev->device_fh].tx_total++;
> +					dev_statistics[dev->device_fh].tx += ret;
>  				}
>  			}
>  
> -- 
> 2.1.4

  reply	other threads:[~2015-12-03  6:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 22:32 [dpdk-dev] [PATCH] examples/vhost: add rate statistics for rx/tx and core Jianfeng Tan
2015-12-02  5:45 ` Yuanhan Liu
2015-12-02 22:01 ` [dpdk-dev] [PATCH v2] examples/vhost: fix statistics error Jianfeng Tan
2015-12-03  6:17   ` Yuanhan Liu
2015-12-03  6:24     ` Tan, Jianfeng
2015-12-02 23:20 ` [dpdk-dev] [PATCH v3] " Jianfeng Tan
2015-12-03  6:28   ` Yuanhan Liu [this message]
2015-12-07  1:49     ` Thomas Monjalon

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=20151203062831.GZ2325@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).