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 075B1A04FA; Thu, 26 Dec 2019 09:15:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C7AB41BF95; Thu, 26 Dec 2019 09:15:28 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140080.outbound.protection.outlook.com [40.107.14.80]) by dpdk.org (Postfix) with ESMTP id A0A2B1BF93 for ; Thu, 26 Dec 2019 09:15:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KAmyJA0mdrdgyV8XLVdcHXW09hglo37RcfnZJH9I7H7JLfuavqdHclfnSAAci5Be38repnEUODNmYA7PY19We9A/rHUvrq3y+LxrACon6ljkv0KV/3/LWiAURrjU6wmGOA1O4XN5JDM5on2fk/XNqPlpT47YF/7lbFGG4fm+3cX0ZL/e4YrulixJLst9UnQkavcky11tGaEw5Ij7p71xISipuZcChXVI/En5qn7/K4ssWr8d821bzK7XZaqSjWvOqBJ1JGlmCM4zvA1UkYMGMz9RN7FA7Mo88BS1mky3bzHmww9v/87AklJ175nlgme958iD5YLog2B78+ZRcY+qKg== 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=yprFmtVf2i3Lh3gafgI7mBsvXwV/ZNFNYDkl76eA9oU=; b=GYOvtG9NdRTlBdPvQ+2PIU/+LzplvIPsbPDMqLT2+2nStOy+8SjWGNdd/OBgY2jLGbdm9QEmeraueLRCNmz+Wxhz2usnWZPAS26Ko7P/j5YYx65G4Z8gxfhiTyCs8hDCDrfa+e0XWCv+eyVVxoPqk9JoQDzvWUjYjVkcUl2bOGOC8m5n1t5hj5i6Tk6X/GBg6kc1fVx0tmTpxAjbLlSngKuP0EbOdCzUukU5zUKnAeQDXXBJqbbLwJNPu8Gr3x4ZmM5uz/AgNwR6sXOdhHw1JjnEIkkRlI20LvZ8cyM4SXRM1EMs4yVMuz2Hrniphe7XX75wKeYEWlDCZVyrTn7SZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yprFmtVf2i3Lh3gafgI7mBsvXwV/ZNFNYDkl76eA9oU=; b=jphc9e26nSdZhPrz6iY2qdeSKqrZ6pyY2GkJyqbkfPwOpjDe0dcG5uOjBbsqfrTNigQIRlwNeQtu8cvbZseie0DG+gzCYn7tCeeHWkhnAOUBbCM+wT/fG95WLb3+E7yH7mrzw7pU51lN6clp/Hn3d51KEqVqHsctP+FX9pi57jA= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3700.eurprd05.prod.outlook.com (52.133.44.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2581.11; Thu, 26 Dec 2019 08:15:26 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::6008:b453:cb1c:9445]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::6008:b453:cb1c:9445%5]) with mapi id 15.20.2559.017; Thu, 26 Dec 2019 08:15:26 +0000 From: Matan Azrad To: "jerinj@marvell.com" , "dev@dpdk.org" CC: Thomas Monjalon , "david.marchand@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v2 1/3] eal: introduce structure marker typedefs Thread-Index: AQHVtl7lfxicSb13RECKXU0QCZJqQafMG7hQ Date: Thu, 26 Dec 2019 08:15:26 +0000 Message-ID: References: <20191208113413.2179329-1-jerinj@marvell.com> <20191219112507.3142025-1-jerinj@marvell.com> In-Reply-To: <20191219112507.3142025-1-jerinj@marvell.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f6e99d89-be38-4bfc-13aa-08d789dbc365 x-ms-traffictypediagnostic: AM0PR0502MB3700: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 02638D901B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(346002)(376002)(366004)(396003)(136003)(199004)(189003)(64756008)(6506007)(7696005)(66446008)(76116006)(66556008)(316002)(86362001)(110136005)(54906003)(66946007)(66476007)(26005)(5660300002)(52536014)(81156014)(4326008)(2906002)(81166006)(8676002)(186003)(478600001)(8936002)(71200400001)(33656002)(9686003)(55016002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3700; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3Ga3Uw1tiLqNkszMWKBCuvH3INMbkLwkQkCkGwzLJ/8+jE3nQ6PBXRHsZFh7UJPID5OZ9tqd6sqBLeBYjibrxs1aZet9tdnLic2XQbrmP04IA9fYXLWAlcTyGkuAd1xLBTCW4JsgTR11wcgnqmpX+oMR3IZk6J2HUxrNmSzSzHl7sjC3QeGik1z/0qCNnyME+hof0B9VnDAwkKSDYu9JXJdVloPJo3PCHaZGO2vxps+nsUqzO+cgm8DFuBxeJVTe9bnj3Plx4UMSBaUJcDT3+toX9os0RazSSNwQiPyrn0CAYg9JmtYt0SMArPTBK/kDdEUvx0IIPU5x3txLXKPjnwp2mG/9EXQ5jeGBA6QyHDkBsjvAE6muJY3Ec/ZYdbZB2Gpw5nonvtIgJ494JqGMKXNG2vmhOIGBUJawX12CpdM0QEvr29udROgAxTMVYhTJ x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6e99d89-be38-4bfc-13aa-08d789dbc365 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Dec 2019 08:15:26.3579 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5kGnWgtoMEAwtpTXmxxDVqYW1fnwBEXXpPN6FC7ECqh3z/irJLQ5S+QUeCHS+Ow7IlDCJPMCQTR6Z+SgmH215Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3700 Subject: Re: [dpdk-dev] [PATCH v2 1/3] eal: introduce structure marker typedefs 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 From: Jerin Jacob > From: Jerin Jacob >=20 > Introduce EAL typedef for structure 1B, 2B, 4B, 8B alignment marking and = a > generic marker for a point in a structure. >=20 > Signed-off-by: Jerin Jacob > --- >=20 > v2: > - Changed __extension__ to RTE_STD_C11 (Thomas) > - Change "a point" to "any place" of RTE_MARKER comment(Thomas) >=20 > lib/librte_eal/common/include/rte_common.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/lib/librte_eal/common/include/rte_common.h > b/lib/librte_eal/common/include/rte_common.h > index 459d082d1..00c8b8434 100644 > --- a/lib/librte_eal/common/include/rte_common.h > +++ b/lib/librte_eal/common/include/rte_common.h > @@ -335,6 +335,18 @@ typedef uint64_t phys_addr_t; typedef uint64_t > rte_iova_t; #define RTE_BAD_IOVA ((rte_iova_t)-1) >=20 > +/*********** Structure alignment markers ********/ > + > +/** Generic marker for any place in a structure. */ > +RTE_STD_C11 typedef void *RTE_MARKER[0]; > +/** Marker for 1B alignment in a structure. */ > +RTE_STD_C11 typedef uint8_t RTE_MARKER8[0]; > +/** Marker for 2B alignment in a structure. */ > +RTE_STD_C11 typedef uint16_t RTE_MARKER16[0]; > +/** Marker for 4B alignment in a structure. */ > +RTE_STD_C11 typedef uint16_t RTE_MARKER32[0]; > +/** Marker for 8B alignment in a structure. */ > +RTE_STD_C11 typedef uint64_t RTE_MARKER64[0]; I saw there are similar definitions in mbuf library. What do you think about moving all libraries to use the same define from EA= L? > /** > * Combines 32b inputs most significant set bits into the least > -- > 2.24.1