From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] app/testpmd: removed softnic CLI modifications Date: Wed, 25 Jul 2018 16:42:42 +0200 Message-ID: <5594003.g5WaFQLr3r@xps> References: <1532529621-5171-1-git-send-email-motih@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, stable@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com, konstantin.ananyev@intel.com To: Moti Haimovsky Return-path: In-Reply-To: <1532529621-5171-1-git-send-email-motih@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" +Cc 25/07/2018 16:40, Moti Haimovsky: > This patch reverts the testpmd CLI prompt routine modifications done > in order to support softnic. > The reason of doing so is due to testpmd abnormal exit observed on > several setups caused by the softnic modifications to this routine, > for example: When running testpmd with tap interface > (/app/testpmd > -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64 > --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512 > --rxd=512 --port-topology=chained --forward-mode=rxonly) > testpmd crashes seconds after presenting its prompt with the following > error: > testpmd> PANIC in prompt(): > CLI poll error (-1) > > Thread 1 "testpmd" received signal SIGABRT, Aborted. > 0x00007ffff668e0d0 in raise () from /lib64/libc.so.6 > (gdb) bt > #0 0x00007ffff668e0d0 in raise () from /lib64/libc.so.6 > #1 0x00007ffff668f6b1 in abort () from /lib64/libc.so.6 > #2 0x0000000000468027 in __rte_panic () > #3 0x00000000004876ed in prompt () > #4 0x000000000046dffc in main () > > When running testpmd with bare-metal device > (app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0 -- > --burst=64 --mbcache=512 -i --nb-cores=7 > --rxq=64 --txq=4 --txd=16 --rxd=16) > and pressing CTRL+D right after testpmd prompt is presented then > the program crashes while presenting the same messages as above. > > Needless to say that this behavior is not observed when using the > previous CLI prompt routine. > > Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode") > Cc: stable@dpdk.org > > Signed-off-by: Moti Haimovsky > --- > v2: > * Removed softnic modifications altogether. > v1: > * Wrapped softnic modifications with compilation switch. > --- > app/test-pmd/cmdline.c | 39 ++------------------------------------- > 1 file changed, 2 insertions(+), 37 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 2c32029..d058860 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -17896,50 +17896,15 @@ 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 > - portid_t softnic_portid, pid; > - uint8_t softnic_enable = 0; > - > - if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) { > - RTE_ETH_FOREACH_DEV(pid) { > - struct rte_port *port = &ports[pid]; > - const char *driver = port->dev_info.driver_name; > - > - if (strcmp(driver, "net_softnic") == 0) { > - softnic_portid = pid; > - softnic_enable = 1; > - break; > - } > - } > - } > -#endif > - > testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> "); > if (testpmd_cl == NULL) > return; > - > - for (;;) { > - status = cmdline_poll(testpmd_cl); > - if (status < 0) > - rte_panic("CLI poll error (%" PRId32 ")\n", status); > - else if (status == RDLINE_EXITED) { > - 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 > - } > + cmdline_interact(testpmd_cl); > + cmdline_stdin_exit(testpmd_cl); > } > > void >