From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id EACB2235; Wed, 25 Jul 2018 16:59:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 07:59:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,401,1526367600"; d="scan'208";a="75398789" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga001.fm.intel.com with ESMTP; 25 Jul 2018 07:59:23 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX154.ger.corp.intel.com (163.33.192.96) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Jul 2018 15:59:23 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.208]) by irsmsx111.ger.corp.intel.com ([169.254.2.118]) with mapi id 14.03.0319.002; Wed, 25 Jul 2018 15:59:23 +0100 From: "Singh, Jasvinder" To: Thomas Monjalon , Moti Haimovsky CC: "dev@dpdk.org" , "stable@dpdk.org" , "Dumitrescu, Cristian" , "Ananyev, Konstantin" Thread-Topic: [PATCH v2] app/testpmd: removed softnic CLI modifications Thread-Index: AQHUJCXqpmk2u6XaUECVsc/WavCr+6SgBgdQ Date: Wed, 25 Jul 2018 14:59:22 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D335DDA4D@IRSMSX103.ger.corp.intel.com> References: <1532529621-5171-1-git-send-email-motih@mellanox.com> <5594003.g5WaFQLr3r@xps> In-Reply-To: <5594003.g5WaFQLr3r@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWJhMzU0ZTEtZmQ5NS00MDZlLThiNzktYTk5ODk2YTMyNmZkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSFNGa2JoMVpxSEY0eGNRaUF4TFwvUWNacHRIbVpFcFRTTmZpT3hDbVZcL0R3V1VySzR5ZmZwN1pNUEhLVTRCMUwyIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v2] app/testpmd: removed softnic CLI modifications X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 14:59:27 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, July 25, 2018 3:43 PM > To: Moti Haimovsky > Cc: dev@dpdk.org; stable@dpdk.org; Singh, Jasvinder > ; Dumitrescu, Cristian > ; Ananyev, Konstantin > > Subject: Re: [PATCH v2] app/testpmd: removed softnic CLI modifications >=20 > +Cc >=20 > 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=3Dnet_tap0,iface=3Dtap0,remote=3Deth1 -- --burst=3D64 > > --mbcache=3D512 -i --nb-cores=3D7 --rxq=3D2 --txq=3D2 --txd=3D512 > > --rxd=3D512 --port-topology=3Dchained --forward-mode=3Drxonly) 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=3D1024,1024 -w 04:00.0 -- > > --burst=3D64 --mbcache=3D512 -i --nb-cores=3D7 > > --rxq=3D64 --txq=3D4 --txd=3D16 --rxd=3D16) > > 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 =3D 0; > > - > > - if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") =3D=3D 0) { > > - RTE_ETH_FOREACH_DEV(pid) { > > - struct rte_port *port =3D &ports[pid]; > > - const char *driver =3D port->dev_info.driver_name; > > - > > - if (strcmp(driver, "net_softnic") =3D=3D 0) { > > - softnic_portid =3D pid; > > - softnic_enable =3D 1; > > - break; > > - } > > - } > > - } > > -#endif > > - > > testpmd_cl =3D cmdline_stdin_new(main_ctx, "testpmd> "); > > if (testpmd_cl =3D=3D NULL) > > return; > > - > > - for (;;) { > > - status =3D cmdline_poll(testpmd_cl); > > - if (status < 0) > > - rte_panic("CLI poll error (%" PRId32 ")\n", status); > > - else if (status =3D=3D RDLINE_EXITED) { > > - cmdline_stdin_exit(testpmd_cl); > > - rte_exit(0, "\n"); > > - } > > - > > -#if defined RTE_LIBRTE_PMD_SOFTNIC > > - > > - if ((softnic_enable =3D=3D 1) && > > - (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") =3D=3D 0)) > > - rte_pmd_softnic_manage(softnic_portid); > > -#endif > > - } > > + cmdline_interact(testpmd_cl); > > + cmdline_stdin_exit(testpmd_cl); > > } > > > > void > > With above changes in cmdline.c, you should also consider removing followin= g from the file - #ifdef RTE_LIBRTE_PMD_SOFTNIC #include #endif =20