DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH 1/3] eal: introduce structure marker typedefs
@ 2019-12-08 11:34 jerinj
  2019-12-08 11:34 ` [dpdk-dev] [PATCH 2/3] drivers: use structure marker typedef in eal jerinj
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: jerinj @ 2019-12-08 11:34 UTC (permalink / raw)
  To: dev; +Cc: thomas, david.marchand, Jerin Jacob

From: Jerin Jacob <jerinj@marvell.com>

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 <jerinj@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-01-20 21:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08 11:34 [dpdk-dev] [PATCH 1/3] eal: introduce structure marker typedefs jerinj
2019-12-08 11:34 ` [dpdk-dev] [PATCH 2/3] drivers: use structure marker typedef in eal jerinj
2019-12-08 11:34 ` [dpdk-dev] [PATCH 3/3] mbuf: " jerinj
2019-12-10 22:46 ` [dpdk-dev] [PATCH 1/3] eal: introduce structure marker typedefs Thomas Monjalon
2019-12-19 10:34   ` Jerin Jacob
2019-12-19 11:25 ` [dpdk-dev] [PATCH v2 " jerinj
2019-12-19 11:25   ` [dpdk-dev] [PATCH v2 2/3] drivers: use structure marker typedef in eal jerinj
2019-12-19 11:25   ` [dpdk-dev] [PATCH v2 3/3] mbuf: " jerinj
2019-12-26 16:24     ` Olivier Matz
2020-01-20 21:55       ` Thomas Monjalon
2019-12-20  4:21   ` [dpdk-dev] [PATCH v2 1/3] eal: introduce structure marker typedefs Gavin Hu
2019-12-26  8:15   ` Matan Azrad
2020-01-02  6:27     ` Jerin Jacob
2020-01-02  9:48       ` Matan Azrad
2020-01-16 13:09         ` Jerin Jacob
2020-01-20 20:11   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).