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 B9720A04F1; Sun, 8 Dec 2019 12:34:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43E46374E; Sun, 8 Dec 2019 12:34:02 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 5F17B3576 for ; Sun, 8 Dec 2019 12:34:01 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB8BVdGH006545; Sun, 8 Dec 2019 03:34:00 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=/EV1YCIuwvRPeQe/H0TR9OSM4w0rzyAG4EuxwAdgUgE=; b=qf/AXy+OKUIO1Syxa5oD9kbMLzfAG6B4+ud/Xbm58K1I9cJmv/t2ZI2eaCOafEoN5JiB 3qNCZgazow6ruaFe7jEjoHO7LRnbwrzQusBkZUbC6Hkjsh3B+8OK1KVqWG0trHcp0Xw7 eC72cjkmPn7QHbnyjWs3+8t4zJMZX7gFY8RSVJbXeY6TB9JKodWpcnoSFcrZNaeh+Mcg mRTpDQTJgcrTlup6xbWbGx0sviqMRmfdIPpHI4pNqCxMH8Dj20ZYomFDX3rcoEr7BO83 wnJ4632AlQCIH80746qwptcX3QHKFf0OvjXHhu5iZniDCYM4pki0dpVyYzhO6ZuwM+e6 8g== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2wrcfptaus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 08 Dec 2019 03:33:59 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 8 Dec 2019 03:33:57 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sun, 8 Dec 2019 03:33:57 -0800 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 9A1493F703F; Sun, 8 Dec 2019 03:33:56 -0800 (PST) From: To: CC: , , Jerin Jacob Date: Sun, 8 Dec 2019 17:04:11 +0530 Message-ID: <20191208113413.2179329-1-jerinj@marvell.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-08_03:2019-12-05,2019-12-08 signatures=0 Subject: [dpdk-dev] [PATCH 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" 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 --- 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..9556299ba 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 a point in a structure. */ +__extension__ typedef void *RTE_MARKER[0]; +/** Marker for 1B alignment in a structure. */ +__extension__ typedef uint8_t RTE_MARKER8[0]; +/** Marker for 2B alignment in a structure. */ +__extension__ typedef uint16_t RTE_MARKER16[0]; +/** Marker for 4B alignment in a structure. */ +__extension__ typedef uint16_t RTE_MARKER32[0]; +/** Marker for 8B alignment in a structure. */ +__extension__ typedef uint64_t RTE_MARKER64[0]; /** * Combines 32b inputs most significant set bits into the least -- 2.24.0