From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0088.outbound.protection.outlook.com [104.47.40.88]) by dpdk.org (Postfix) with ESMTP id F18979E7 for ; Tue, 7 Feb 2017 07:25:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=62kPmp8gfdAogpZBYnV/uFmt9CpdezigKb1uqEfhawQ=; b=QVzUErT9rhkOn73HZhFcU0CJpDrMdiTE+d2AoU1TJJDsIJg05wES5pOsAsueGzw1xFrl8E61lWOGc5fdFZ3DLra6+np8OfWXw2LaSMUVUpMBYzyFCCpsdrdbFTj7wEzUAQnLKz9HRca1TzuFCguN6Fu35cXGKQia2YmYnqcwH7Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Tue, 7 Feb 2017 06:25:00 +0000 Date: Tue, 7 Feb 2017 11:54:44 +0530 From: Jerin Jacob To: "Van Haaren, Harry" CC: "dev@dpdk.org" , "Richardson, Bruce" Message-ID: <20170207062443.GA12563@localhost.localdomain> 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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MAXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.164.146.140) To BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) X-MS-Office365-Filtering-Correlation-Id: 9fda752e-fd6c-4d1c-ff58-08d44f220c60 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 3:LWEL+PhVGs31p+0MlmbI9SdzeGvNfosdUUgIRUVSpdxig2SEDieeGfvPWH/AGNz4O9TeGu319ZPP1Og5gW9h27ajY89GwLezLR3m1LvXyQuPiX9oTPb5Ybs8AvKcRih7LssTxLEGZWFauZl/bzFlzKOfvYXj0MsNMBM4JFV5t0fNGrYCVd/Bx3u36izAjLU/Kyt2WHN6NCLnq1SuveMPYRkK5t79/xCwM86TIwV5kgsjUdwDEmXeBIMqolAruTWG38NQtnVpFoqqDq3hsOQT/g==; 25:xveEsLhMGUs4+1QGJHrF0qg5Ic4yWvXWcVLpzcmA5gem5wYb2ZSQhHbf0IY1Jz49hcCoD1R8bhBEqpRkSMsT++sQbBDcN6EePIUlvE/N/gHdQfw0nMOjNyvBkfd+GxmUqDmpUvzgf+X1rMWx7XOI4dn3NFRXJQAq0LGnn+XclCDJseBiaSyulylXWW2xzUCtyNGttRfzgphz5AbmGncf+2SZQNKmm65aMR5MGrdOKz4eepX7/4f8gtT56LK0zj3dg2MLKZqbp7aHUseGwZ1ZTxS2eh6lmELxIs2Z7rbC8QCNbeQCXbpMEPmXjuNpjeOeDSmxcv9AoqEenmIuVr778DBmwQ9++I18/+nMaxgsRTMn2XbQHW43E8TNf1aoo26/Wxr8H41sSQShfiD3lrOLalDgc3EyDuxuH1zZUZ5tXevorywo9eL7ncysYJ/AxyinaaBA1JhitSM0TKLYTHb48g== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 31:8ELuRi2n9Jr0HtU+U4zlqOHtDRa/y8Hwgx8n+qF8OWdibpVe28x5AQ/filpNx9KGtmZPga/ZuVzv9xbBV+jAlfeDXN9DmfiXSAmB6kOWWvnSIy7HTG32nAZuqoTaLDSwZurGN+GQJJ/uRv8xTCf0zXCsXbJRcyiDVxwuO68Si3fZ3iiUZnVlXJDptJiudS5wDSz3GN2foMFWSUYyWeJrrZZE1np+yVXRIKD7OA1cQAryHM7lFCO/f7OpjWjJiTj8Qkg6Lk1Kv9fhmeAVeR/wHw==; 20:5+8L8qVSRCdHN3IkMZGgsjC2hoCnmB5/AfYnYUX7P0TrIkdBtACTODsuKLtIepzw7iNXtSwMZWn8zwx5yKG2bVkilHLsbTR90wESgn1FWBNpwY1kxr8RLHRxzP+pcNgTPQ4Do0DMzjc/DCvxPdeb0BU/tpuBn40fxT2dpK6U5//LdbMAToz57j9wewPr10fIBy33AscyxiJV9P2TovmkSE2x1POMLy8CB0yjdSaC6agwGhMxqR2H5g7SGbf/sUQG8BnegP4btAZK4scspAWV71K8Z9P4Irn2NdTpk7hhmA1t3hnkFLXhm++tKjM7Eg63BMg4KOuOtWdgyp852BVQopkCO1lZuktvGifYvNy8Ar4/CTa4PfQm4HyaDS//xpgCFWG+AON+ZKHzQA7XcFQiseK4883IUd/ScDKUl4Kx3u/rUkZ/8MuXgoyHqsCtJz/TkzjoCNsiXECurWXX24CQ4N+mUvKzaZZnnLdE5ZXFWxne17qBUTXKgp1b9+3isuo/sOYQ6udbcQy1ZkUjHbR7UcgjwWWZbOPvyGH2tZ+p0hFo9HXLESCmVXf/P1fRi40k+tU5WOzTj8703ibRl/d2LXAgew8W02pOEN41kDsCrzM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(20170203043)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558025)(6072148); SRVR:BY1PR0701MB1722; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 4:mL6uhoQD7AkwoUPE3ft9l+ZDcJp2T/gyOHBKaGV2hOyb7/1cSyGGDUIUQTj6MZvvsrxGeL0YfQFveiIG6FQeBjQP6LMplXDikxDAalqmItnCQncYoOxAlSsxKnIVMg+KpqQv932OmBrZJ3puUAs+4LS5GPlUmnzsD4Uzh7PzLQJwNnhWIHH19MkKVbnqg55gaxgpLLrKKXcOnVrwVMj0xJW7MjSFGiK9FI3eVoHcNXY0qHi3xWg9djVWBcVDp/Mwh4nlo0rschHN01yizY/QJ4wNZ4p+o5yQg8tT4GlW6ZrRskKxaAA9FDzrI4mKhJ6Q/gwv/fj8q1WgDikuPd5z9AUMNjJa6J3maDeMbCmSk/GiY7ZS0hUo17pGOK17y9s14P1wvinG4erbhmZkok5ZPDVbnFwi7FLedWMFnHajiJnDq9mmZxb3KbWE6J0Ogb/NYLzDwH01pQYUW/g+OGJJHGSK+wO4GFzLIZYrCcjb0Pi9rVRMhB/0wJCzksCL4DWQJ1DNXqedVRyzGyb8f81Bv+LNdUcq6TsRPdR1BlnG1uE3CGpH5S3bnSGZ0PJJTgTC7dJDWMKucG6j7nIVbfd15b/1FQfMuAOMupnkQEtC5jQ1QN4W0QwiAj1QNB4L2zvNpBdBDAauShcBSgtrne6w6Q387sbFL1lHwIyMMNbC6KM= X-Forefront-PRVS: 0211965D06 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(189002)(199003)(377454003)(13464003)(24454002)(38730400002)(66066001)(2950100002)(47776003)(92566002)(6666003)(97756001)(46406003)(42882006)(25786008)(6916009)(68736007)(229853002)(53936002)(6246003)(6506006)(9686003)(54906002)(55016002)(561944003)(7736002)(33656002)(93886004)(61506002)(42186005)(105586002)(106356001)(81166006)(8676002)(50466002)(305945005)(4001350100001)(97736004)(83506001)(81156014)(54356999)(2906002)(6116002)(50986999)(5009440100003)(4326007)(76176999)(101416001)(23726003)(5660300001)(110136004)(1076002)(189998001)(3846002)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1722; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1722; 23:bG2YwZJvl9bl1lNH6KDueMUPNuLc4u31ywao2CT?= =?us-ascii?Q?kThSwMjZZNmBhQYUD9CjyrdYOJeVTtUTpS8ZqhgD44ARQTyQek2cbd9RvJGX?= =?us-ascii?Q?mOtwub/OgDv2yY7Qs+ua20GG5zu2ZMPg28PbRkyMBBgibMZbVaCuK0+b0qk+?= =?us-ascii?Q?CRQ0v7Yq6mDOnO9e/jEK3OJjePLFC8qnleTRoNdHOV6K+ZTCb8KhGBhsDq1k?= =?us-ascii?Q?dqlRlqkiKUWM63sCzwWp1IpLoEyVQkiwFNpjmDP6nsjgSm9C/ocXfvxhB9ty?= =?us-ascii?Q?DQ3IEkHP7uhqMJiqJLbab8TjC8CIACNCF5qH7FVXAq18VJmxfsg+4DirTdkK?= =?us-ascii?Q?nARgYlNy9XQWfkIpqDWZQGaSvNwB0cnEbjynwcJ9dAnezQEvxAgGja+rs7xw?= =?us-ascii?Q?7OGm604tGbVgeDXj9cJY5mm8yclyni4/UO9p8pRoVDTW9p+2tT5TEKe3Irav?= =?us-ascii?Q?NIsgP61jd1o8DjKVZGZeAB9fCr8QriLe2/veQxcpbETS6iLBPt7dad6GofpU?= =?us-ascii?Q?iYFStliqMGKH4ZV3SQ+HV+Pf8xu5Pnq87IbUsfxscmrUH3ca0eGDNlhDKTJ8?= =?us-ascii?Q?2hJbzQOoZWbsGH5EbnyR5ZrFC/1HKSXCpfAcIrJLOq8qDy+T5W5z++wo6Rzp?= =?us-ascii?Q?Krt6IaLa+QDwjWca1ptj383xii176HQc16VX9WOgB4t6G5ADMWQYvKes4fcz?= =?us-ascii?Q?ZCAtWIfQmX1Ik1sqJ9u2+68vtstY+mXDSON5HHqYURVE9h/Yv1Fn3Suj1CRR?= =?us-ascii?Q?w5UdrtcjjVpNZlxHC8ri3ZTW8pTbAO7rWDzJCEIM0nlmPq1BPptNQTwk6zRU?= =?us-ascii?Q?0UomK2bBv+GndOwGul28VWcVZzuAOl/F4wF2waKnZUdFRlmzUH9AQtfwxFMY?= =?us-ascii?Q?/tuEK+Hb5+8BvGyx11KpKADeiEHiS55MkUjLbohNWMNgd7OnKwFykwu3Hauv?= =?us-ascii?Q?SKvKATWotp0MvQ1cb3oAu17KRxbt1O8tHc4ogfM7gs8ftwsgmeqLa9pUdn65?= =?us-ascii?Q?GaELH3JElA/BVVP40OZQe0MJuJnyGzjSKwciUyWVuYhm3ApIFh34oT4CN2pV?= =?us-ascii?Q?hNfYqSlFIJBjyGyENSSLJiDTHtrFyv6NNq5HDMUJ52hHlhAe0tddyp72+Kp+?= =?us-ascii?Q?jIpakCkzGdNLceD4h10LnOg1FfkMmOMxE89Ay5mNG9L03xtLjMQCAU6eIkkV?= =?us-ascii?Q?V9g7tqT8bWKHjp9H1upA6K3FbmgQalLat6R3U+5b0dS3eQPYGDT4FBgl6JKK?= =?us-ascii?Q?tc8ota9k3fVI5xwyIfCGQcVyhI3Q6hfybFj8qHCkep3JO8rLdT7/jEt4tRjI?= =?us-ascii?Q?79ky1WDxczbzekD6aBpqa7pzYgI189lqW5dkRlz4oBzpSEI/2Sz0H0+PwiRH?= =?us-ascii?Q?TbC3atxE/rZHUymdaWJ0rZQKZhoaPfDWhuFUcIrfcFuwho9sh59nxU/88EJM?= =?us-ascii?Q?MyDjK78qoddtLOmBqNElaWrnWPytvrFM=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 6:UUDgrWZdaGoOkvc8LU4//cj6FCbCZM85QbKNm84bHlbKJKYqoAPrq3EQub9JU1G2ZU3JADajEZTrvLZ0ObvQD541pTxeEOdYOXr7lrRPQLIXqDldPoftHPaynuMEiAeo7b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J05JGEOoBRhuhOOxo4SVXRBKW3jxVbKkNeRHr7M/IAVbj3uTgRJ5dm4yHxRyznBxx9uSE+mW3o44y1+/PCSpWUGBJNZw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2017 06:25:00.9376 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1722 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: Tue, 07 Feb 2017 06:25:05 -0000 On Mon, Feb 06, 2017 at 10:37:31AM +0000, Van Haaren, Harry wrote: > > -----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 > > > > 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 report > > > out information on their internal state. The APIs are based on, but not > > > identical to, the equivalent ethdev functions. > > > > The APIs Looks good. One minor comment though, One more suggestion, How about adding the reset function for resetting the selective xstat counters similar to ethdev? IMO, It will be useful. > > > > 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). > > > > IMO, it is useful because, > > - ethdev has similar semantics > > - majority of the implementations will have port and queue specific statistics 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 */ > 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* pointer is filled in */ > int rte_event_dev_queue_stats_get(dev, uint8_t queue_id, struct rte_event_dev_queue_stats *stats); > > > Is this what you meant, or did I misunderstand? I meant, queue and port specific "xstat" as each implementation may have different statistics counters for queue/port. Just to share my view, I have modified the exiting proposal. Thoughts? +enum rte_event_dev_xstats_mode { + RTE_EVENT_DEV_XSTAT_DEVICE; /* Event device specific global xstats */ + RTE_EVENT_DEV_XSTAT_QUEUE; /* Event queue specific xstats */ + RTE_EVENT_DEV_XSTAT_PORT; /* Event port specific xstats */ +}; + /** * Retrieve names of extended statistics of an event device. * @@ -1436,9 +1442,11 @@ struct rte_event_dev_xstat_name { */ int rte_event_dev_xstats_names_get(uint8_t dev_id, + enum rte_event_dev_xstats_mode mode; struct rte_event_dev_xstat_name *xstat_names, unsigned int size); /** * Retrieve extended statistics of an event device. * @@ -1458,7 +1466,10 @@ rte_event_dev_xstats_names_get(uint8_t dev_id, * device doesn't support this function. */ int -rte_event_dev_xstats_get(uint8_t dev_id, const unsigned int ids[], +rte_event_dev_xstats_get(uint8_t dev_id, + enum rte_event_dev_xstats_mode mode, + uint8_t queue_port_id; /* valid when RTE_EVENT_DEV_XSTAT_QUEUE or RTE_EVENT_DEV_XSTAT_PORT */ + const unsigned int ids[], uint64_t values[], unsigned int n); /** @@ -1478,7 +1489,9 @@ rte_event_dev_xstats_get(uint8_t dev_id, const unsigned int ids[], * - negative value: -EINVAL if stat not found, -ENOTSUP if not * supported. */ uint64_t -rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name, +rte_event_dev_xstats_by_name_get(uint8_t dev_id, + enum rte_event_dev_xstats_mode mode, + const char *name, unsigned int *id); > > > > > > + for (i = 0; i < MAX_PORTS; i++) { > > + char name[32]; > > + snprintf(name, sizeof(name), "port_%u_rx", i); > > + stats->port_rx_pkts[i] = rte_event_dev_xstats_by_name_get( > > + dev_id, name, &port_rx_pkts_ids[i]); > > > > + for (i = 0; i < MAX_QIDS; i++) { > > + char name[32]; > > + snprintf(name, sizeof(name), "qid_%u_rx", i); > > + stats->qid_rx_pkts[i] = rte_event_dev_xstats_by_name_get( > > + dev_id, name, &qid_rx_pkts_ids[i]); > > >