diff options
author | Matias Elo <matias.elo@nokia.com> | 2020-11-11 13:43:20 +0200 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2020-11-16 14:11:37 +0200 |
commit | d5b65d406dd4f1682df32fdc2b4db01f982f5836 (patch) | |
tree | 6b2134558d38267d85fc3d5d4dc1252bc97e8748 /platform/linux-generic/include | |
parent | c62b514b6df1f1ebc460abe9777e253dc8a5623c (diff) |
linux-gen: unify ODP_ALIGNED usage
Use ODP_ALIGNED (GCC's aligned attribute) according to the GCC
documentation.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/include')
8 files changed, 13 insertions, 13 deletions
diff --git a/platform/linux-generic/include/odp/api/plat/time_inlines.h b/platform/linux-generic/include/odp/api/plat/time_inlines.h index 0b05aa4f7..1ca495065 100644 --- a/platform/linux-generic/include/odp/api/plat/time_inlines.h +++ b/platform/linux-generic/include/odp/api/plat/time_inlines.h @@ -22,7 +22,7 @@ typedef struct _odp_time_global_t { /* Storage space for struct timespec. Posix headers are not included * here to avoid application exposure. */ - uint8_t ODP_ALIGNED(_ODP_TIMESPEC_SIZE) timespec[_ODP_TIMESPEC_SIZE]; + uint8_t timespec[_ODP_TIMESPEC_SIZE] ODP_ALIGNED(_ODP_TIMESPEC_SIZE); int use_hw; uint64_t hw_start; diff --git a/platform/linux-generic/include/odp_ipsec_internal.h b/platform/linux-generic/include/odp_ipsec_internal.h index 3d7d40a37..c547c3ab7 100644 --- a/platform/linux-generic/include/odp_ipsec_internal.h +++ b/platform/linux-generic/include/odp_ipsec_internal.h @@ -92,7 +92,7 @@ int _odp_ipsec_status_send(odp_queue_t queue, #define ODP_CONFIG_IPSEC_SAS 8 struct ipsec_sa_s { - odp_atomic_u32_t ODP_ALIGNED_CACHE state; + odp_atomic_u32_t state ODP_ALIGNED_CACHE; /* * State that gets updated very frequently. Grouped separately diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index 4700bdb07..4f563de66 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -78,7 +78,7 @@ struct pktio_entry { uint8_t tx_ts : 1; } enabled; odp_pktio_t handle; /**< pktio handle */ - unsigned char ODP_ALIGNED_CACHE pkt_priv[PKTIO_PRIVATE_SIZE]; + unsigned char pkt_priv[PKTIO_PRIVATE_SIZE] ODP_ALIGNED_CACHE; enum { /* Not allocated */ PKTIO_STATE_FREE = 0, diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index a8947ddd9..007cb7b3f 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -48,7 +48,7 @@ typedef struct ODP_ALIGNED_CACHE { typedef void (*pool_destroy_cb_fn)(void *pool); typedef struct pool_t { - odp_ticketlock_t ODP_ALIGNED_CACHE lock; + odp_ticketlock_t lock ODP_ALIGNED_CACHE; char name[ODP_POOL_NAME_LEN]; odp_pool_param_t params; diff --git a/platform/linux-generic/include/odp_queue_basic_internal.h b/platform/linux-generic/include/odp_queue_basic_internal.h index 06cb34a87..4cfc6770b 100644 --- a/platform/linux-generic/include/odp_queue_basic_internal.h +++ b/platform/linux-generic/include/odp_queue_basic_internal.h @@ -35,7 +35,7 @@ extern "C" { struct queue_entry_s { /* The first cache line is read only */ - queue_enq_fn_t ODP_ALIGNED_CACHE enqueue; + queue_enq_fn_t enqueue ODP_ALIGNED_CACHE; queue_deq_fn_t dequeue; queue_enq_multi_fn_t enqueue_multi; queue_deq_multi_fn_t dequeue_multi; diff --git a/platform/linux-generic/include/odp_queue_scalable_internal.h b/platform/linux-generic/include/odp_queue_scalable_internal.h index 3c582076c..8b9eac435 100644 --- a/platform/linux-generic/include/odp_queue_scalable_internal.h +++ b/platform/linux-generic/include/odp_queue_scalable_internal.h @@ -34,11 +34,11 @@ extern "C" { struct queue_entry_s { sched_elem_t sched_elem; - odp_ticketlock_t ODP_ALIGNED_CACHE lock; + odp_ticketlock_t lock ODP_ALIGNED_CACHE; odp_atomic_u64_t num_timers; int status; - queue_enq_fn_t ODP_ALIGNED_CACHE enqueue; + queue_enq_fn_t enqueue ODP_ALIGNED_CACHE; queue_deq_fn_t dequeue; queue_enq_multi_fn_t enqueue_multi; queue_deq_multi_fn_t dequeue_multi; diff --git a/platform/linux-generic/include/odp_ring_mpmc_internal.h b/platform/linux-generic/include/odp_ring_mpmc_internal.h index 0a659249a..473e69e90 100644 --- a/platform/linux-generic/include/odp_ring_mpmc_internal.h +++ b/platform/linux-generic/include/odp_ring_mpmc_internal.h @@ -34,10 +34,10 @@ extern "C" { * */ typedef struct { - odp_atomic_u32_t ODP_ALIGNED_CACHE r_head; + odp_atomic_u32_t r_head ODP_ALIGNED_CACHE; odp_atomic_u32_t r_tail; - odp_atomic_u32_t ODP_ALIGNED_CACHE w_head; + odp_atomic_u32_t w_head ODP_ALIGNED_CACHE; odp_atomic_u32_t w_tail; } ring_mpmc_t; diff --git a/platform/linux-generic/include/odp_schedule_scalable.h b/platform/linux-generic/include/odp_schedule_scalable.h index 88986be5f..591b04471 100644 --- a/platform/linux-generic/include/odp_schedule_scalable.h +++ b/platform/linux-generic/include/odp_schedule_scalable.h @@ -99,7 +99,7 @@ typedef bitset_t sched_group_mask_t; typedef struct { /* Threads currently associated with the sched group */ - bitset_t ODP_ALIGNED_CACHE thr_actual[ODP_SCHED_PRIO_NUM]; + bitset_t thr_actual[ODP_SCHED_PRIO_NUM] ODP_ALIGNED_CACHE; bitset_t thr_wanted; /* Used to spread queues over schedq's */ uint32_t xcount[ODP_SCHED_PRIO_NUM]; @@ -107,7 +107,7 @@ typedef struct { uint32_t xfactor; char name[ODP_SCHED_GROUP_NAME_LEN]; /* ODP_SCHED_PRIO_NUM * xfactor. Must be last. */ - sched_queue_t ODP_ALIGNED_CACHE schedq[1]; + sched_queue_t schedq[1] ODP_ALIGNED_CACHE; } sched_group_t; /* Number of reorder contexts per thread */ @@ -136,9 +136,9 @@ typedef struct ODP_ALIGNED_CACHE { sched_group_mask_t sg_wanted[ODP_SCHED_PRIO_NUM]; bitset_t priv_rvec_free; /* Bitset of free entries in rvec[] */ - bitset_t ODP_ALIGNED_CACHE rvec_free; + bitset_t rvec_free ODP_ALIGNED_CACHE; /* Reordering contexts to allocate from */ - reorder_context_t ODP_ALIGNED_CACHE rvec[TS_RVEC_SIZE]; + reorder_context_t rvec[TS_RVEC_SIZE] ODP_ALIGNED_CACHE; uint32_t loop_cnt; /*Counter to check pktio ingress queue dead loop */ } sched_scalable_thread_state_t; |