From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A83F0A0C53; Wed, 1 Sep 2021 08:48:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DFD34013F; Wed, 1 Sep 2021 08:48:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 4C44940041 for ; Wed, 1 Sep 2021 08:48:31 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1815AZhO027890; Tue, 31 Aug 2021 23:48:29 -0700 Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2049.outbound.protection.outlook.com [104.47.51.49]) by mx0a-0016f401.pphosted.com with ESMTP id 3at34prajb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Aug 2021 23:48:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iaqspKfHkCoG8pbyy1It3id7dKfZ8/bc/SrPXQxw7YJt5hfR0McmDk92KkKlYm+2CGLOM5xfTb++lIIlRsJlwRVNIGrLg7+7OxR304FvsC49PnB5+oyMHnOeLZPAlQoxIpmiLGAYZRX59LYaKuTijMT6wwrkG5kOx38I2mn9VUwdN6l7s9MgwuUB3D7BMQmDxOL2GRSHr6Kej2dV7KLHbz2K3QxndRsm2jfAXgho/YTxmt52G9gQ7IA6n0xCJPFep7mE5UOnD7qKa90HJ/TyyF8fOKV8p2eKbPLyAqOdYDXyxGI7eEyfyFNUMCfqloRdDlK3PzAlkolZBmvfrfkhHQ== 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; bh=ii4oMHoYnuCpkcvC2f/0eXZRf+cPQ/hav+v2DiTDf1M=; b=Ia91uKjBDlGDoIA+s7jpsy2WSic6xnbXnNPa4Oux1Tl6NJuKiGZJuD0K/dNf6oWRWUHKdeGz8FgZ0Y20BB2BIXIscAUjpDSOzIBjpvXUA3W7iJGSWY3Xq5/5KLMN4MpAcOzHI/5SCGrp3clJ5Gjl+uJvrwz7e/YzowJB+/aYQ6i4QPFlUhGDht9HTNfnR0C8N1rsKsErdwidUvDgEBIE2CEqL88OD+TQLxQJdDh/WeunU3Mn70YZEdLcesWopOivbeFuYinrVCur14p/m710mXPTP21YkZutTJ7SP/KNinWaS6oxdsbQA4PPBAYVz6mofAXQcNdt1z115tOm3z80Aw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ii4oMHoYnuCpkcvC2f/0eXZRf+cPQ/hav+v2DiTDf1M=; b=d4QBXfZpwh+LqVgZld8VsAyX0NB3rEMBJKvbthhLU5gEHjWq20lN6fQh0aJwxWF/j/OdQEVYM5PBBCbCX+BJPyLWJLKMLJeUssOrWTDAjCsTd0j80fJKVLnbxRFnsSkdSy3AyiysAgeja67x6gj35K0ZzLu5MLXUxvl786+uSEM= Received: from PH0PR18MB4086.namprd18.prod.outlook.com (2603:10b6:510:3::9) by PH0PR18MB4103.namprd18.prod.outlook.com (2603:10b6:510:3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Wed, 1 Sep 2021 06:48:25 +0000 Received: from PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::94d1:2b0c:115f:5a75]) by PH0PR18MB4086.namprd18.prod.outlook.com ([fe80::94d1:2b0c:115f:5a75%6]) with mapi id 15.20.4457.024; Wed, 1 Sep 2021 06:48:25 +0000 From: Pavan Nikhilesh Bhagavatula To: Stephen Hemminger , Erik Gabriel Carrillo CC: Jerin Jacob Kollanukkaran , "konstantin.ananyev@intel.com" , "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [RFC 11/15] eventdev: reserve fields in timer object Thread-Index: AQHXmFbaoheo8+SNDEWO31/MSuEBsquCw8cAgAwBQ7A= Date: Wed, 1 Sep 2021 06:48:25 +0000 Message-ID: References: <20210823194020.1229-1-pbhagavatula@marvell.com> <20210823194020.1229-11-pbhagavatula@marvell.com> <20210824081052.3c357945@hermes.local> In-Reply-To: <20210824081052.3c357945@hermes.local> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1449dccc-a1a7-4e89-e057-08d96d147f76 x-ms-traffictypediagnostic: PH0PR18MB4103: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UyyNl1UcDD+i7ETZtY39VshsCrLqGpIs5Grx/6Qnxa3Jhn+j0Pa2ydzquZTsson53qIuhKKorind7Iz0HiW9Vy+T7GMeLdF6WvHWWvEJOJ4YURW3FNdKwrkjdk0ucpuYM2530nPOe0pSh6bi5dMA24XAbW08Fza2/bo7lNvpHevfU9NCIfWjlE5Baxz6pmaZPA4WUEhcN2hTGZ184q5xsQ59VS9ZSHBTwZwG8w3cTbK02naWzs+eA8uP/gduTVDkbs3F2CZqiYru/dbxxSLgcVqHUcQO5fJQWDy4afRontusd59IuO1eOhagQuEafe5ZHgxzXcwsPHWr3xhKeGS6KtgOOamySV1++mdVywlWWjmExzqlN+tUucf7OLpfgI3eZOjbTnPIdDekv9d/plB5uEWn93J6qpC6+VS+CKDNL71QZTqHACVlyHNZX1Cqh/OABiuFADweAGXzacTzrRd1VyF9sxPgVFLisiu2GnsH0rVLQ//+IAMbyoDg8MfYO4yAizR6PRpWDF0hLjZrbEMrWOPYwewZbzbIBEqfEWQXIOVF6aCh0EigTKtEumDEN1DtBdIBgnGNRzJ286GcCuNt4IAuCgfTHom1wAm51T9M67EgTY3LmdZJtAPMrxkuHFJMjMIT8D68hO9j4A/LwoUEjvLz4D4bmdQAlI4FHtiKGDy13WZLkSdVvakT4tJ1HV5bfY41MEbNe0zO8SIVwSWciA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4086.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(39860400002)(396003)(366004)(376002)(55016002)(5660300002)(66476007)(66556008)(52536014)(66446008)(9686003)(64756008)(8936002)(8676002)(71200400001)(33656002)(66946007)(76116006)(478600001)(2906002)(4326008)(86362001)(54906003)(38070700005)(110136005)(122000001)(38100700002)(6506007)(316002)(186003)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?g7lGaCLvLVVPFpr3ICYNPDYGsXpc0eS19NLTCG/9V888EgoKIVenb6rsAYZq?= =?us-ascii?Q?jjwMahEi1wlS2tQgZC0p1b7RLJFbD2+Ligr0pgWOr1Vb65PqglOQEi6x6LwH?= =?us-ascii?Q?Dbw0IYBP1IQR1/2Bkn+enKIF7bYBAKaCvnyb1cTgeQ+1b/gHgMq85WTzsS0Y?= =?us-ascii?Q?NLW45AJyCMaS9riJmkB1HWvrl9JiWkZ3gRJZK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eDs7lioY1fb6kbYf9hysqjFkPDel3YanPVZfOnhRtX0DRJwmHI5s2?= =?us-ascii?Q?qgRtPlOsnUfZwFWECVUvAscJKdfDRzcZ5aIpxSVTtyfJycV8KzRgroKx2O0g?= =?us-ascii?Q?UjsiQdb1Py7FLKaJ6Nynjq2v2eD7BMCn4+DP0HO830epEu6uthql8FKyUV6v?= =?us-ascii?Q?BNyC41Tf7PgbSjAb7P5nH/562ZsfOeyVVlXThRzwSDcLUAdAE6PUgkA9zbCv?= =?us-ascii?Q?EdsCh1Ijpff5C1/hfmP3ybDXPgAAMVaAajoF6EvVkizxsBoqBVuRhLnsrIqj?= =?us-ascii?Q?gN9iW0OERUzF0Tzb8IQrpWt2+cSV?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4086.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1449dccc-a1a7-4e89-e057-08d96d147f76 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2021 06:48:25.3263 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yXcvfPtfS3ClcUpogkr5so+b4BlXKKpYPX4hHBGAjs3f0zLO/+IPC5Wxwx64y52ChpSR03ODOqEGMK22WL4YljMJYlZMSmgc7YvlVaA2Im0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4103 X-Proofpoint-ORIG-GUID: ppkQ1PwOG2KIWSZxW0e43y-3frKR-lfg X-Proofpoint-GUID: ppkQ1PwOG2KIWSZxW0e43y-3frKR-lfg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-01_02,2021-08-31_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] Re: [RFC 11/15] eventdev: reserve fields in timer object X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" >On Tue, 24 Aug 2021 01:10:15 +0530 > wrote: > >> From: Pavan Nikhilesh >> >> Reserve fields in rte_event_timer data structure to address future >> use cases. >> Also, remove volatile from rte_event_timer. >> >> Signed-off-by: Pavan Nikhilesh > >Reserve fields are not a good idea. They don't solve future API/ABI >problems. > >The issue is that you need to zero them and check they are zero >otherwise >they can't safely be used later. This happened with the Linux kernel >system calls where in several cases a flag field was added for future. >The problem is that old programs would work with any garbage in the >flag >field, and therefore the flag could not be extended. The change is in rte_event_timer which is a fastpath object similar to=20 rte_mbuf. I think fast path objects don't have the above mentioned caveat. > >A better way to make structures internal opaque objects that >can be resized. Why is rte_event_timer_adapter exposed in API? rte_event_timer_adapter has similar API semantics of rte_mempool,=20 the objects of the adapter are rte_event_timer objects which have information of the timer state. Erik, I think we should move the fields in current rte_event_timer structure around, currently we have struct rte_event_timer { struct rte_event ev; volatile enum rte_event_timer_state state; x-------x 4 byte hole x---------x uint64_t timeout_ticks; uint64_t impl_opaque[2]; uint8_t user_meta[0]; } __rte_cache_aligned; Move to struct rte_event_timer { struct rte_event ev; uint64_t timeout_ticks; uint64_t impl_opaque[2]; uint64_t rsvd; enum rte_event_timer_state state; uint8_t user_meta[0]; } __rte_cache_aligned; Since its cache aligned, the size doesn't change. Thoughts? Thanks, Pavan.