DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: "Xie, Huawei" <huawei.xie@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq fails
Date: Fri, 30 Jan 2015 07:57:17 +0000	[thread overview]
Message-ID: <F52918179C57134FAEC9EA62FA2F9625119B7892@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1422602016-12662-1-git-send-email-huawei.xie@intel.com>


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie
> Sent: Friday, January 30, 2015 3:14 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq
> fails
> 
> Signed-off-by: Huawei Xie <huawei.xie@intel.com>

Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>

> ---
>  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
> 04f0118..3a35359 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -1308,8 +1308,8 @@ switch_worker(__attribute__((unused)) void *arg)
>  				/* If this is the first received packet we need
> to learn the MAC and setup VMDQ */
>  				if (unlikely(vdev->ready ==
> DEVICE_MAC_LEARNING) && tx_count) {
>  					if (vdev->remove ||
> (link_vmdq(vdev, pkts_burst[0]) == -1)) {
> -						while (tx_count--)
> -
> 	rte_pktmbuf_free(pkts_burst[tx_count]);
> +						while (tx_count)
> +
> 	rte_pktmbuf_free(pkts_burst[--tx_count]);
>  					}
>  				}
>  				while (tx_count)
> --
> 1.8.1.4

  reply	other threads:[~2015-01-30  7:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  7:13 Huawei Xie
2015-01-30  7:57 ` Ouyang, Changchun [this message]
2015-01-30  9:43   ` 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=F52918179C57134FAEC9EA62FA2F9625119B7892@shsmsx102.ccr.corp.intel.com \
    --to=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@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).