From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 838B658FE for ; Thu, 28 Jun 2018 15:50:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2018 06:50:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,283,1526367600"; d="scan'208";a="68478430" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 28 Jun 2018 06:50:30 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 28 Jun 2018 14:50:30 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.136]) by IRSMSX156.ger.corp.intel.com ([169.254.3.252]) with mapi id 14.03.0319.002; Thu, 28 Jun 2018 14:50:29 +0100 From: "Singh, Jasvinder" To: "Iremonger, Bernard" , "dev@dpdk.org" CC: "Dumitrescu, Cristian" , "Pattan, Reshma" Thread-Topic: [PATCH v3 23/23] app/testpmd: rework softnic forward mode Thread-Index: AQHUDuY89cARMt6rdEuci7SrymTXMaR1r4JQ Date: Thu, 28 Jun 2018 13:50:29 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D335AC3F8@IRSMSX103.ger.corp.intel.com> References: <20180615165224.25004-2-jasvinder.singh@intel.com> <20180627163123.135686-1-jasvinder.singh@intel.com> <20180627163123.135686-24-jasvinder.singh@intel.com> <8CEF83825BEC744B83065625E567D7C260CBA41E@IRSMSX108.ger.corp.intel.com> In-Reply-To: <8CEF83825BEC744B83065625E567D7C260CBA41E@IRSMSX108.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTdmZmI0MzYtOTA2ZS00ZDNiLTgyZWEtNDc3NzhiZjU0ODRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUjVUVzNHdzRIUjBMbHB0elNYUFRLOU13RTVGWGhJOHBkRiszbUVnQjY4NnFYN2JDVEdVckFVNVpGRDltUENlUiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 23/23] app/testpmd: rework softnic forward mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 13:50:33 -0000 < snip > > > > > p =3D &ports[port_id]; > > > > - /* Port tm flag */ > > - if (p->softport.tm_flag =3D=3D 0) { > > - printf(" tm not enabled on port %u (error)\n", port_id); > > - return; > > - } > > - > > /* Forward mode: tm */ >=20 > Should "tm" be replaced by "softnic" in line above. >=20 > > - if (strcmp(cur_fwd_config.fwd_eng->fwd_mode_name, "tm")) { > > - printf(" tm mode not enabled(error)\n"); > > + if (strcmp(cur_fwd_config.fwd_eng->fwd_mode_name, "softnic")) { > > + printf(" softnicfwd mode not enabled(error)\n"); > > return; > > } > > > > /* Set the default tm hierarchy */ > > - p->softport.tm.default_hierarchy_enable =3D 1; > > + p->softport.default_tm_hierarchy_enable =3D 1; > > } > > > > cmdline_parse_inst_t cmd_set_port_tm_hierarchy_default =3D { @@ - > > 17543,15 +17540,50 @@ cmdline_read_from_file(const char *filename) > > 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; > > - cmdline_interact(testpmd_cl); > > - cmdline_stdin_exit(testpmd_cl); > > + > > + 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 > > + } > > } > > > >=20 > Should the testpmd help command be updated for the softnic, lines 125 to > 1136 in cmdline.c ? >=20 There isn't anything changed in cli, so testpmd help commands should remain= the same. Thanks.