From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2886DA055A; Wed, 26 Feb 2020 17:58:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D7012C4F; Wed, 26 Feb 2020 17:58:08 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 44A0D2C02 for ; Wed, 26 Feb 2020 17:58:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 08:58:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,488,1574150400"; d="scan'208";a="438492506" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by fmsmga006.fm.intel.com with ESMTP; 26 Feb 2020 08:58:05 -0800 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Feb 2020 08:57:46 -0800 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Feb 2020 08:57:46 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Feb 2020 08:57:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kv2t+E42A6oePPegwHWsq8Bg25x/QCxATLCrrc6ePRBQLzLw817uSQXuOSDIigy4sbqbowrtmk+VKn/uPkSo9ruubz/0HY8nInZcxjL1EiQ/AY/AubBr0qVYwHwdMYDNDAhtoTeFy7oigcF5NZLdEs7fohSfFzSCvQ4xl/nIAFeMeFlwDFtQitPQp/FfiuIsNyz98V+qMx5WA1yz/TmamE5USl89VBpsGoAB6PFidukbcQdaFZ5FdainzvEF70saiDPnzxu87mliJvmP2xAtHVxlyHAo7TF80AyZ8I52z452jJILsDcZ2LI+xVPuy6aDHt5je8J+1S9/lvr8U5YvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=93+bEKOKaullpIbzxBiG+OCed5iG9xnsV7ilDN4o9rQ=; b=ahu0CtUNnTuYG+gTbdUfHVLr1XWNm7+JrOz/6T9EpvtZAhZsf+N/19T5WVDx7a+ot5wncco5Z6UGsE5UX1dR2Bn96fKagMpVV8enbM8wXZu1AxD2KAgoTJlJZksyfzb8JbbyNODsNCB/6Dsco5tvMp3vye2Ntsiu+iwRE6bQFe+6m2fMNo2Mdj55/A3p29p6KWVqXitp5TKJ7vU+CgPshEWU273Ox23iIHHuB41vxhCfe4jQ8JWavI76uRJrH62bXH02WqEFTVWIjPxhfgbAxBiv3/QfBx5s1TGF4y7GzZTtaL21rW+KQnxI1AqJXlX7YhPEcch9q41R4FoFIB3Kmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=93+bEKOKaullpIbzxBiG+OCed5iG9xnsV7ilDN4o9rQ=; b=tX0WbRskjdjp/ufYxEW55ComHMozWLfF9bfbExnE08WFJ5p0dWwbYuONjdUxXRDBO8mcrYWqLYGEQCf3RcQGkZdCp5HrG3xMSMLTbs8kbTUMPkVTdaoklGxabHPfO6FdjwU0aEhfyKxVcJWP69O8fxO8BAfIAW2xLSM+jo6Z+xA= Received: from BYAPR11MB3415.namprd11.prod.outlook.com (2603:10b6:a03:81::30) by BYAPR11MB2965.namprd11.prod.outlook.com (2603:10b6:a03:82::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Wed, 26 Feb 2020 16:57:33 +0000 Received: from BYAPR11MB3415.namprd11.prod.outlook.com ([fe80::bdb0:a744:9ff4:42c0]) by BYAPR11MB3415.namprd11.prod.outlook.com ([fe80::bdb0:a744:9ff4:42c0%7]) with mapi id 15.20.2772.012; Wed, 26 Feb 2020 16:57:33 +0000 From: "Carrillo, Erik G" To: Honnappa Nagarahalli , Robert Sanford CC: dev , nd , Phil Yang , Gavin Hu , "david.marchand@redhat.com" , "thomas@monjalon.net" , nd Thread-Topic: Questions about rte_timer APIs Thread-Index: AdXi+Aa5jZT/coE5SH+/cgmn4fR4JQJPh0lAACJZ5bA= Date: Wed, 26 Feb 2020 16:57:32 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=erik.g.carrillo@intel.com; x-originating-ip: [192.55.52.215] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8376e6ad-2efb-4748-1847-08d7badcf927 x-ms-traffictypediagnostic: BYAPR11MB2965: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0325F6C77B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(136003)(346002)(376002)(39860400002)(189003)(199004)(33656002)(9686003)(66446008)(76116006)(66556008)(2906002)(55016002)(186003)(66946007)(5660300002)(66476007)(52536014)(64756008)(26005)(316002)(110136005)(86362001)(8676002)(6506007)(71200400001)(53546011)(7696005)(81166006)(4326008)(478600001)(81156014)(54906003)(8936002)(21314003); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR11MB2965; H:BYAPR11MB3415.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: X5g5ihn3gaV95xsmx8UrVXNHxC/05p8RbcDc440Nq1SZQPWQfc5Z/jWzzLQxMmF5OvaM465AsOIanWMOeI63+5vkKPMFQZMsQ7TTSrYn3Sip7hqmfBamVQayNhqq6XsogSL48BG4TYIKr2CVX4OvhV6qfT1Au7h74g/XVSfuRbE+uDQQ/Nk+WYuCScDUy43oOZxoAaITlSsJrcQ7G54SOGL2tczNH06Hy/TuxQ+jOkaHvc/84Br5/jBkpqlQ7s5ferLW8LZrRmekXZj3rWqzXgBA15Qu+rbJLBkFU07XYmmjXCgBiw8LJWOmrUGpOIlmWa15KanpRoa5ORtgpXudsI2jVnOvE+SGwSC0dnQA977YP7NMd/SXi8iB/hh1ALkHA+yuwDNzWYHPKk43CJ4OF5ihvwav3KVce/qfBk2Ym+g+cZCwAWFjTgX75iTFvob1RV1poEn1d4z6KdTB/yFks2mQhAee95eoWfIvHUvcCyHKIjJA4eNCOJ8FX6V3Atdw x-ms-exchange-antispam-messagedata: q+He0Ig9+c68w0sDvSsEBEP2W+dd9yDgGxvZULUVoCa9dcVksw1XylKxaqFkQAk5cPMvSgnyPITze7KTzOWQUtEBSz1rb7qlt2DbNS7sYTvEXBZs28M9qX6SfqF5gHA4Bpzgmafjs/t3rNYWKvBQ1w== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8376e6ad-2efb-4748-1847-08d7badcf927 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2020 16:57:33.0365 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CURLpPrjPXRzlWwgS8cpavm+sFrTHevGYAeCQqzsJTFMRu0lA8QjR8VZCwwT9e/QOgUmFGBCjNG5AZ3QeZaqOywUrZD5HIvjRtMj3aKV3Kc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2965 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] Questions about rte_timer APIs 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Honnappa, Your description below looks correct to me. For the current implementation= , I referenced a couple of existing DPDK libraries, but primarily the rte_s= ervice library. However, I agree that allocating the timer data structs on= ly as needed would be a good idea. You are also correct that, since the rte_timer_alt_* APIs are still experim= ental, they can change without constraint; this would allow for the APIs t= o change as needed to support the above design. It looks like the only use= rs of those APIs in DPDK currently are the event timer adapter and unit tes= t code. Thanks, Erik > -----Original Message----- > From: Honnappa Nagarahalli > Sent: Tuesday, February 25, 2020 5:56 PM > To: Honnappa Nagarahalli ; Robert > Sanford ; Carrillo, Erik G > Cc: dev ; nd ; Phil Yang > ; Gavin Hu ; > david.marchand@redhat.com; thomas@monjalon.net; nd > Subject: RE: Questions about rte_timer APIs >=20 > Hi Erik, > I see that the rte_timer_alt_xxx APIs are still marked as > experimental. So, we should be able to change them without any ABI > constraints. Please let me know what you think. >=20 > Thank you, > Honnappa >=20 > > -----Original Message----- > > From: dev On Behalf Of Honnappa Nagarahalli > > Sent: Thursday, February 13, 2020 11:55 PM > > To: Robert Sanford ; Erik Gabriel Carrillo > > > > Cc: dev ; nd ; Phil Yang > > ; Gavin Hu ; nd > > > Subject: [dpdk-dev] Questions about rte_timer APIs > > > > Hi Erik/Robert, > > I was looking at the rte_timer library code and have questions around > > the way instances of timer list are allocated. > > > > The API 'rte_timer_subsystem_init' allocates RTE_MAX_DATA_ELS (64) > > number of timer data structs. Each timer data struct acts as an > > independent instance of timer list. The user allocates an instance by > > calling 'rte_timer_data_alloc' which provides an index in the instance = array.to s > > Essentially, the library is allocating the memory upfront even though > > there might not be a need to have 64 instances. Please correct me if I = am > wrong. > > > > Usually, creating multiple instances is handled by allocating required > > memory, as and when required, by an 'init' API. This API also returns > > a pointer to that instance which is passed to other APIs in the > > library. For ex: rte_hash library follows this approach. IMO, this is a= n > elegant way to handle multiple instances. > > This approach does not waste memory and does not put any restriction > > on number of instances. > > > > I wanted to understand the reasoning behind the current design to > > handle multiple instances. Appreciate your inputs. > > > > Thank you, > > Honnappa