From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 31E9A8DA9 for ; Wed, 28 Oct 2015 14:52:31 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 28 Oct 2015 06:52:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,210,1444719600"; d="scan'208";a="805516526" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga001.jf.intel.com with ESMTP; 28 Oct 2015 06:52:30 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.75]) by IRSMSX108.ger.corp.intel.com ([169.254.11.138]) with mapi id 14.03.0248.002; Wed, 28 Oct 2015 13:52:28 +0000 From: "Ananyev, Konstantin" To: "Horton, Remy" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 0/2] User-space ethtool sample application Thread-Index: AQHREXGbSjwqu9Q73ki+XXNQvDpjVp6A5x1A Date: Wed, 28 Oct 2015 13:52:28 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725836AB5E36@irsmsx105.ger.corp.intel.com> References: <1445875161-1808-1-git-send-email-remy.horton@intel.com> <1446030736-11046-1-git-send-email-remy.horton@intel.com> In-Reply-To: <1446030736-11046-1-git-send-email-remy.horton@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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-dev] [PATCH v3 0/2] User-space ethtool sample application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 13:52:31 -0000 Hi Remy > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Remy Horton > Sent: Wednesday, October 28, 2015 11:12 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v3 0/2] User-space ethtool sample application >=20 > Further enhancements to the userspace ethtool implementation that was > submitted in 2.1 and packaged as a self-contained sample application. > Implements an rte_ethtool shim layer based on rte_ethdev API, along > with a command prompt driven demonstration application. Looks good in general, just few small things, see below. Thanks Konstantin >=20 > This patchset depends on: > * http://dpdk.org/dev/patchwork/patch/6563/ > * http://dpdk.org/dev/patchwork/patch/7340/ > * http://dpdk.org/dev/patchwork/patch/8070/ > * http://dpdk.org/dev/patchwork/patch/8067/ > * http://dpdk.org/dev/patchwork/patch/8075/ > * http://dpdk.org/dev/patchwork/patch/8074/ > * http://dpdk.org/dev/patchwork/patch/8072/ > * http://dpdk.org/dev/patchwork/patch/8071/ > * http://dpdk.org/dev/patchwork/patch/8073/ > * http://dpdk.org/dev/patchwork/patch/8068/ > * http://dpdk.org/dev/patchwork/patch/8069/ I think it actually depends only on these two: http://dpdk.org/dev/patchwork/patch/6563/ http://dpdk.org/dev/patchwork/patch/8070/ 1) From [PATCH v3 1/2] example: add user-space ethtool sample application +int main(int argc, char **argv) +{ + int cnt_args_parsed; + uint32_t idx_port; + uint32_t id_core; + uint32_t cnt_ports; + struct app_port *ptr_port; + + /* Init runtime enviornment */ + cnt_args_parsed =3D rte_eal_init(argc, argv); + if (cnt_args_parsed < 0) + rte_exit(EXIT_FAILURE, "rte_eal_init(): Failed"); + + cnt_ports =3D rte_eth_dev_count(); + printf("Eth NICs: %i\n", cnt_ports); + if (cnt_ports > MAX_PORTS) { + printf("Info: Using only %i of %i ports\n", + cnt_ports, MAX_PORTS + ); + cnt_ports =3D MAX_PORTS; + } + + setup_ports(&app_cfg, cnt_ports); + + id_core =3D rte_lcore_id(); + for (idx_port =3D 0; idx_port < cnt_ports; idx_port++) { + id_core =3D rte_get_next_lcore(id_core, 1, 0); + if (id_core =3D=3D RTE_MAX_LCORE) { + printf("Warning: More ports than cores. " + "Some ports will not be active.\n"); + break; + } Master core is not always the first active core. User can select a master lcore with '--master-lcore X' command-line option. Another thing - why do you need a separate lcore for each port? It means that if user would like to test X different ports he/she would nee= d X+1 lcores to run the app. I understand that you are trying to keep the app as simple as possible, but= why not visa-versa then? Make all ports managed by one slave lcore? It might slowdown things as number of ports grow, but from other side this = app is mainly for functional testing of ethtool shim layer, so I think it is not a= problem. + ptr_port =3D &app_cfg.ports[idx_port]; + rte_eal_remote_launch(slave_main, ptr_port, id_core); + } + + ethapp_main(); + + for (idx_port =3D 0; idx_port < cnt_ports; idx_port++) + app_cfg.ports[idx_port].exit_now =3D 1; + RTE_LCORE_FOREACH_SLAVE(id_core) { + if (rte_eal_wait_lcore(id_core) < 0) + return -1; + } + + return 0; +} 2) From: [PATCH v3 2/2] doc: add user-space ethtool sample app guide It looks like a guide for keep-alive not ehttool :)