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_packet_socket.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_packet_socket.h')
-rw-r--r-- | platform/linux-generic/include/odp_packet_socket.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/linux-generic/include/odp_packet_socket.h b/platform/linux-generic/include/odp_packet_socket.h index 0e61f6f0c..52d2776b7 100644 --- a/platform/linux-generic/include/odp_packet_socket.h +++ b/platform/linux-generic/include/odp_packet_socket.h @@ -67,11 +67,11 @@ ODP_STATIC_ASSERT(offsetof(struct ring, mm_space) <= ODP_CACHE_LINE_SIZE, /** Packet socket using mmap rings for both Rx and Tx */ typedef struct { /** Packet mmap ring for Rx */ - struct ring rx_ring ODP_ALIGNED_CACHE; + struct ring ODP_ALIGNED_CACHE rx_ring; /** Packet mmap ring for Tx */ - struct ring tx_ring ODP_ALIGNED_CACHE; + struct ring ODP_ALIGNED_CACHE tx_ring; - int sockfd ODP_ALIGNED_CACHE; + int ODP_ALIGNED_CACHE sockfd; odp_pool_t pool; size_t frame_offset; /**< frame start offset from start of pkt buf */ uint8_t *mmap_base; |