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 EC200A0546; Fri, 14 Feb 2020 06:54:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C7D11BEE5; Fri, 14 Feb 2020 06:54:54 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2089.outbound.protection.outlook.com [40.107.22.89]) by dpdk.org (Postfix) with ESMTP id C5BCE1BEDE for ; Fri, 14 Feb 2020 06:54:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s36HfbLi85xsyKd10/mXOKh3jhmJ2e4tPXglUXn9It4=; b=cT+naHnwEIEsgIS75iR+QFDLex88Xdl5+2AiKvNsQdgyel3pfY8ZWUivhcAV8d6r6hvNc4OnKnTdicuLyzH2GK/OWvVX89tfqGuA5JVl0Wb34WhmN/GJABSqlvw6tpNyG4tYIqvQ3MNjh/PX001HawMTlLmG2Zk+MXMNt1VdNxQ= Received: from VI1PR08CA0146.eurprd08.prod.outlook.com (2603:10a6:800:d5::24) by DBBPR08MB4839.eurprd08.prod.outlook.com (2603:10a6:10:da::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Fri, 14 Feb 2020 05:54:50 +0000 Received: from VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::206) by VI1PR08CA0146.outlook.office365.com (2603:10a6:800:d5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.23 via Frontend Transport; Fri, 14 Feb 2020 05:54:50 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT020.mail.protection.outlook.com (10.152.18.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Fri, 14 Feb 2020 05:54:49 +0000 Received: ("Tessian outbound 0420f1404d58:v42"); Fri, 14 Feb 2020 05:54:49 +0000 X-CR-MTA-TID: 64aa7808 Received: from b8914e393a47.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 73F0CD64-DF33-4DE2-AF22-E88F892D44DF.1; Fri, 14 Feb 2020 05:54:44 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b8914e393a47.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 14 Feb 2020 05:54:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gO3Xja4FbDK/ZfGmjTgzPqM9PDpbWB1O/wVU1HVl9s5juZA4kD8hsqyaSoi4JoZt7/KVVU9CvjFEd6acri1SEG6DNhNVwDXssByu6Si9Z/tZcdDQqFnGygjrad+GrssmVkQebrggPOyS/Z/UZngsfwVvCJuR91omwq0JSd0SjdChc+3LnZjpwWD0JDpzszA8pONu+dkLuvrlm2j/0SmKGAZInDjE437uF5oLI7MW7bkCeH9KY5Zg7xh08g8sbO5GT9/bejiYIsCaQ0xpCd1aBsBm4cdFPGj4/QVdlOAKydu9Zn6VuGubUe3eqwTUvBEy7NxUPlfUMu0bhR5m4DZGMg== 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=s36HfbLi85xsyKd10/mXOKh3jhmJ2e4tPXglUXn9It4=; b=ninHxH/8SeiLlBt7w1jwpeEzNmERdgfP8LiIBmF+wt0+2BH+1WuRDowW8boDooqZU4srTDoR9YJcQTMumNFBf0dw2+vdQd9F/JT3wxoA9FmJCQdAaJKvoW81nr9yotX7m9b2Nn8eFeJcaGRNGdYtjvG3rDsHwZ1KJgehE99jvuWnC303w3CZFbdYHLh4nL7fq8qxLlxfV199f0tt01tWtnNhplcbqRBFqZ+wT8/x1ibzAnv4bauVK1K8kVM3vnI62p8NBF7jrfkGPNepDXkvWcBDLJdejbLH9VcK+pDyoWqhJryxrm4u5CUoKI3k//xY4dZw/NEOrwpQE9K0bzf2/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s36HfbLi85xsyKd10/mXOKh3jhmJ2e4tPXglUXn9It4=; b=cT+naHnwEIEsgIS75iR+QFDLex88Xdl5+2AiKvNsQdgyel3pfY8ZWUivhcAV8d6r6hvNc4OnKnTdicuLyzH2GK/OWvVX89tfqGuA5JVl0Wb34WhmN/GJABSqlvw6tpNyG4tYIqvQ3MNjh/PX001HawMTlLmG2Zk+MXMNt1VdNxQ= Received: from VE1PR08MB5149.eurprd08.prod.outlook.com (20.179.30.27) by VE1PR08MB5085.eurprd08.prod.outlook.com (20.179.29.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Fri, 14 Feb 2020 05:54:41 +0000 Received: from VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2]) by VE1PR08MB5149.eurprd08.prod.outlook.com ([fe80::29eb:a1be:8f8f:fae2%7]) with mapi id 15.20.2729.025; Fri, 14 Feb 2020 05:54:41 +0000 From: Honnappa Nagarahalli To: Robert Sanford , Erik Gabriel Carrillo CC: dev , nd , Phil Yang , Gavin Hu , nd Thread-Topic: Questions about rte_timer APIs Thread-Index: AdXi+Aa5jZT/coE5SH+/cgmn4fR4JQ== Date: Fri, 14 Feb 2020 05:54:40 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 496341df-5a5c-4435-a4e2-dcec214d12ae.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f97cd05e-b544-4398-46c8-08d7b1126779 X-MS-TrafficTypeDiagnostic: VE1PR08MB5085:|VE1PR08MB5085:|DBBPR08MB4839: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; x-forefront-prvs: 03137AC81E X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(376002)(39860400002)(366004)(189003)(199004)(8676002)(8936002)(26005)(81166006)(110136005)(64756008)(6506007)(478600001)(66556008)(186003)(54906003)(81156014)(66446008)(2906002)(7696005)(316002)(9686003)(86362001)(4326008)(71200400001)(5660300002)(52536014)(76116006)(66476007)(66946007)(55016002)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR08MB5085; H:VE1PR08MB5149.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: mQshZejASzsvjPOMxENxjgEZpz1+OZXrpRIYJOGfPEmqXfEUm4CvE/8ULjqbG436eH9l1Nwwd5ULdPL7qa5pe39DgNleZGKILpSvncUHoDysDmlzBUstUFfp4QSI4qgSf2VDNbNgAdQWV5R2nQC6eTDex43/0fNR7BC6i8FYlWNLhzvByjfH0W9KRz/z/EcgtRfggs/57XB4SCdRV66Xu3YDWkXCd/Zg+FF0aV3Mkj4KK7l36danXDzz3R8lnfTVSp36DcJ8MEfvM13V3aIdr2lIaV9Nf50myL6G8wtMcjjq0NdfrVWNKAG6xLlDgBcrmeQw+QX0e4JTQOxK/2i262Kauf8g35KOGVeog8Y1OgzmaDpXT12dya2sqRcVk5jFRWpNT5qZWwjsne7+BWGvgk8mHl9bFnDhD70kl1SLnLW0DEQljE5E90vXcATTbg11 x-ms-exchange-antispam-messagedata: UB/7vxjb1GSC1oBhL96hO+08VetkZvUJYDpFNlMHNbuHOPTiY8NbWZVVTwU7eoH8Sh+GqS4paIdNUeQVgDKmAOTh6ehG9BnEfEt5KtuzavgBAm/19MOULiFE8VajawUJcetNyCdHXPb0T6lJ1/8KHQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5085 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT020.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(39860400002)(376002)(346002)(396003)(199004)(189003)(5660300002)(26826003)(55016002)(8936002)(478600001)(81166006)(9686003)(8676002)(4326008)(52536014)(2906002)(81156014)(36906005)(7696005)(316002)(110136005)(54906003)(6506007)(336012)(26005)(186003)(356004)(33656002)(70586007)(70206006)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:DBBPR08MB4839; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; A:1; MX:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 69f47d31-e025-407b-deb0-08d7b112622a X-Forefront-PRVS: 03137AC81E X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zLMy+gvjXyWqH//OlWim4OTuBfdsSjMdGsMvq/lnFVg3HcqMGLEt3wyGy3U2tGD+1ToSPN1GJaCAKjLfW0oGo7rjBfHHYXU0n9g5jthPIfM8YO5dG5CKU6+RS8E1Yjpi5GUmCsIH+QNktY91b9FfVCZ1mKU0PTADhWj3I1ELvJxVoPs7zfjG9KMYJT47O4VJZlTWQVfoNS5BuYRu5CmwQLhe6AD2zi18eHrAsL99GS/SY3OOL9YRYB6VyRrjNpc5VnIojgmiyoBcUpMXw8ARX5l2dvlKaESFOM04lkSnmIif5lMPpfQ5TuCOvzHkqAWcakXVpSk1/X2NTe+ej03Sh4ExNNq+KyITH8x0cmDPzpiHcuJ3j2lwLP4Hsol+e79RNRBhp10qEIdB8j4XGjRExRCge8vMJy9w5/RnNXdisffdyy56mj1kL1WDyYZeTsNq X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2020 05:54:49.8482 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f97cd05e-b544-4398-46c8-08d7b1126779 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4839 Subject: [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 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 o= f timer data structs. Each timer data struct acts as an independent instanc= e of timer list. The user allocates an instance by calling 'rte_timer_data_= alloc' which provides an index in the instance array. Essentially, the libr= ary 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 memo= ry, 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 an elegant way to handle = multiple instances. This approach does not waste memory and does not put an= y restriction on number of instances. I wanted to understand the reasoning behind the current design to handle mu= ltiple instances. Appreciate your inputs. Thank you, Honnappa