diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2018-01-16 21:09:35 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-01-18 22:19:45 +0300 |
commit | 5a4502fc6bc53e6503169da3028f456b64811a0b (patch) | |
tree | 61a249560d8c4dfa7232676c326088a8f12ec923 /platform/linux-generic/include/odp_buffer_internal.h | |
parent | ccb6eb85729ad0657b5c852cb2a6ddb519d60898 (diff) |
linux-gen: align: Fix alignment for typedef definitions
* typedef struct { } ODP_ALIGN() test_t; is correct
* typedef struct ODP_ALIGN() {} test_t; is correct and
preferred from gcc standards
* typedef struct {} test_t ODP_ALIGN() discards align
Had segfauls on gcc-7 using that
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_buffer_internal.h')
-rw-r--r-- | platform/linux-generic/include/odp_buffer_internal.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h index c56c5b01b..b52669387 100644 --- a/platform/linux-generic/include/odp_buffer_internal.h +++ b/platform/linux-generic/include/odp_buffer_internal.h @@ -42,7 +42,7 @@ typedef struct seg_entry_t { } seg_entry_t; /* Common buffer header */ -struct odp_buffer_hdr_t { +struct ODP_ALIGNED_CACHE odp_buffer_hdr_t { /* Buffer index in the pool */ uint32_t index; @@ -110,7 +110,7 @@ struct odp_buffer_hdr_t { /* Data or next header */ uint8_t data[0]; -} ODP_ALIGNED_CACHE; +}; ODP_STATIC_ASSERT(CONFIG_PACKET_SEGS_PER_HDR < 256, "CONFIG_PACKET_SEGS_PER_HDR_TOO_LARGE"); |