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 2332FA04DD; Thu, 2 Jan 2020 07:27:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 693061BFCF; Thu, 2 Jan 2020 07:27:24 +0100 (CET) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) by dpdk.org (Postfix) with ESMTP id 66E3E1BFCB for ; Thu, 2 Jan 2020 07:27:23 +0100 (CET) Received: by mail-io1-f68.google.com with SMTP id t26so37390684ioi.13 for ; Wed, 01 Jan 2020 22:27:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YGltBFvtWYERU5p6XBIdcqM8ncd7OFg7q+8ir9bNCVw=; b=ujvv0WOI9zU/vvCpZavkpccyyxkP0QxfkPkLWCbiGyeK7e0vpt1/V8SvQ0F7FyyH+v ezyL3IMfX/yXMZcheDW9glwJcQoi80af8bu69aPAjIcCsuM86bfaCHEe2Be1LwUCTvw4 lfMxM2RxOqSft1PDeJNhoGnho3GGiSkhgGofdgMOfprTrUnPn+mKLMAFwMENYTv1zV0K bDN6FQBjEL8JWKdog04gGYyr0K3IdG6DbL1MKKvgHrNFslmvU29C65T0bTHK+dUotOdu 9Qb5F1b7M60FzOFX/nKb0bUxYSnqWhUxKwhfkYDIjnUH6J4iRW/bwc4BbR70STuvrXnW LheA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YGltBFvtWYERU5p6XBIdcqM8ncd7OFg7q+8ir9bNCVw=; b=O60x7xDz+RSQxwdN1ORQqzrt/KDz+CPYgCATu6DFJy4qNUAV71ZzSDE2ktVf/wl3LJ hn4MWPF+RmJNPGKb36EqugfOhePM7tqY2DyhdiFZOddMRG+Hbd6p35fLTQ4cPaDqCwY+ ISG2YQdVE7HV1Q5k7njHXL3spkqELOfscVRyEhhZzeUR6GzHvVSWDe2UP3Rw3YJfF4zI 453U+ongKRxBWnfyGiqZefieFyAu3My+OoRJHvdE0fbnJUbn5aUbKPyoGsPJYCRMGGb7 pyZ9zzyn+t7VOKrvUcybow1ix42gS7Kb5SNLJmsQSey5lEGXHc8eUo+DH1vESZwMNCGF AaDA== X-Gm-Message-State: APjAAAXikMJL7A8q4g3ZWF85iFtnCkPAe286polmMB34b+81kf/LDLHu +75iFFPzsSGE+oya4FWGA1QCyi8QgDIbKuGbISE= X-Google-Smtp-Source: APXvYqz6cXlbZkOEs3KZLu4qPT72+7HtQuoN+R5lZKbqh/3cg5wAtqeqkd350co+3pA28TI7xWBOVlxbPXaGAFygrKE= X-Received: by 2002:a5e:8e4d:: with SMTP id r13mr49657499ioo.60.1577946442622; Wed, 01 Jan 2020 22:27:22 -0800 (PST) MIME-Version: 1.0 References: <20191208113413.2179329-1-jerinj@marvell.com> <20191219112507.3142025-1-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Thu, 2 Jan 2020 11:57:06 +0530 Message-ID: To: Matan Azrad Cc: "jerinj@marvell.com" , "dev@dpdk.org" , Thomas Monjalon , "david.marchand@6wind.com" Content-Type: text/plain; charset="UTF-8" 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" On Thu, Dec 26, 2019 at 1:45 PM Matan Azrad wrote: > > Hi > > From: Jerin Jacob > > From: Jerin Jacob > > > > Introduce EAL typedef for structure 1B, 2B, 4B, 8B alignment marking and a > > generic marker for a point in a structure. > > > > Signed-off-by: Jerin Jacob > > --- > > > > v2: > > - Changed __extension__ to RTE_STD_C11 (Thomas) > > - Change "a point" to "any place" of RTE_MARKER comment(Thomas) > > > > lib/librte_eal/common/include/rte_common.h | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > 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) > > > > +/*********** 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 EAL? It is already done in 2/3 and 3/3 patches in the series. > > > /** > > * Combines 32b inputs most significant set bits into the least > > -- > > 2.24.1 >