* [dpdk-dev] [PATCH] examples/kni: Fix segmentation fault at program exit
@ 2015-08-05 21:58 Hyun Yoo
2015-08-05 22:21 ` Zhang, Helin
0 siblings, 1 reply; 3+ messages in thread
From: Hyun Yoo @ 2015-08-05 21:58 UTC (permalink / raw)
To: Helin Zhang; +Cc: dev
In kni_free_kni(), p[i] should be p[port_id]
Signed-off-by: Hyun Yoo <easetheworld <at> gmail.com>
---
examples/kni/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/examples/kni/main.c b/examples/kni/main.c
index 6f74d8e..6d434ad 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -830,9 +830,9 @@ kni_free_kni(uint8_t port_id)
if (port_id >= RTE_MAX_ETHPORTS || !p[port_id])
return -1;
- for (i = 0; i < p[i]->nb_kni; i++) {
- rte_kni_release(p[i]->kni[i]);
- p[i]->kni[i] = NULL;
+ for (i = 0; i < p[port_id]->nb_kni; i++) {
+ rte_kni_release(p[port_id]->kni[i]);
+ p[port_id]->kni[i] = NULL;
}
rte_eth_dev_stop(port_id);
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/kni: Fix segmentation fault at program exit
2015-08-05 21:58 [dpdk-dev] [PATCH] examples/kni: Fix segmentation fault at program exit Hyun Yoo
@ 2015-08-05 22:21 ` Zhang, Helin
2015-08-10 16:40 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Helin @ 2015-08-05 22:21 UTC (permalink / raw)
To: Hyun Yoo; +Cc: dev
> -----Original Message-----
> From: Hyun Yoo [mailto:easetheworld@gmail.com]
> Sent: Wednesday, August 5, 2015 2:58 PM
> To: Zhang, Helin
> Cc: dev@dpdk.org
> Subject: [PATCH] examples/kni: Fix segmentation fault at program exit
>
> In kni_free_kni(), p[i] should be p[port_id]
>
> Signed-off-by: Hyun Yoo <easetheworld@gmail.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/kni: Fix segmentation fault at program exit
2015-08-05 22:21 ` Zhang, Helin
@ 2015-08-10 16:40 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-08-10 16:40 UTC (permalink / raw)
To: Hyun Yoo; +Cc: dev
> > In kni_free_kni(), p[i] should be p[port_id]
> >
> > Signed-off-by: Hyun Yoo <easetheworld@gmail.com>
> Acked-by: Helin Zhang <helin.zhang@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-10 16:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-05 21:58 [dpdk-dev] [PATCH] examples/kni: Fix segmentation fault at program exit Hyun Yoo
2015-08-05 22:21 ` Zhang, Helin
2015-08-10 16:40 ` Thomas Monjalon
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).