* [PATCH] testpmd: force user to stop forwarding when changing port/core list @ 2015-02-10 14:53 Pablo de Lara [not found] ` <1423579997-22014-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Pablo de Lara @ 2015-02-10 14:53 UTC (permalink / raw) To: dev-VfR2kkLFssw Testpmd has the capability of changing the forwarding cores and ports in runtime. If these are changed when forwarding, two issues may be encountered: - If "show config fwd" is used, changes made in the core list are applied. Therefore, trying to stop forwarding may hang testpmd, since it could be waiting for cores to stop that are not actually running anything - If the port list is changed, when stopping forwarding, it may miss the stats of some of the ports that were actually being used. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> --- app/test-pmd/cmdline.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 590e427..46d4bf9 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2316,6 +2316,11 @@ static void cmd_set_list_parsed(void *parsed_result, } parsed_items; unsigned int nb_item; + if (test_done == 0) { + printf("Please stop forwarding first\n"); + return; + } + res = parsed_result; if (!strcmp(res->list_name, "corelist")) { nb_item = parse_item_list(res->list_of_items, "core", @@ -2370,6 +2375,10 @@ static void cmd_set_mask_parsed(void *parsed_result, { struct cmd_setmask_result *res = parsed_result; + if (test_done == 0) { + printf("Please stop forwarding first\n"); + return; + } if (!strcmp(res->mask, "coremask")) set_fwd_lcores_mask(res->hexavalue); else if (!strcmp(res->mask, "portmask")) -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1423579997-22014-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] testpmd: force user to stop forwarding when changing port/core list [not found] ` <1423579997-22014-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2015-02-11 6:56 ` Zhang, Helin [not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A806FC6-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Zhang, Helin @ 2015-02-11 6:56 UTC (permalink / raw) To: De Lara Guarch, Pablo, dev-VfR2kkLFssw@public.gmane.org > -----Original Message----- > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Pablo de Lara > Sent: Tuesday, February 10, 2015 10:53 PM > To: dev-VfR2kkLFssw@public.gmane.org > Subject: [dpdk-dev] [PATCH] testpmd: force user to stop forwarding when > changing port/core list > > Testpmd has the capability of changing the forwarding cores and ports in > runtime. > If these are changed when forwarding, two issues may be encountered: > > - If "show config fwd" is used, changes made in the core list are applied. > Therefore, trying to stop forwarding may hang testpmd, > since it could be waiting for cores to stop that are not actually running > anything > > - If the port list is changed, when stopping forwarding, > it may miss the stats of some of the ports that were actually being used. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Acked-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > --- > app/test-pmd/cmdline.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > 590e427..46d4bf9 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2316,6 +2316,11 @@ static void cmd_set_list_parsed(void > *parsed_result, > } parsed_items; > unsigned int nb_item; > > + if (test_done == 0) { > + printf("Please stop forwarding first\n"); > + return; > + } > + > res = parsed_result; > if (!strcmp(res->list_name, "corelist")) { > nb_item = parse_item_list(res->list_of_items, "core", @@ -2370,6 > +2375,10 @@ static void cmd_set_mask_parsed(void *parsed_result, { > struct cmd_setmask_result *res = parsed_result; > > + if (test_done == 0) { > + printf("Please stop forwarding first\n"); > + return; > + } > if (!strcmp(res->mask, "coremask")) > set_fwd_lcores_mask(res->hexavalue); > else if (!strcmp(res->mask, "portmask")) > -- > 1.7.4.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A806FC6-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [PATCH] testpmd: force user to stop forwarding when changing port/core list [not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A806FC6-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2015-02-15 15:57 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2015-02-15 15:57 UTC (permalink / raw) To: De Lara Guarch, Pablo; +Cc: dev-VfR2kkLFssw > > Testpmd has the capability of changing the forwarding cores and ports in > > runtime. > > If these are changed when forwarding, two issues may be encountered: > > > > - If "show config fwd" is used, changes made in the core list are applied. > > Therefore, trying to stop forwarding may hang testpmd, > > since it could be waiting for cores to stop that are not actually running > > anything > > > > - If the port list is changed, when stopping forwarding, > > it may miss the stats of some of the ports that were actually being used. > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Acked-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Applied, thanks ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-15 15:57 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-02-10 14:53 [PATCH] testpmd: force user to stop forwarding when changing port/core list Pablo de Lara [not found] ` <1423579997-22014-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2015-02-11 6:56 ` Zhang, Helin [not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A806FC6-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org> 2015-02-15 15:57 ` 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).