* [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization
@ 2018-05-14 15:46 Anatoly Burakov
2018-05-14 17:00 ` Ali Alnubani
2018-05-14 18:16 ` Ananyev, Konstantin
0 siblings, 2 replies; 4+ messages in thread
From: Anatoly Burakov @ 2018-05-14 15:46 UTC (permalink / raw)
To: dev; +Cc: Wenzhuo Lu, Jingjing Wu, thomas, ferruh.yigit
Patch adding configurable locking has reshuffled some init stages, but
did not put them back in correct order. Fix order of init by moving
everything that was before arguments parsing into correct places.
Fixes: e505d84c64ab ("app/testpmd: make locking memory configurable")
Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
app/test-pmd/testpmd.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 664c435..6c3b64a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2646,6 +2646,23 @@ main(int argc, char** argv)
rte_panic("Cannot register log type");
rte_log_set_level(testpmd_logtype, RTE_LOG_DEBUG);
+#ifdef RTE_LIBRTE_PDUMP
+ /* initialize packet capture framework */
+ rte_pdump_init(NULL);
+#endif
+
+ nb_ports = (portid_t) rte_eth_dev_count_avail();
+ if (nb_ports == 0)
+ TESTPMD_LOG(WARNING, "No probed ethernet devices\n");
+
+ /* allocate port structures, and init them */
+ init_port();
+
+ set_def_fwd_config();
+ if (nb_lcores == 0)
+ rte_panic("Empty set of forwarding logical cores - check the "
+ "core mask supplied in the command parameters\n");
+
/* Bitrate/latency stats disabled by default */
#ifdef RTE_LIBRTE_BITRATE
bitrate_enabled = 0;
@@ -2671,23 +2688,6 @@ main(int argc, char** argv)
strerror(errno));
}
-#ifdef RTE_LIBRTE_PDUMP
- /* initialize packet capture framework */
- rte_pdump_init(NULL);
-#endif
-
- nb_ports = (portid_t) rte_eth_dev_count_avail();
- if (nb_ports == 0)
- TESTPMD_LOG(WARNING, "No probed ethernet devices\n");
-
- /* allocate port structures, and init them */
- init_port();
-
- set_def_fwd_config();
- if (nb_lcores == 0)
- rte_panic("Empty set of forwarding logical cores - check the "
- "core mask supplied in the command parameters\n");
-
if (tx_first && interactive)
rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
"interactive mode.\n");
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization
2018-05-14 15:46 [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization Anatoly Burakov
@ 2018-05-14 17:00 ` Ali Alnubani
2018-05-14 18:37 ` Thomas Monjalon
2018-05-14 18:16 ` Ananyev, Konstantin
1 sibling, 1 reply; 4+ messages in thread
From: Ali Alnubani @ 2018-05-14 17:00 UTC (permalink / raw)
To: 'Anatoly Burakov', dev
Cc: Wenzhuo Lu, Jingjing Wu, Thomas Monjalon, ferruh.yigit
Tested-by: Ali Alnubani <alialnu@mellanox.com>
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Anatoly Burakov
> Sent: Monday, May 14, 2018 6:47 PM
> To: dev@dpdk.org
> Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>; Jingjing Wu
> <jingjing.wu@intel.com>; Thomas Monjalon <thomas@monjalon.net>;
> ferruh.yigit@intel.com
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization
>
> Patch adding configurable locking has reshuffled some init stages, but did not
> put them back in correct order. Fix order of init by moving everything that
> was before arguments parsing into correct places.
>
> Fixes: e505d84c64ab ("app/testpmd: make locking memory configurable")
>
> Reported-by: Thomas Monjalon <thomas@monjalon.net>
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> app/test-pmd/testpmd.c | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> 664c435..6c3b64a 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -2646,6 +2646,23 @@ main(int argc, char** argv)
> rte_panic("Cannot register log type");
> rte_log_set_level(testpmd_logtype, RTE_LOG_DEBUG);
>
> +#ifdef RTE_LIBRTE_PDUMP
> + /* initialize packet capture framework */
> + rte_pdump_init(NULL);
> +#endif
> +
> + nb_ports = (portid_t) rte_eth_dev_count_avail();
> + if (nb_ports == 0)
> + TESTPMD_LOG(WARNING, "No probed ethernet
> devices\n");
> +
> + /* allocate port structures, and init them */
> + init_port();
> +
> + set_def_fwd_config();
> + if (nb_lcores == 0)
> + rte_panic("Empty set of forwarding logical cores - check the "
> + "core mask supplied in the command
> parameters\n");
> +
> /* Bitrate/latency stats disabled by default */ #ifdef
> RTE_LIBRTE_BITRATE
> bitrate_enabled = 0;
> @@ -2671,23 +2688,6 @@ main(int argc, char** argv)
> strerror(errno));
> }
>
> -#ifdef RTE_LIBRTE_PDUMP
> - /* initialize packet capture framework */
> - rte_pdump_init(NULL);
> -#endif
> -
> - nb_ports = (portid_t) rte_eth_dev_count_avail();
> - if (nb_ports == 0)
> - TESTPMD_LOG(WARNING, "No probed ethernet
> devices\n");
> -
> - /* allocate port structures, and init them */
> - init_port();
> -
> - set_def_fwd_config();
> - if (nb_lcores == 0)
> - rte_panic("Empty set of forwarding logical cores - check the "
> - "core mask supplied in the command
> parameters\n");
> -
> if (tx_first && interactive)
> rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
> "interactive mode.\n");
> --
> 2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization
2018-05-14 17:00 ` Ali Alnubani
@ 2018-05-14 18:37 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-05-14 18:37 UTC (permalink / raw)
To: 'Anatoly Burakov'
Cc: dev, Ali Alnubani, Wenzhuo Lu, Jingjing Wu, ferruh.yigit,
konstantin.ananyev
> > Patch adding configurable locking has reshuffled some init stages, but did not
> > put them back in correct order. Fix order of init by moving everything that
> > was before arguments parsing into correct places.
> >
> > Fixes: e505d84c64ab ("app/testpmd: make locking memory configurable")
> >
> > Reported-by: Thomas Monjalon <thomas@monjalon.net>
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Tested-by: Ali Alnubani <alialnu@mellanox.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization
2018-05-14 15:46 [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization Anatoly Burakov
2018-05-14 17:00 ` Ali Alnubani
@ 2018-05-14 18:16 ` Ananyev, Konstantin
1 sibling, 0 replies; 4+ messages in thread
From: Ananyev, Konstantin @ 2018-05-14 18:16 UTC (permalink / raw)
To: Burakov, Anatoly, dev; +Cc: Lu, Wenzhuo, Wu, Jingjing, thomas, Yigit, Ferruh
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov
> Sent: Monday, May 14, 2018 4:47 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; thomas@monjalon.net; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization
>
> Patch adding configurable locking has reshuffled some init stages, but
> did not put them back in correct order. Fix order of init by moving
> everything that was before arguments parsing into correct places.
>
> Fixes: e505d84c64ab ("app/testpmd: make locking memory configurable")
>
> Reported-by: Thomas Monjalon <thomas@monjalon.net>
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-14 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 15:46 [dpdk-dev] [PATCH] app/testpmd: fix testpmd initialization Anatoly Burakov
2018-05-14 17:00 ` Ali Alnubani
2018-05-14 18:37 ` Thomas Monjalon
2018-05-14 18:16 ` Ananyev, Konstantin
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).