DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: workaround softnic CLI modifications
@ 2018-07-24 16:21 Moti Haimovsky
  2018-07-24 17:39 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 3+ messages in thread
From: Moti Haimovsky @ 2018-07-24 16:21 UTC (permalink / raw)
  To: thomas; +Cc: dev, stable, Moti Haimovsky

This patch returns the previous testpmd command line handling
routines (namely cmdline_interact and cmdline_stdin_exit) to the
prompt routine in order to overcome testpmd abnormal exit observed on
several setups.
These routines will only by used when testpmd is compiled without
support for RTE_LIBRTE_PMD_SOFTNIC

Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode")
Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
---
 app/test-pmd/cmdline.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2c32029..2f350fc 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17896,13 +17896,12 @@ struct cmd_config_per_queue_tx_offload_result {
 void
 prompt(void)
 {
-	int status;
-
 	/* initialize non-constant commands */
 	cmd_set_fwd_mode_init();
 	cmd_set_fwd_retry_mode_init();
 
 #if defined RTE_LIBRTE_PMD_SOFTNIC
+	int status;
 	portid_t softnic_portid, pid;
 	uint8_t softnic_enable = 0;
 
@@ -17924,6 +17923,10 @@ struct cmd_config_per_queue_tx_offload_result {
 	if (testpmd_cl == NULL)
 		return;
 
+#if !defined RTE_LIBRTE_PMD_SOFTNIC
+	cmdline_interact(testpmd_cl);
+	cmdline_stdin_exit(testpmd_cl);
+#else
 	for (;;) {
 		status = cmdline_poll(testpmd_cl);
 		if (status < 0)
@@ -17932,14 +17935,11 @@ struct cmd_config_per_queue_tx_offload_result {
 			cmdline_stdin_exit(testpmd_cl);
 			rte_exit(0, "\n");
 		}
-
-#if defined RTE_LIBRTE_PMD_SOFTNIC
-
-	if ((softnic_enable == 1) &&
-		(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
-		rte_pmd_softnic_manage(softnic_portid);
-#endif
+		if ((softnic_enable == 1) &&
+			(strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0))
+			rte_pmd_softnic_manage(softnic_portid);
 	}
+#endif /* RTE_LIBRTE_PMD_SOFTNIC */
 }
 
 void
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-25  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 16:21 [dpdk-dev] [PATCH] app/testpmd: workaround softnic CLI modifications Moti Haimovsky
2018-07-24 17:39 ` Dumitrescu, Cristian
2018-07-25  8:21   ` [dpdk-dev] [dpdk-stable] " 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).