From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0040.outbound.protection.outlook.com [104.47.32.40]) by dpdk.org (Postfix) with ESMTP id 4481D1B41E for ; Sun, 8 Apr 2018 09:53:15 +0200 (CEST) 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=0MB7dw1qMayPtT0L6JYz8vt+cKqFumWDFibjyHgQxwY=; b=jUz86M/dtRnzVLkDdrHumYIXx6cxld/ZW0ga9xXH3iHvSYkxsosnDdQD/qUXw9W42c36x5JdJBS6UrzAU6kI2YwtW6yIhvt2X5MyBw+Z+h9DEWuOwuaGi7xiQhrsEFd07v9sdF3voAqWvKShAP1fostVAsotarKpZi1onZcjyZM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.178.210.9) by SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Sun, 8 Apr 2018 07:53:12 +0000 Date: Sun, 8 Apr 2018 13:22:57 +0530 From: Jerin Jacob To: Pavan Nikhilesh Cc: santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com, dev@dpdk.org Message-ID: <20180408075144.GC6880@jerin> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180403150514.24201-1-pbhagavatula@caviumnetworks.com> <20180403150514.24201-6-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180403150514.24201-6-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [122.178.210.9] X-ClientProxiedBy: MA1PR0101CA0009.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::19) To SN2PR07MB2526.namprd07.prod.outlook.com (2603:10b6:804:6::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8e03547e-eba3-4c9c-d8f7-08d59d25c832 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2526; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 3:wiNEHnitUfdA8bkbdqDdNQhc2oXtyUiq7UHDgVZ1f4DtUdMk5HYjeQeKD4LMtj2Mq6zafEbt4COKimEY9f2XEyVJUHhX9RM1B52xGqbnGtK2VbniDVahn5pSg9TpngeKXh5p6zeLfMFCBauUn2ejgIjh8+1vnISRjgSrRSy7TdEM/3W3bJQGk2wZ0qLGaluAG5hl0OuDFuQFCxtSkQ/J6dsO4pFaXdxVPr4DDtYyrsyOSjKoVjonUx+gPQGRUWV5; 25:qe6Z7G03eUcPXmFNbDYsicnk6qIZRivlyIrctsnkngtnxO+M3Tv4Z7acv1LNjzyefv4eQaky3vdEUF/FwmWO+WNqTTTBtGDjcueUg82jp/F1DVvkLI6evJXrnW3Pr4p0le9X/JE4kkJoFGmcAfPlUkh/YmpdFMDSefC4JnpDKSs1bw0nuPp9YXC2hTAJU+WAg4CS/lpF4nOj27uiaOp7QacnvjOeI+IXbnbbhDuW+XFcJhNqs+tneqGglRPF5pAaB+OOaxvvK3Q3SwFUMEjqqhiXWCuVEN1AvddFz4vgE1zR4cNhaXpO/Rsc5LOce2VDzyvkBKtXZYoz93EXZVjgAg==; 31:dqY02ghc/CjSFCtRBCIKvzVeXqSVNT94phkU0av/qISMh94f8vuGcoxkDv9rMqUtLozTKCeWy7SYHshTaUUPPfNweVQVGGc2fi/UcGDSxtPXPUy9EyJbEpdt6Gm08qs5GR5O/kDwPQci9fDOkGmsW3syHIFdtn4/r3ei9P0eqfecgEypcaEE2Y/lQ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antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(3231221)(944501327)(52105095)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN2PR07MB2526; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2526; X-Forefront-PRVS: 0636271852 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39850400004)(39380400002)(346002)(376002)(366004)(189003)(199004)(13464003)(1076002)(25786009)(33896004)(6496006)(6116002)(3846002)(386003)(59450400001)(5660300001)(4326008)(7736002)(23726003)(81156014)(305945005)(68736007)(6862004)(316002)(58126008)(16586007)(486006)(76176011)(476003)(52116002)(6246003)(956004)(106356001)(11346002)(8676002)(81166006)(97736004)(55016002)(33656002)(66066001)(6666003)(2906002)(229853002)(47776003)(53936002)(446003)(26005)(6636002)(42882007)(72206003)(9686003)(8936002)(33716001)(105586002)(16526019)(478600001)(50466002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2526; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2526; 23:7vRlFMnAm82KckIGHybDCnRiUeLaiLltxntkY2ncT?= =?us-ascii?Q?5cUTEqBq178h2AkD9rztT+ZLIiWLvT6eUPmKPUfrblvXUMAX5ugh2igT2Wr/?= =?us-ascii?Q?UgCPLGNay3x51Kfl0eS0ov6xoqxumTNROjK9kpqbXkS2Op5QqE7PXxFA2vLa?= =?us-ascii?Q?/5l0wk+R6rhZFNRCsKIYvMIkKsquLBhyX7oJRS650v4Y9dhwlSm16Rd9SnON?= =?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DZDDGXCpkjccvrFfW14m7uluBfjLVWV94Xb5HSUJzhIMX24H3e4XG4pnxAPdPjVz/2Wsp6DimGG26VlayocYknutuQWvgCLUuqxB5rdKql/O/bucbmM9kGe+K8=; 24:UYhwhh1/auyZE4SOBsnTxcBW7A9Bv65lPrAZg7iybxIhykQ/bE8r764xJ2ABRAKlZ/02HlIeojn3bgdvdZUjQE1rN5i0E0Zb/H340IgeHuI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2526; 7:kpGtLBPT1vl1SHGyPLfxEvak96srYmmZoB80jkFgLzTnwqBmgU6rpOmgeajfMHEqv3+Yw9N331IeKJu9RNNSvufM0WTDPMjzKnXKiqggHhfSm7WWMdcmtTMIcHyve7I7KlkXQxxZylUTKybpZuBWNCmYYnsBa8RLsjsWzLFEn+3LsNn5fZJnRCYnAhRF4JM3ugvnldPRpnd7C3FVgBS2AE6m0WB+nVdSK6S/F7FCwZgyT4zr5G6aF/5Dh+/H7+HM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2018 07:53:12.4825 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e03547e-eba3-4c9c-d8f7-08d59d25c832 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2526 Subject: Re: [dpdk-dev] [PATCH v3 05/12] event/octeontx: add event timer stats get and reset 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, 08 Apr 2018 07:53:15 -0000 -----Original Message----- > Date: Tue, 3 Apr 2018 20:35:07 +0530 > From: Pavan Nikhilesh > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > erik.g.carrillo@intel.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH v3 05/12] event/octeontx: add event timer stats > get and reset > X-Mailer: git-send-email 2.16.3 > > Add functions to get and reset event timer adapter stats. > > Signed-off-by: Pavan Nikhilesh > --- > drivers/event/octeontx/timvf_evdev.c | 26 ++++++++++++++++++++++++++ > drivers/event/octeontx/timvf_evdev.h | 1 + > 2 files changed, 27 insertions(+) > > diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c > index ccf724115..4db10cdd0 100644 > --- a/drivers/event/octeontx/timvf_evdev.c > +++ b/drivers/event/octeontx/timvf_evdev.c > @@ -281,12 +281,38 @@ timvf_ring_free(struct rte_event_timer_adapter *adptr) > return 0; > } > > + > +static int > +timvf_stats_get(const struct rte_event_timer_adapter *adapter, > + struct rte_event_timer_adapter_stats *stats) > +{ > + struct timvf_ring *timr = adapter->data->adapter_priv; > + uint64_t bkt_cyc = rte_rdtsc() - timr->meta.ring_start_cyc; > + > + stats->evtim_exp_count = timr->meta.tim_arm_cnt; > + stats->ev_enq_count = timr->meta.tim_arm_cnt; We are updating the these counts in fastpath. Right? As an optimization, may be we could take the arguments from vdev to choose to enable "stats" at runtime by making it two function pointers. By default it can be disabled.