* [PATCH] examples/vhost: fix segfault when link_vmdq fails
@ 2015-01-30 7:13 Huawei Xie
[not found] ` <1422602016-12662-1-git-send-email-huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Huawei Xie @ 2015-01-30 7:13 UTC (permalink / raw)
To: dev-VfR2kkLFssw
Signed-off-by: Huawei Xie <huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] examples/vhost: fix segfault when link_vmdq fails
[not found] ` <1422602016-12662-1-git-send-email-huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-01-30 7:57 ` Ouyang, Changchun
[not found] ` <F52918179C57134FAEC9EA62FA2F9625119B7892-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ouyang, Changchun @ 2015-01-30 7:57 UTC (permalink / raw)
To: Xie, Huawei, dev-VfR2kkLFssw
> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Huawei Xie
> Sent: Friday, January 30, 2015 3:14 PM
> To: dev-VfR2kkLFssw@public.gmane.org
> Subject: [dpdk-dev] [PATCH] examples/vhost: fix segfault when link_vmdq
> fails
>
> Signed-off-by: Huawei Xie <huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Acked-by: Changchun Ouyang <changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] examples/vhost: fix segfault when link_vmdq fails
[not found] ` <F52918179C57134FAEC9EA62FA2F9625119B7892-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2015-01-30 9:43 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-01-30 9:43 UTC (permalink / raw)
To: Xie, Huawei; +Cc: dev-VfR2kkLFssw
> > Signed-off-by: Huawei Xie <huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Acked-by: Changchun Ouyang <changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied
Thanks
--
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-30 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 7:13 [PATCH] examples/vhost: fix segfault when link_vmdq fails Huawei Xie
[not found] ` <1422602016-12662-1-git-send-email-huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-01-30 7:57 ` Ouyang, Changchun
[not found] ` <F52918179C57134FAEC9EA62FA2F9625119B7892-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-01-30 9:43 ` Thomas Monjalon
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.