* [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL
@ 2015-03-13 2:38 Yong Liu
[not found] ` <1426214303-12207-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Yong Liu @ 2015-03-13 2:38 UTC (permalink / raw)
To: dev-VfR2kkLFssw
When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero.
So this function will only set ports[255] need_reconfig flag, other ports will
be skipped.
Signed-off-by: Marvin liu <yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 5b16a69..077d7a4 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8874,14 +8874,7 @@ prompt(void)
static void
cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
{
- if (!port_id_is_invalid(id, DISABLED_WARN)) {
- /* check if need_reconfig has been set to 1 */
- if (ports[id].need_reconfig == 0)
- ports[id].need_reconfig = dev;
- /* check if need_reconfig_queues has been set to 1 */
- if (ports[id].need_reconfig_queues == 0)
- ports[id].need_reconfig_queues = queue;
- } else {
+ if (id == (portid_t)RTE_PORT_ALL) {
portid_t pid;
FOREACH_PORT(pid, ports) {
@@ -8892,6 +8885,13 @@ cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue)
if (ports[pid].need_reconfig_queues == 0)
ports[pid].need_reconfig_queues = queue;
}
+ } else if (!port_id_is_invalid(id, DISABLED_WARN)) {
+ /* check if need_reconfig has been set to 1 */
+ if (ports[id].need_reconfig == 0)
+ ports[id].need_reconfig = dev;
+ /* check if need_reconfig_queues has been set to 1 */
+ if (ports[id].need_reconfig_queues == 0)
+ ports[id].need_reconfig_queues = queue;
}
}
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL
[not found] ` <1426214303-12207-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2015-03-17 1:18 ` Ouyang, Changchun
[not found] ` <F52918179C57134FAEC9EA62FA2F962511A5E105-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ouyang, Changchun @ 2015-03-17 1:18 UTC (permalink / raw)
To: Liu, Yong, dev-VfR2kkLFssw
> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Yong Liu
> Sent: Friday, March 13, 2015 10:38 AM
> To: dev-VfR2kkLFssw@public.gmane.org
> Subject: [dpdk-dev] [PATCH] app/testpmd: Fix not set need_reconfig flag
> when port id is RTE_PORT_ALL
>
> When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero.
> So this function will only set ports[255] need_reconfig flag, other ports will be
> skipped.
>
> Signed-off-by: Marvin liu <yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
Acked-by: Changchun Ouyang <changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL
[not found] ` <F52918179C57134FAEC9EA62FA2F962511A5E105-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2015-03-20 23:26 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-03-20 23:26 UTC (permalink / raw)
To: Liu, Yong; +Cc: dev-VfR2kkLFssw
> > When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero.
> > So this function will only set ports[255] need_reconfig flag, other ports will be
> > skipped.
> >
> > Signed-off-by: Marvin liu <yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> Acked-by: Changchun Ouyang <changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Fixes: edab33b1c01d ("app/testpmd: support port hotplug")
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-20 23:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 2:38 [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL Yong Liu
[not found] ` <1426214303-12207-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-17 1:18 ` Ouyang, Changchun
[not found] ` <F52918179C57134FAEC9EA62FA2F962511A5E105-E2R4CRU6q/6iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-20 23:26 ` 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.