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 C3207A0548; Tue, 7 Sep 2021 23:02:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DD3E410ED; Tue, 7 Sep 2021 23:02:41 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 83C28410EB for ; Tue, 7 Sep 2021 23:02:39 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10100"; a="199844671" X-IronPort-AV: E=Sophos;i="5.85,276,1624345200"; d="scan'208";a="199844671" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2021 14:02:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,276,1624345200"; d="scan'208";a="648207277" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga005.jf.intel.com with ESMTP; 07 Sep 2021 14:02:37 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 7 Sep 2021 14:02:36 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 7 Sep 2021 14:02:36 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 7 Sep 2021 14:02:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n29wLacIInYbaufUd2tfMJpoI/iKSmlHUHpOjpKRgdRdWAsPlyJem/i8OZ6YpkECz1RSUegm3nh+UQN1ix1qgwO5NHad06aepz13EgnjZ7DhktqdNNV8lJcDxTC/J3ozBf3v7uCo4UPnR/whg6C4xtL5G0QRhU79qVUFDUyTBTV8CC5H1vQp9HWlXLJH5lJv/X3UTCJfvMUYL8tSMAQnRWjOrlbIBVDi49t9pmMrLwisrhoB/loslfdHuXqF5oRcmawx4ne3yjvuyDn2CEks1YV0LI2nq7k9R2l8ZUfjVVMvNIH71jFRko9ETBL9aKQ3Ho/uIouB6GOoOh03KQj0gw== 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=DcwFDG4+KtM5ha/wvay0DO/KRChjVsSLoQXZxX40OBE=; b=I9Dd6Z+cRqW6ScipsuyiX+OZVRP/S5+J40H7mysReHpPS7qcHSPvJpcyr+2ITc1h+GVj+3eH25vqjU0PwVdTD661/XD2J7jpaOzphKLOXlG6U0NDpDY03MzxHmhYlevY9PUtkYLGLxK192wwMmMzerSfW5dW3DQvpEAwLuVvpxSaRjs97bY4SHb7vtYJ2k8g8NdHZ9x4KPj5yNSMh7Y7zTdQ0kXDneZI2q8pO/Dht2TPtR1b0m9h6UPmIuW6nk16ZpGSMvGWdIAYluqjYhtYrI1VtYTUYYiT80c/Vxq0tdHoAl1ClkX7vwtDFN5dygJu4Iy8R4/DDzmgGwD608UZBA== 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=DcwFDG4+KtM5ha/wvay0DO/KRChjVsSLoQXZxX40OBE=; b=pIPRRiG+ImVr2eBja3ZPNNXNcCDKoNirRmYWo6vbbznr6AzuY4rRKFW5SvlzO4ki0XV1MRT+KkpA6YE8MlTjc0y6iuVIE/Imi95htaJWVkQ8+rH947JM4bUzIrZcN0yZmWkyQv8K/k5PrQ/nDdqh+8zkBeK/Isww5MTeM4t3Wq4= Received: from SA2PR11MB5196.namprd11.prod.outlook.com (2603:10b6:806:119::18) by SA2PR11MB5051.namprd11.prod.outlook.com (2603:10b6:806:11f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Tue, 7 Sep 2021 21:02:05 +0000 Received: from SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::b8ae:106d:fe92:1996]) by SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::b8ae:106d:fe92:1996%9]) with mapi id 15.20.4478.025; Tue, 7 Sep 2021 21:02:05 +0000 From: "Carrillo, Erik G" To: Pavan Nikhilesh Bhagavatula , Stephen Hemminger CC: Jerin Jacob Kollanukkaran , "Ananyev, Konstantin" , "dev@dpdk.org" Thread-Topic: [EXT] Re: [dpdk-dev] [RFC 11/15] eventdev: reserve fields in timer object Thread-Index: AQHXmFbWoMYpTfh5s0ahWBzQJoS+cKuCw8cAgAwGRICAClsfYA== Date: Tue, 7 Sep 2021 21:02:05 +0000 Message-ID: References: <20210823194020.1229-1-pbhagavatula@marvell.com> <20210823194020.1229-11-pbhagavatula@marvell.com> <20210824081052.3c357945@hermes.local> 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.5.1.3 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 77dae3af-5b7b-4f4d-202b-08d97242bf8c x-ms-traffictypediagnostic: SA2PR11MB5051: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: urCkouIQcV6T3ZmUAPwmKWDjPgWuzN1m3odsN4d13D34qUL7Ni3gRbhzsaa/gfoEAy6ePt/uS9+GcFe05Q02iV5uUiugGjNTTO7grIyg9aCud2vMoKa7EIGmP0vX5j04KulYJMnuuXCrzKOc0oOZwr3Vk1XFJQIUgAl9tquzmUz4jP5vJOVOA8RrEsjh/x0TnajkaAG4x0d7NSHC3zwnsS6IyebaR82KFrKDmEDdhAtAvYaC6H+cb8HHSr64Q2zWmizU0OH/pCIJXBS4RKSV0O1U2xtWm+aFWBCbBefCWs92MZ6JnHcCriFSjtm88t00oDx4La0JQTgEPUw9D7CUoC5sLSrjxZJUGMGjjZWqLw27HKkDQ+21jy3VOamKPYyVsshJ1f+mklEmbkv5M+hvYwfRc6/tYe1Z/YHIdrMr9JH0VQ7vdG87/JcSblSVW6LZXxKywKMH+8tHmegfAPhMS53I2ZfMEO8julR+h732JgVVD2teyf3HNPM9it1KDtTToxn/xuCGgs9XftWyf2eulyIiCX215UifgEFzvWZzJPR+vAf2y3DAkBpet5HM56Zk8KfjlWTshMhFgw8qSAjNMDhjcvjuvvM0LamzZ5lK40YpOHkofGpbgvNrfjfnyAZjx0g8E8pYBDZz0hocPXjWkoEfnZBuD4kChmC6GmKnC9JnWc1duIk71VpM+wUSxJUIJV2Dqmw+7q1Ri7mdwVkWEA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5196.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(316002)(4326008)(38100700002)(122000001)(26005)(9686003)(86362001)(71200400001)(66446008)(66476007)(66556008)(66946007)(64756008)(5660300002)(52536014)(38070700005)(83380400001)(76116006)(8936002)(8676002)(186003)(55016002)(508600001)(6506007)(2906002)(33656002)(53546011)(7696005)(54906003)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Jn5+DyWqWYDMPlB6mbnUT2kpXgzK28nnWxvFC0Bf9gVfQVhUMQHDwWCRz4nL?= =?us-ascii?Q?V+9oPFyZfOrN5KTAa50fqOGbab8nKkeBpZxvTodp+mF4eLiMuAesAt43+z2i?= =?us-ascii?Q?QYCw9WgAH7/A8zfbuUNFN/18ChQZ/lvb9HNpx3DU/R6c3ffu9ulfMa2BjA5U?= =?us-ascii?Q?E7faxJsWreYWXrSjDRViuIpeoFgxRXpXohQJ802XwaYrNWGWF8zQAt3W9yiO?= =?us-ascii?Q?1WbINdvuUl0HD2LywpKz3S3LhwzrFq5lzTAqljElj4er/EiWV91Iy4veyy99?= =?us-ascii?Q?1ZlGTDruIZ4+XjlQ79FAxhORi9MF85+eMs6ACuDag0ZKl0/5WAX/s7ossdDd?= =?us-ascii?Q?luaN64bheLhsH9UGAZZZTt02d05G6tdiG7VIhGKbiqiptkuIXtz9DeC9zv9Q?= =?us-ascii?Q?7s0BGFgrhQ5gjExao/DBeI2CJzzdZWr0xy7DC+0F1CEYtihAvkb4cblrxkpw?= =?us-ascii?Q?Tv8CIrcBQRYYW/8GfKyP5P6CJWvzxDe5FBufhjIJUaGFuJCKO+K026K51MVq?= =?us-ascii?Q?AO4hI7pRXBLU6KJdykzsDtxJHDJEmNeif+1EjBqAl31sAiZdNUh86nFL77bw?= =?us-ascii?Q?+Yb+7IQjENPZOZeDBszJiRB/IFlncHUwqAM/jZxQMBuRyGwPcoH1ZrRmZds8?= =?us-ascii?Q?jdqZdTisqUtpNQtNlKvWdEcQCe+5NVa57KVGMVtgfoayejNS4DB8oAITYhd4?= =?us-ascii?Q?EaXe5c71lWuWN0wg1w4JmrPIs4ZIiA3OnSIvG+Rz6MCGGdhHWQ4v8MYvRMyV?= =?us-ascii?Q?PsuSnW0n9TwXGF0NcX6gdTMszghRIvMNSw/7Aboyv2Xhj2QRomhc6sRUI7p1?= =?us-ascii?Q?ylZEpa0oWB/Zo9Q9eUhWrhfkiLsH06pZSslQU2BT1KDdl+YXeWAWeJ2p3F8f?= =?us-ascii?Q?8URTTKE3Y07zEqUx4wgY+QjQ1QT+cpjOdoxTBn8LjjYHI3YRUCleL94qFGnd?= =?us-ascii?Q?n/ItC8unC2q1OI/xYRkyHWKvH2cTmrre3eCN2SVHaVsDS1p3Ga/eIiXYGZvx?= =?us-ascii?Q?QEMEO0mtXX6d6gmq7CwHf1jRi9baNdA5bZzzYpf1zp84fZ93qFoZpz5bkoSx?= =?us-ascii?Q?/Vy5av3MBXtm20BzNs1DUH2NWXEPzRelYQ58gjm1bTtxn1ufdb9PdIj/GB1y?= =?us-ascii?Q?rqbzFj9laIZDn5zmtYSKTrA9k1eK+t5unmmodKlffLVggLfvhHjUVwxXef69?= =?us-ascii?Q?qBnVfzLiKM0iOhDHo6x8viB2AzMI/NdVShNc04ZYYBp/bsemoRDZZ7he4cOd?= =?us-ascii?Q?HnqPFzq1r79KK8OPcLcbFS6JdPIPyYEQK8uFROov8Kx0Yqxa7FpnyABx58kI?= =?us-ascii?Q?rCLpnxHV88W9VckvSfUJyLsA?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB5196.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77dae3af-5b7b-4f4d-202b-08d97242bf8c X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2021 21:02:05.5291 (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: 6A5WvFFBp7xoCtkQCGoU/Y+V4fk8G9w+dBNudcD0ziEaAPwZpeTJNVwtgMMVmwldchcPR7Ou4/kTi6qs2WEnWVpjrtD3Z9OR4ZlvE/t/gnw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5051 X-OriginatorOrg: intel.com 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" > -----Original Message----- > From: Pavan Nikhilesh Bhagavatula > Sent: Wednesday, September 1, 2021 1:48 AM > To: Stephen Hemminger ; Carrillo, Erik G > > Cc: Jerin Jacob Kollanukkaran ; Ananyev, Konstantin > ; dev@dpdk.org > Subject: RE: [EXT] Re: [dpdk-dev] [RFC 11/15] eventdev: reserve fields in > timer object >=20 > >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. >=20 > The change is in rte_event_timer which is a fastpath object similar to > rte_mbuf. > I think fast path objects don't have the above mentioned caveat. >=20 > > > >A better way to make structures internal opaque objects that can be > >resized. Why is rte_event_timer_adapter exposed in API? >=20 > rte_event_timer_adapter has similar API semantics of rte_mempool, the > objects of the adapter are rte_event_timer objects which have information > of the timer state. >=20 > Erik, >=20 > I think we should move the fields in current rte_event_timer structure > around, currently we have >=20 > 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; >=20 > Move to >=20 > 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; >=20 > Since its cache aligned, the size doesn't change. >=20 > Thoughts? >=20 I'm not seeing any problem with rearranging the members. However, you ori= ginally had " uint64_t rsvd[2];" and above, it's just one variable. Did y= ou mean to make it an array? The following also appears to have no holes: $ pahole -C rte_event_timer eventdev_rte_event_timer_adapter.c.o=20 struct rte_event_timer { struct rte_event ev; /* 0 16 */ uint64_t timeout_ticks; /* 16 8 */ uint64_t impl_opaque[2]; /* 24 16 */ uint64_t rsvd[2]; /* 40 16 */ enum rte_event_timer_state state; /* 56 4 */ uint8_t user_meta[]; /* 60 0 */ /* size: 64, cachelines: 1, members: 6 */ /* padding: 4 */ } __attribute__((__aligned__(64))); Thanks, Erik > Thanks, > Pavan.