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 1C3A9293B for ; Mon, 6 Feb 2017 11:37:49 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP; 06 Feb 2017 02:37:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,342,1477983600"; d="scan'208";a="61311563" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga005.jf.intel.com with ESMTP; 06 Feb 2017 02:37:33 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.230]) by irsmsx110.ger.corp.intel.com ([169.254.15.101]) with mapi id 14.03.0248.002; Mon, 6 Feb 2017 10:37:32 +0000 From: "Van Haaren, Harry" To: Jerin Jacob CC: "dev@dpdk.org" , "Richardson, Bruce" Thread-Topic: [PATCH v2 02/15] eventdev: add APIs for extended stats Thread-Index: AQHSgFJAIGCmozbBa0aklZNLaMNmCaFbxnwA Date: Mon, 6 Feb 2017 10:37:31 +0000 Message-ID: References: <1484580885-148524-1-git-send-email-harry.van.haaren@intel.com> <1485879273-86228-1-git-send-email-harry.van.haaren@intel.com> <1485879273-86228-3-git-send-email-harry.van.haaren@intel.com> <20170206082232.GC25242@localhost.localdomain> In-Reply-To: <20170206082232.GC25242@localhost.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTAwZjJhOTQtMDhjZi00MDMyLWIyNWUtZTE5ZThmOGM0MjlhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InhUMTZ5RTJsUjJ3YVVnYkRxUDByTW53a2dWVEtGa0w1cGJQK1JsYTY2aHc9In0= x-ctpclassification: CTP_IC 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 v2 02/15] eventdev: add APIs for extended stats 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: Mon, 06 Feb 2017 10:37:50 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Monday, February 6, 2017 8:23 AM > To: Van Haaren, Harry > Cc: dev@dpdk.org; Richardson, Bruce > Subject: Re: [PATCH v2 02/15] eventdev: add APIs for extended stats >=20 > On Tue, Jan 31, 2017 at 04:14:20PM +0000, Harry van Haaren wrote: > > From: Bruce Richardson > > > > Add in APIs for extended stats so that eventdev implementations can rep= ort > > out information on their internal state. The APIs are based on, but not > > identical to, the equivalent ethdev functions. >=20 > The APIs Looks good. One minor comment though, >=20 > Can you add statistics specific to per event queue and event > port?, To improve the cases like below in the application code(taken from > app/test/test_sw_eventdev.c). >=20 > IMO, it is useful because, > - ethdev has similar semantics > - majority of the implementations will have port and queue specific stati= stics counters I'm not totally sure what you're asking but if I understand correctly, you'= re suggesting a struct based stats API like this? struct rte_event_dev_port_stats { uint64_t rx; uint64_t tx; ... }; struct rte_event_dev_queue_stats { uint64_t rx; uint64_t tx; ... }; /** a get function to get a specific port's statistics. The *stats* pointer= is filled in */=20 int rte_event_dev_port_stats_get(dev, uint8_t port_id, struct rte_event_dev= _port_stats *stats); /** a get function to get a specific queue's statistics. The *stats* pointe= r is filled in */=20 int rte_event_dev_queue_stats_get(dev, uint8_t queue_id, struct rte_event_d= ev_queue_stats *stats); Is this what you meant, or did I misunderstand? >=20 > + for (i =3D 0; i < MAX_PORTS; i++) { > + char name[32]; > + snprintf(name, sizeof(name), "port_%u_rx", i); > + stats->port_rx_pkts[i] =3D rte_event_dev_xstats_by_name_g= et( > + dev_id, name, &port_rx_pkts_ids[i]); >=20 > + for (i =3D 0; i < MAX_QIDS; i++) { > + char name[32]; > + snprintf(name, sizeof(name), "qid_%u_rx", i); > + stats->qid_rx_pkts[i] =3D rte_event_dev_xstats_by_name_ge= t( > + dev_id, name, &qid_rx_pkts_ids[i]); >=20