From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0051.outbound.protection.outlook.com [104.47.36.51]) by dpdk.org (Postfix) with ESMTP id 9BFD72C50 for ; Sun, 19 Feb 2017 13:32:51 +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=wWfTxGYduQ80cfURKFkyHvCo2L+mg6+Sh0q8OUNUoDM=; b=Wo06tDuzSiZTEC1QP5FE6KVUwdAHmtoO60f2tybZEoDGIA3rKzLksTiB/cBN77qzm+RSBa9dwjYhpDDWsHD6IK8yc3AqN+JYCA1ujRN3jH0TKcaxqMKnxpgAekmCV/Ta+OIB8b8UsPkJu/g2bA3Ub5X3TOlkDkH/vBw4tSmzR/k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from localhost.localdomain (122.172.181.0) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Sun, 19 Feb 2017 12:32:47 +0000 Date: Sun, 19 Feb 2017 18:02:25 +0530 From: Jerin Jacob To: Harry van Haaren Cc: dev@dpdk.org, Bruce Richardson Message-ID: <20170219123224.GC7400@localhost.localdomain> References: <1485879273-86228-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-5-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1487343252-16092-5-git-send-email-harry.van.haaren@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.172.181.0] X-ClientProxiedBy: BM1PR01CA0093.INDPRD01.PROD.OUTLOOK.COM (10.174.208.161) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-Office365-Filtering-Correlation-Id: 9ca74916-b233-4b64-4059-08d458c36a6a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:8nf1CEogIzGL97yueW1K8XU6wKla0Kta6cNk/ltR1njxoa4kJ5xkWRWtDpWbATbaRxeXVMtLeeDUaagmGYLFfsqELthtcytwGANEPrmrr2NgbNy/NfspCu1Ov2lEYVKUF+ZYEGpeMt7E+6TeIL4U+h1XR9XsgbYd7GooTmBdtsTt/vixVu+hXP055zSeGLp/fE2rFD3avq2k0+zlYY8l1eyEyaespBovUQMtExyN990WsLJAaXmAvBmfx9S7F+R3ABdBoaw404XiM0QQ+0B1Fg==; 25:uMkoSzZetAugTTh6wrHLMRe28DDA/k2iUNhA729kFTyj82nNtysmzDLpxkxO9SILgpGOWoDuHoAnyZrXMDkOMTSQmTQx9FavpFZjLDXSr09UCX0P5VrwTJtnXrXdunY0MrVZTXyZkV/jvFP7U6Q75kaXkMUEXMgRGlFes13HAuErh/Cdaqko0LjKGR1I8zV/mdtr48t5oIxBVbLR71s9HtRDq23k/jDOkBqDfGOweN4TslvZJUHtPuGzcGJarl9oL8bXN2vQrogF2ImeLjx4EHMbMVoA0XDcyKfQSJL0WTyMtsyQtQnlZKCu+MPs10dwpK24B5Wao7Xm7xsHWZ2039jEQ/ktjsStuAVAqt9ZXi5PRrYV4G1Hc9hgWLuGKi/qmnWGNFRDwIfSSzPQYWw6hKY3F7cUGiRSZl4oSpcpYR/L9r7z36YiDQlCdp009Uj7nL+Fv7MQqRuIG8z0ETH/MQ== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 31:4H5ovJ/urLHDOb6lSCmPw47B89kv/JCTmeXbpXj5GXQRjdihvU7zjumGdBCMGGh+kGV8XrXLoCkBF2D+Ik/vskV+ozOg+C6ffifJ5eTBxirqOzFBMef5MsXhBu2/dXgrLkpfjSc9T9vSqDEIYBuLkdOXzE+S4ac4PdGTnGMYRQ+KotE8+Xqxs6zZl6fn/J1nqtwb5idXgsXKtIWecE91ik92YDO8MgXFNkEvl02T/oRjyVXhNZokht0cFAcwPRe8npnZiML0AVu10AiEQ4RwEa1RqVkrIscqrcMKPP80PQo=; 20:Nr9ZTJKsGnpqo802XmHsdZHn1WrNmJyYWXW2IH4kSRyWWoyMD3NRGBfQuCAt8nEsnBsN254i0pdZ096bXtTjJI+g1wvewWRPDAL3RAOBooFVLIj36M2N4NJQAZTG4ts5PCEL/nLdsoul+gMbryuGTuG04siHMSRWK+cV5A0JW/+gS3KDXviPDyaPWrdQlp/+18MYMILL1RaewdVD5e4bIFcCV482NtmaWJmMqDY9cKzuf0iO/mFNyWbzcqXJx9N+fXdJd8/6Avrk3+4u8iT6HElB3H6HGI6jUfdFIp/R7CwUNVBLlvuCXbrWkb0PJmWtZt16VwCn54bObV6bFM/v0g9uFyNnK854CtCtXIzmcVN5bOQcFrhnOCAKmjTjP3w/hxVluSb/vv9IHkly8JX3k0D6ZA1Pp/DAPaQeJr8Z0+cikTBD+O72fPocCoGxl6xj5G4Qm8ZC6XIkZ1oVnVUdXNUOlYT0BeQSCOqsYqUAq084mVgCWlZHQJmNheTr0LlE8YWate5m12vGH76FzaDb5PMkZW4xwgv1o0KEqmPYLnUJF4iOYCIx4pio5BTi4SREKF2CfuDHQNqBrzHs/mxBEomb+WFHVdP1cYFJfWqUHkE= 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)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(20161123558025)(6072148); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 4:nwgodCG1nWQ5yNboyGaTegCZt2sF6jh23BuFmgbH3FS0Dmk99hmExDBxuj1lB9mLj5hC1eW6q1PeeQn03m2e5HzjW6KFhDMrf9VXBsExdcehAZQxjj3lvuXlC+viJSkrGLq1NLmUTkMqOKEFaBImubbyjCmCmOI4gCdRuhrlUKtQs4a0LgRi1dXcYY+0tAuEI9YVeAllEaK1uDaxX+uwPgoFbwizLPDdOeJZ3wzsjMNQh/mx0gI0qDf0001fQSvUOfmvO/90cxA2PRNRPVF+XGKUSgRG7d9lF+L6ecic6yCbcmirhYbx8uS9GpTKPAWUI0t/DDufWqYbXDrg2SndXi7dYFSY0+VHZgpt3ZrflL/3RrKM5Vdo6SyYG4LqI240jdS4S4L3bqcovaHYrSY7zAFbaFXFbz3BeqWa1STHmFPxYxfo118bIODCwbuMRO8CS0FpHXfSTftprUiMoPY7Ogfan9WV1WzoC97eMgJX4kyvFelYGIotYmearQjv4/LR9lHvnuO8EjnJAanV6/kitNVU5VisHAN7z5qlJtuswQfIUFEolPWGYoNGTpn/cfN8s0RD6KLyCqqIO2pCS052huQjmKCOcPPcePmF0YCH/4QCYgyGAOfy3gUG4EFEe1vEsJ34A8JaP6cRldAXrwS/lw== X-Forefront-PRVS: 02234DBFF6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(24454002)(189002)(199003)(4326007)(4001350100001)(7736002)(92566002)(5660300001)(6666003)(42882006)(6916009)(2950100002)(50986999)(2906002)(305945005)(61506002)(76176999)(189998001)(50466002)(83506001)(97736004)(110136004)(38730400002)(54356999)(6116002)(3846002)(66066001)(47776003)(1076002)(23726003)(33656002)(105586002)(106356001)(6506006)(101416001)(42186005)(229853002)(81166006)(53936002)(6246003)(81156014)(8676002)(9686003)(55016002)(25786008)(68736007)(18370500001)(7756004); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; 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; BLUPR0701MB1716; 23:unPJ3XSmx82Xvle1U2o1udjjN8R3zikWVud2aSA?= =?us-ascii?Q?MNvxU83i2Sj29h2QCduF3+lF+t3/755LPIOO5s2b4swxSXZ8S+0RICQfp1wM?= =?us-ascii?Q?C5A1Wps3nvQLXhg+zs73he/HUcUloIF9yyU1ok9bulstpyQJEuIThVLNfggW?= =?us-ascii?Q?eogh+knMXpGnbE3Csl/2EN/kRiAynAjp94DUoys315l5xjojDec1sfoMBUtV?= =?us-ascii?Q?AUpYoinTRg1+LSbAAri6Ry2fqxIIBZsWS4gOdn9+QcBo0jo654ZoGKk/6Z5G?= =?us-ascii?Q?XknLezvENUSy2odnCj46OmUVGsYL00axIlyyYzcv/N02XLLxD9KGJ6JxbU54?= =?us-ascii?Q?RVfPU4/EKAkYoekJjf5rJm8Y5nDFwvzTXrwsHM1mxd1eyPNnZjqOFN3aFrTk?= =?us-ascii?Q?18tbtD3kIPAyc+BuXoz0S1mC7F7yr4fyvArQrWX2KKfLGQNo4PExrHmdpKjM?= =?us-ascii?Q?HIKqVgz7o5GmMhnNHHcUPpJ+fCl3/4R2FdDsGAryCYuZC6FHnCpSKR9Ueo9A?= =?us-ascii?Q?rQoSJu3qdbc61iFKZP06kQhF+My5t5Ndh4lBn6zpC+W/SrLIN//I/uVgpg7w?= =?us-ascii?Q?dFZro2ZPL6p/NFD3HViiRwv2Hu8zDEJQEFiEiCc2UsAloLFMnpM/WrXsYzl5?= =?us-ascii?Q?HK9N4jx2g44L1/LBGDoLK8Y72TuDLaiqqvj+BJ5wRAV/O+6iY76OpR8QJz0l?= =?us-ascii?Q?yS7ECyN+uy0hIkwaA1vPRz7ARTkMwj1+bPiCn5aUIE4NKnHJIb/F2Bepfq8b?= =?us-ascii?Q?9IgUJ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5:rp4Um7Izelf1uDVa1+B4qESzevFTOCWcB/6q2aE4kD1/5DaFVN4+MFYZReQF41OPPHL5SEUHnMz8AxvI9ezZE1ID1QRt6w0NFNkA3hUbCuQNsOtxxlNLqrhNR3Sx+D9MV+pS7LsOJskHaH0WsV5GPg==; 24:xa3HFve0xhFtbk5Ty6gIn59H06NuYVyNutjRR+Q/srYXxioifJJNSYERFNlygbv0hXt4gnSVE4YN9bgzQGXCyrxLmBRWRECinnOC/538xkg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:8Ge+i1enAV92E1vXt24r1MGhR0/JSLYEzf1WRQYIJe1syqK5PSjKHy8rYwPIPajjhoql/smluDCi3PSCbU5A/UrcWPoSC+Tsv7MK9KG+iaR5b420FB38Ct/FiJpKhmz2eFm8XUz/T2y5xHNgg5aoBvk6CyuWhnjkjnTxOeT8PVSlzGTOwRMWiwJbirOuXhYeoWIfW1lAhoNNbUX5akpeZ6mTN4oP4oyQfotmVQB0xOaLc+ixeul0OZ+eFKk8GgG4II6/lrQcNYTHls/1ISRXVFwt/3HHa86alMMg9kR4N07bJH1abPtqdIvzHs33paa7A1B9jK4mGQdQv1MAkvjQ4Q== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2017 12:32:47.8453 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: Re: [dpdk-dev] [PATCH v3 04/17] 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: Sun, 19 Feb 2017 12:32:52 -0000 On Fri, Feb 17, 2017 at 02:53:59PM +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. > > Signed-off-by: Bruce Richardson > Signed-off-by: Harry van Haaren > --- > lib/librte_eventdev/rte_eventdev.c | 78 ++++++++++++++++++ > lib/librte_eventdev/rte_eventdev.h | 118 +++++++++++++++++++++++++++ > lib/librte_eventdev/rte_eventdev_pmd.h | 70 ++++++++++++++++ > lib/librte_eventdev/rte_eventdev_version.map | 4 + > 4 files changed, 270 insertions(+) > + > +/** > + * Retrieve the value of a single stat by requesting it by name. > + * > + * @param dev_id > + * The identifier of the device > + * @param name > + * The stat name to retrieve > + * @param[out] id > + * If non-NULL, the numerical id of the stat will be returned, so that further > + * requests for the stat can be got using rte_eventdev_xstats_get, which will > + * be faster as it doesn't need to scan a list of names for the stat. > + * If the stat cannot be found, the id returned will be (unsigned)-1. > + * @return > + * - positive value or zero: the stat value > + * - 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, > + unsigned int *id); > + > +/** > + * Reset the values of the xstats on the whole device. > + * > + * @param dev_id > + * The identifier of the device > + * @return > + * - zero: successfully reset the statistics to zero > + * - negative value: -EINVAL invalid dev_id, -ENOTSUP if not supported. > + */ > +int > +rte_event_dev_xstats_reset(uint8_t dev_id); I think it would be useful to selectively reset the specific counter if needed. something like below(Just to share my thought in C code) int rte_event_dev_xstats_reset(uint8_t dev_id, enum rte_event_dev_xstats_mode mode/* INT_MAX to specify all xstats on the whole device */ const unsigned int ids /* UINT_MAX to specify all the ids on the specific mode */ Other than above comments, Its looks very good.