move alignment attribute on types
Subsystems (8)
PATCH v2 42/83 event/opdl: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/event/opdl/opdl_evdev.h | 6 +++--- drivers/event/opdl/opdl_ring.c | 19 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-)
drivers/event/opdl/opdl_evdev.h +3 -3
@@ -234,15 +234,15 @@ struct opdl_evdev {uint32_t nb_q_md;/* Internal queues - one per logical queue */ -struct opdl_queue - queue[RTE_EVENT_MAX_QUEUES_PER_DEV] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct opdl_queue + queue[RTE_EVENT_MAX_QUEUES_PER_DEV ];uint32_t nb_queues;struct opdl_stage_meta_data s_md[OPDL_PORTS_MAX ];/* Contains all ports - load balanced and directed */ - struct opdl_port ports[OPDL_PORTS_MAX] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct opdl_port ports[OPDL_PORTS_MAX ];uint32_t nb_ports;uint8_t q_map_ex_to_in[OPDL_INVALID_QID ];
drivers/event/opdl/opdl_ring.c +9 -10
@@ -43,7 +43,7 @@ enum dep_type {* Care is needed when accessing and the layout is important, especially to * limit the adjacent cache-line HW prefetcher from impacting performance. */ -struct shared_state { +struct __rte_cache_aligned shared_state {/* Last known minimum sequence number of dependencies, used for multi * thread operation */
@@ -54,7 +54,7 @@ struct shared_state {struct opdl_stage *stage;/* back pointer */ uint32_t tail;/* Tail sequence number */ char _pad3[RTE_CACHE_LINE_SIZE *2 ]; -} __rte_cache_aligned; +};/* A structure to keep track of "unfinished" claims. This is only used for * stages that are threadsafe. Each lcore accesses its own instance of this
@@ -63,7 +63,7 @@ struct shared_state {* forward the shared tail when the shared tail matches the tail value recorded * here. */ -struct claim_manager { +struct __rte_cache_aligned claim_manager {uint32_t num_to_disclaim;uint32_t num_claimed;uint32_t mgr_head;
@@ -72,13 +72,13 @@ struct claim_manager {uint32_t head;uint32_t tail; } claims[OPDL_DISCLAIMS_PER_LCORE ]; -} __rte_cache_aligned; +};/* Context for each stage of opdl_ring. * Calculations on sequence numbers need to be done with other uint32_t values * so that results are modulus 2^32, and not undefined. */ -struct opdl_stage { +struct __rte_cache_aligned opdl_stage {struct opdl_ring *t;/* back pointer, set at init */ uint32_t num_slots;/* Number of slots for entries, set at init */ uint32_t index;/* ID for this stage, set at init */
@@ -99,14 +99,13 @@ struct opdl_stage {/* Direct dependencies of this stage */ struct shared_state **deps;/* Other stages read this! */ - struct shared_state shared __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct shared_state shared;/* For managing disclaims in multi-threaded processing stages */ - struct claim_manager pending_disclaims[RTE_MAX_LCORE] - __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct claim_manager pending_disclaims[RTE_MAX_LCORE ];uint32_t shadow_head;/* Shadow head for single-thread operation */ uint32_t queue_id;/* ID of Queue which is assigned to this stage */ uint32_t pos;/* Atomic scan position */ -} __rte_cache_aligned; +};/* Context for opdl_ring */ struct opdl_ring {
@@ -120,7 +119,7 @@ struct opdl_ring {/* Stages indexed by ID */ struct opdl_stage *stages;/* Memory for storing slot data */ - uint8_t slots[0] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint8_t slots[0 ]; };
Signature · 1 line
1.8.3.1
PATCH v2 43/83 event/octeontx: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/event/octeontx/ssovf_evdev.h | 8 ++++---- drivers/event/octeontx/timvf_evdev.h | 8 ++++---- drivers/event/octeontx/timvf_worker.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/event/octeontx/ssovf_evdev.h +4 -4
@@ -134,7 +134,7 @@ enum ssovf_type { OCTEONTX_SSO_HWS, /* SSO hardware workslot vf */ }; -struct ssovf_evdev { +struct __rte_cache_aligned ssovf_evdev {OFFLOAD_FLAGS ;/*Sequence should not be changed */ uint8_t max_event_queues;uint8_t max_event_ports;
@@ -150,10 +150,10 @@ struct ssovf_evdev {uint8_t *rxq_pool_rcnt;uint16_t tim_ring_cnt;uint16_t *tim_ring_ids; -} __rte_cache_aligned; +};/* Event port aka HWS */ -struct ssows { +struct __rte_cache_aligned ssows {uint8_t cur_tt;uint8_t cur_grp;uint8_t swtag_req;
@@ -162,7 +162,7 @@ struct ssows {uint8_t *grps[SSO_MAX_VHGRP ];uint8_t port;void *lookup_mem; -} __rte_cache_aligned; +};static inline struct ssovf_evdev *ssovf_pmd_priv (const struct rte_eventdev *eventdev)
drivers/event/octeontx/timvf_evdev.h +4 -4
@@ -123,7 +123,7 @@ enum timvf_clk_src { };/* TIM_MEM_BUCKET */ -struct tim_mem_bucket { +struct __rte_aligned(8) tim_mem_bucket {uint64_t first_chunk;union {uint64_t w1;
@@ -139,7 +139,7 @@ struct tim_mem_bucket { };uint64_t current_chunk;uint64_t pad; -} __rte_packed __rte_aligned(8); +} __rte_packed;struct tim_mem_entry {uint64_t w0;
@@ -160,7 +160,7 @@ struct timvf_ctrl_reg {struct tim_mem_bucket *const bkt, struct timvf_ring * const timr); -struct timvf_ring { +struct __rte_cache_aligned timvf_ring {bkt_id get_target_bkt;refill_chunk refill_chunk;struct rte_reciprocal_u64 fast_div;
@@ -178,7 +178,7 @@ struct timvf_ring {uint64_t nb_timers;enum timvf_clk_src clk_src;uint16_t tim_ring_id; -} __rte_cache_aligned; +}; static __rte_always_inline uint32_tbkt_mod (const uint32_t rel_bkt,const uint32_t nb_bkts)
drivers/event/octeontx/timvf_worker.c +1 -1
@@ -146,7 +146,7 @@uint16_t idx;uint16_t arr_idx =0 ;struct timvf_ring *timr = adptr->data->adapter_priv; - struct tim_mem_entry entry[TIMVF_MAX_BURST] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct tim_mem_entry entry[TIMVF_MAX_BURST ];if (unlikely (!timeout_tick || timeout_tick >= timr->nb_bkts)) { const enum rte_event_timer_state state = timeout_tick ?
Signature · 1 line
1.8.3.1
PATCH v2 44/83 event/dsw: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/event/dsw/dsw_evdev.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/event/dsw/dsw_evdev.h +10 -10
@@ -131,7 +131,7 @@ enum dsw_migration_state { DSW_MIGRATION_STATE_UNPAUSING }; -struct dsw_port { +struct __rte_cache_aligned dsw_port {uint16_t id;/* Keeping a pointer here to avoid container_of() calls, which
@@ -222,22 +222,22 @@ struct dsw_port {*/ struct rte_event in_buffer[DSW_MAX_EVENTS ]; - struct rte_event_ring *in_ring __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_event_ring *in_ring; - struct rte_ring *ctl_in_ring __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_ring *ctl_in_ring;/* Estimate of current port load. */ - int16_t load __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )int16_t load;/* Estimate of flows currently migrating to this port. */ - int32_t immigration_load __rte_cache_aligned; -} __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )int32_t immigration_load; +};struct dsw_queue {uint8_t schedule_type;uint64_t serving_ports;uint16_t num_serving_ports; - uint8_t flow_to_port_map[DSW_MAX_FLOWS] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint8_t flow_to_port_map[DSW_MAX_FLOWS ]; };/* Limited by the size of the 'serving_ports' bitmask */
@@ -252,19 +252,19 @@ struct dsw_evdev {uint8_t num_queues;int32_t max_inflight; - int32_t credits_on_loan __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )int32_t credits_on_loan; };#define DSW_CTL_PAUS_REQ (0)#define DSW_CTL_UNPAUS_REQ (1)#define DSW_CTL_CFM (2) -struct dsw_ctl_msg { +struct __rte_aligned(4) dsw_ctl_msg {uint8_t type;uint8_t originating_port_id;uint8_t qfs_len;struct dsw_queue_flow qfs[DSW_MAX_FLOWS_PER_MIGRATION ]; -} __rte_aligned(4); +};uint16_t dsw_event_enqueue (void *port,const struct rte_event *event); uint16_t dsw_event_enqueue_burst(void *port,
Signature · 1 line
1.8.3.1
PATCH v2 45/83 event/dlb2: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/event/dlb2/dlb2_priv.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/event/dlb2/dlb2_priv.h +8 -8
@@ -429,13 +429,13 @@ enum dlb2_cos { DLB2_COS_NUM_VALS }; -struct dlb2_hw_dev { +struct __rte_cache_aligned dlb2_hw_dev {struct dlb2_config cfg;struct dlb2_hw_resource_info info;void *pf_dev;/* opaque pointer to PF PMD dev (struct dlb2_dev) */ uint32_t domain_id;rte_spinlock_t resource_lock;/* for MP support */ -} __rte_cache_aligned; +};/* End HW related defines and structs */
@@ -516,13 +516,13 @@ struct dlb2_port_stats {struct dlb2_queue_stats queue[DLB2_MAX_NUM_QUEUES_ALL ]; }; -struct dlb2_eventdev_port { +struct __rte_cache_aligned dlb2_eventdev_port {struct dlb2_port qm_port;/* hw specific data structure */ struct rte_event_port_conf conf;/* user-supplied configuration */ uint16_t inflight_credits;/* num credits this port has right now */ uint16_t credit_update_quanta;struct dlb2_eventdev *dlb2;/* backlink optimization */ - struct dlb2_port_stats stats __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct dlb2_port_stats stats;struct dlb2_event_queue_link link[DLB2_MAX_NUM_QIDS_PER_LDB_CQ ];int num_links;uint32_t id;/* port id */
@@ -539,7 +539,7 @@ struct dlb2_eventdev_port {uint8_t implicit_release;/* release events before dequeuing */ uint32_t cq_weight;/* DLB2.5 and above ldb ports only */ int cos_id;/*ldb port class of service */ -} __rte_cache_aligned; +};struct dlb2_queue {uint32_t num_qid_inflights;/* User config */
@@ -624,14 +624,14 @@ struct dlb2_eventdev {uint16_t max_ldb_credits;uint16_t max_dir_credits;/* use __atomic builtins */ /* shared hw cred */ - uint32_t ldb_credit_pool __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint32_t ldb_credit_pool;/* use __atomic builtins */ /* shared hw cred */ - uint32_t dir_credit_pool __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint32_t dir_credit_pool; };struct {uint16_t max_credits;/* use __atomic builtins */ /* shared hw cred */ - uint32_t credit_pool __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint32_t credit_pool; }; };uint32_t cos_ports[DLB2_COS_NUM_VALS ];/* total ldb ports in each class */
Signature · 1 line
1.8.3.1
PATCH v2 46/83 event/cnxk: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/event/cnxk/cn10k_eventdev.h | 8 ++++---- drivers/event/cnxk/cnxk_eventdev.h | 24 ++++++++++++------------ drivers/event/cnxk/cnxk_tim_evdev.h | 4 ++-- drivers/event/cnxk/cnxk_tim_worker.c | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-)
drivers/event/cnxk/cn10k_eventdev.h +4 -4
@@ -8,7 +8,7 @@#define CN10K_SSO_DEFAULT_STASH_OFFSET -1#define CN10K_SSO_DEFAULT_STASH_LENGTH 2 -struct cn10k_sso_hws { +struct __rte_cache_aligned cn10k_sso_hws {uint64_t base;uint32_t gw_wdata;void *lookup_mem;
@@ -19,15 +19,15 @@ struct cn10k_sso_hws {struct cnxk_timesync_info **tstamp;uint64_t meta_aura;/* Add Work Fastpath data */ - int64_t *fc_mem __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )int64_t *fc_mem;int64_t *fc_cache_space;uintptr_t aw_lmt;uintptr_t grp_base;int32_t xaq_lmt;/* Tx Fastpath data */ - uintptr_t lmt_base __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uintptr_t lmt_base;uint64_t lso_tun_fmt; uint8_t tx_adptr_data[]; -} __rte_cache_aligned; +};#endif /* __CN10K_EVENTDEV_H__ */
drivers/event/cnxk/cnxk_eventdev.h +12 -12
@@ -80,7 +80,7 @@ struct cnxk_sso_stash {uint16_t stash_length; }; -struct cnxk_sso_evdev { +struct __rte_cache_aligned cnxk_sso_evdev {struct roc_sso sso;uint8_t max_event_queues;uint8_t max_event_ports;
@@ -124,10 +124,10 @@ struct cnxk_sso_evdev {uint32_t gw_mode;uint16_t stash_cnt;struct cnxk_sso_stash *stash_parse_data; -} __rte_cache_aligned; +};/* Event port a.k.a GWS */ -struct cn9k_sso_hws { +struct __rte_cache_aligned cn9k_sso_hws {uint64_t base;uint64_t gw_wdata;void *lookup_mem;
@@ -136,15 +136,15 @@ struct cn9k_sso_hws {/* PTP timestamp */ struct cnxk_timesync_info **tstamp;/* Add Work Fastpath data */ - uint64_t xaq_lmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint64_t xaq_lmt;uint64_t *fc_mem;uintptr_t grp_base;/* Tx Fastpath data */ - uint64_t lso_tun_fmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint64_t lso_tun_fmt;uint8_t tx_adptr_data[]; -} __rte_cache_aligned; +}; -struct cn9k_sso_hws_dual { +struct __rte_cache_aligned cn9k_sso_hws_dual {uint64_t base[2 ];/* Ping and Pong */ uint64_t gw_wdata;void *lookup_mem;
@@ -154,18 +154,18 @@ struct cn9k_sso_hws_dual {/* PTP timestamp */ struct cnxk_timesync_info **tstamp;/* Add Work Fastpath data */ - uint64_t xaq_lmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint64_t xaq_lmt;uint64_t *fc_mem;uintptr_t grp_base;/* Tx Fastpath data */ - uint64_t lso_tun_fmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint64_t lso_tun_fmt;uint8_t tx_adptr_data[]; -} __rte_cache_aligned; +}; -struct cnxk_sso_hws_cookie { +struct __rte_cache_aligned cnxk_sso_hws_cookie {const struct rte_eventdev *event_dev;bool configured; -} __rte_cache_aligned; +};static inline int parse_kvargs_flag (const char *key,const char *value,void *opaque)
drivers/event/cnxk/cnxk_tim_evdev.h +2 -2
@@ -123,7 +123,7 @@ struct cnxk_tim_bkt {uint64_t pad; }; -struct cnxk_tim_ring { +struct __rte_cache_aligned cnxk_tim_ring {uint16_t nb_chunk_slots;uint32_t nb_bkts;uintptr_t tbase;
@@ -149,7 +149,7 @@ struct cnxk_tim_ring {uint64_t nb_chunks;uint64_t chunk_sz;enum roc_tim_clk_src clk_src; -} __rte_cache_aligned; +};struct cnxk_tim_ent {uint64_t w0;
drivers/event/cnxk/cnxk_tim_worker.c +1 -1
@@ -92,7 +92,7 @@const uint64_t timeout_tick, const uint16_t nb_timers, const uint8_t flags) { - struct cnxk_tim_ent entry[CNXK_TIM_MAX_BURST] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct cnxk_tim_ent entry[CNXK_TIM_MAX_BURST];struct cnxk_tim_ring *tim_ring = adptr->data->adapter_priv;uint16_t set_timers =0 ;uint16_t arr_idx =0 ;
Signature · 1 line
1.8.3.1
PATCH v2 47/83 dma/skeleton: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/dma/skeleton/skeleton_dmadev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/skeleton/skeleton_dmadev.h +2 -2
@@ -73,13 +73,13 @@ struct skeldma_hw {struct rte_ring *desc_completed;/* Cache delimiter for dataplane API's operation data */ - char cache1 __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )char cache1;uint16_t ridx;/* ring idx */ uint16_t last_ridx;uint64_t submitted_count;/* Cache delimiter for cpuwork thread's operation data */ - char cache2 __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )char cache2;volatile uint32_t zero_req_count;uint64_t completed_count; };
Signature · 1 line
1.8.3.1
PATCH v2 48/83 dma/ioat: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/dma/ioat/ioat_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/ioat/ioat_internal.h +2 -2
@@ -12,7 +12,7 @@ struct ioat_dmadev {struct rte_dma_vchan_conf qcfg;struct rte_dma_stats stats; - volatile uint16_t *doorbell __rte_cache_aligned; +volatile alignas(RTE_CACHE_LINE_SIZE )uint16_t *doorbell;phys_addr_t status_addr;phys_addr_t ring_addr;
@@ -25,7 +25,7 @@ struct ioat_dmadev {unsigned int failure;/* Used to store chanerr for error handling. */ /* To report completions, the device will write status back here. */ - volatile uint64_t status __rte_cache_aligned; +volatile alignas(RTE_CACHE_LINE_SIZE )uint64_t status;/* Pointer to the register bar. */ volatile struct ioat_registers *regs;
Signature · 1 line
1.8.3.1
PATCH v2 49/83 dma/idxd: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/dma/idxd/idxd_hw_defs.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-)
drivers/dma/idxd/idxd_hw_defs.h +19 -19
@@ -26,7 +26,7 @@ enum rte_idxd_ops {* Hardware descriptor used by DSA hardware, for both bursts and * for individual operations. */ -struct idxd_hw_desc { +struct __rte_aligned(64) idxd_hw_desc {uint32_t pasid;uint32_t op_flags;rte_iova_t completion;
@@ -43,7 +43,7 @@ struct idxd_hw_desc {/* remaining 26 bytes are reserved */ uint16_t reserved[13 ]; -}__rte_aligned (64 ); +};#define IDXD_COMP_STATUS_INCOMPLETE 0#define IDXD_COMP_STATUS_SUCCESS 1
@@ -55,7 +55,7 @@ struct idxd_hw_desc {/** * Completion record structure written back by DSA */ -struct idxd_completion { +struct __rte_aligned(32) idxd_completion {uint8_t status;uint8_t result;/* 16-bits pad here */
@@ -63,7 +63,7 @@ struct idxd_completion {rte_iova_t fault_address;uint32_t invalid_flags; -}__rte_aligned (32 ); +};/*** Definitions for Intel(R) Data Streaming Accelerator ***/
@@ -83,20 +83,20 @@ enum rte_idxd_cmds {/* General bar0 registers */ struct rte_idxd_bar0 { - uint32_t __rte_cache_aligned version; /* offset 0x00 */ - uint64_t __rte_aligned(0x10) gencap; /* offset 0x10 */ - uint64_t __rte_aligned(0x10) wqcap; /* offset 0x20 */ - uint64_t __rte_aligned(0x10) grpcap; /* offset 0x30 */ - uint64_t __rte_aligned(0x08) engcap; /* offset 0x38 */ - uint64_t __rte_aligned(0x10) opcap; /* offset 0x40 */ - uint64_t __rte_aligned(0x20) offsets[2]; /* offset 0x60 */ - uint32_t __rte_aligned(0x20) gencfg; /* offset 0x80 */ - uint32_t __rte_aligned(0x08) genctrl; /* offset 0x88 */ - uint32_t __rte_aligned(0x10) gensts; /* offset 0x90 */ - uint32_t __rte_aligned(0x08) intcause; /* offset 0x98 */ - uint32_t __rte_aligned(0x10) cmd; /* offset 0xA0 */ - uint32_t __rte_aligned(0x08) cmdstatus; /* offset 0xA8 */ - uint64_t __rte_aligned(0x20) swerror[4]; /* offset 0xC0 */ + alignas(RTE_CACHE_LINE_SIZE )uint32_t version;/* offset 0x00 */ + alignas(0x10 )uint64_t gencap;/* offset 0x10 */ + alignas(0x10 )uint64_t wqcap;/* offset 0x20 */ + alignas(0x10 )uint64_t grpcap;/* offset 0x30 */ + alignas(0x08 )uint64_t engcap;/* offset 0x38 */ + alignas(0x10 )uint64_t opcap;/* offset 0x40 */ + alignas(0x20 )uint64_t offsets[2 ];/* offset 0x60 */ + alignas(0x20 )uint32_t gencfg;/* offset 0x80 */ + alignas(0x08 )uint32_t genctrl;/* offset 0x88 */ + alignas(0x10 )uint32_t gensts;/* offset 0x90 */ + alignas(0x08 )uint32_t intcause;/* offset 0x98 */ + alignas(0x10 )uint32_t cmd;/* offset 0xA0 */ + alignas(0x08 )uint32_t cmdstatus;/* offset 0xA8 */ + alignas(0x20 )uint64_t swerror[4 ];/* offset 0xC0 */ };/* workqueue config is provided by array of uint32_t. */
@@ -118,7 +118,7 @@ enum rte_idxd_wqcfg {#define WQ_STATE_MASK 0x3struct rte_idxd_grpcfg { - uint64_t grpwqcfg[4] __rte_cache_aligned; /* 64-byte register set */ + alignas(RTE_CACHE_LINE_SIZE )uint64_t grpwqcfg[4 ];/* 64-byte register set */ uint64_t grpengcfg;/* offset 32 */ uint32_t grpflags;/* offset 40 */ };
Signature · 1 line
1.8.3.1
PATCH v2 50/83 crypto/uadk: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/uadk/uadk_crypto_pmd_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/uadk/uadk_crypto_pmd_private.h +6 -6
@@ -9,7 +9,7 @@/* Maximum length for digest (SHA-512 needs 64 bytes) */ #define DIGEST_LENGTH_MAX 64 -struct uadk_qp { +struct __rte_cache_aligned uadk_qp {/* Ring for placing process packets */ struct rte_ring *processed_pkts;/* Queue pair statistics */
@@ -23,7 +23,7 @@ struct uadk_qp {* by the user (using authentication verify operation) */ uint8_t temp_digest[DIGEST_LENGTH_MAX ]; -} __rte_cache_aligned; +};enum uadk_chain_order {UADK_CHAIN_ONLY_CIPHER ,
@@ -33,7 +33,7 @@ enum uadk_chain_order { UADK_CHAIN_NOT_SUPPORTED }; -struct uadk_crypto_session { +struct __rte_cache_aligned uadk_crypto_session {handle_t handle_cipher;handle_t handle_digest;enum uadk_chain_order chain_order;
@@ -56,19 +56,19 @@ struct uadk_crypto_session {enum rte_crypto_auth_operation operation;uint16_t digest_length; } auth; -} __rte_cache_aligned; +};enum uadk_crypto_version {UADK_CRYPTO_V2 ,UADK_CRYPTO_V3 , }; -struct uadk_crypto_priv { +struct __rte_cache_aligned uadk_crypto_priv {bool env_cipher_init;bool env_auth_init;enum uadk_crypto_version version;unsigned int max_nb_qpairs; -} __rte_cache_aligned; +};extern int uadk_crypto_logtype;
Signature · 1 line
1.8.3.1
PATCH v2 51/83 crypto/scheduler: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/scheduler/scheduler_pkt_size_distr.c | 4 ++-- drivers/crypto/scheduler/scheduler_pmd_private.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/scheduler/scheduler_pkt_size_distr.c +2 -2
@@ -20,12 +20,12 @@ struct psd_scheduler_ctx { };/** pkt size based scheduler queue pair context */ -struct psd_scheduler_qp_ctx { +struct __rte_cache_aligned psd_scheduler_qp_ctx {struct scheduler_worker primary_worker;struct scheduler_worker secondary_worker;uint32_t threshold;uint8_t deq_idx; -} __rte_cache_aligned; +};/** scheduling operation variables' wrapping */ struct psd_schedule_op {
drivers/crypto/scheduler/scheduler_pmd_private.h +4 -4
@@ -27,7 +27,7 @@ struct scheduler_worker {uint8_t driver_id; }; -struct scheduler_ctx { +struct __rte_cache_aligned scheduler_ctx {void *private_ctx;/**< private scheduler context pointer */
@@ -55,15 +55,15 @@ struct scheduler_ctx {char *init_worker_names[RTE_CRYPTODEV_SCHEDULER_MAX_NB_WORKERS ];int nb_init_workers; -} __rte_cache_aligned; +}; -struct scheduler_qp_ctx { +struct __rte_cache_aligned scheduler_qp_ctx {void *private_qp_ctx;uint32_t max_nb_objs;struct rte_ring *order_ring; -} __rte_cache_aligned; +};struct scheduler_session_ctx {uint32_t ref_cnt;
Signature · 1 line
1.8.3.1
PATCH v2 52/83 crypto/qat: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/qat/qat_asym.h | 15 +++++++-------- drivers/crypto/qat/qat_sym.h | 8 ++++---- drivers/crypto/qat/qat_sym_session.h | 10 +++++----- 3 files changed, 16 insertions(+), 17 deletions(-)
drivers/crypto/qat/qat_asym.h +7 -8
@@ -18,7 +18,6 @@typedef uint64_t large_int_ptr ;#define MAX_PKE_PARAMS 8#define QAT_PKE_MAX_LN_SIZE 512 -#define _PKE_ALIGN_ __rte_aligned(8)#define QAT_ASYM_MAX_PARAMS 8#define QAT_ASYM_MODINV_NUM_IN_PARAMS 2
@@ -57,20 +56,20 @@ } \ } -struct qat_asym_op_cookie { +struct __rte_aligned(8) qat_asym_op_cookie {uint64_t error;uint32_t alg_bytesize;/*< Bytesize of algorithm */ uint32_t qat_func_alignsize;/*< Aligned bytesize of qat function */ rte_iova_t input_addr;rte_iova_t output_addr; - large_int_ptr input_params_ptrs[MAX_PKE_PARAMS] _PKE_ALIGN_; - large_int_ptr output_params_ptrs[MAX_PKE_PARAMS] _PKE_ALIGN_; -union { + alignas(8 )large_int_ptr input_params_ptrs[MAX_PKE_PARAMS ]; + alignas(8 )large_int_ptr output_params_ptrs[MAX_PKE_PARAMS ]; + union __rte_aligned(8) {uint8_t input_array[MAX_PKE_PARAMS ][QAT_PKE_MAX_LN_SIZE ];uint8_t input_buffer[MAX_PKE_PARAMS *QAT_PKE_MAX_LN_SIZE ]; - } _PKE_ALIGN_; - uint8_t output_array[MAX_PKE_PARAMS][QAT_PKE_MAX_LN_SIZE] _PKE_ALIGN_; -} _PKE_ALIGN_; + }; + alignas(8 )uint8_t output_array[MAX_PKE_PARAMS ][QAT_PKE_MAX_LN_SIZE ]; +};struct qat_asym_session {struct icp_qat_fw_pke_request req_tmpl;
drivers/crypto/qat/qat_sym.h +4 -4
@@ -103,10 +103,10 @@struct qat_sym_session ; -struct qat_sym_sgl { +struct __rte_cache_aligned qat_sym_sgl { qat_sgl_hdr;struct qat_flat_buf buffers[QAT_SYM_SGL_MAX_NUMBER ]; -} __rte_packed __rte_cache_aligned; +} __rte_packed;struct qat_sym_op_cookie {struct qat_sym_sgl qat_sgl_src;
@@ -116,8 +116,8 @@ struct qat_sym_op_cookie {union {/* Used for Single-Pass AES-GMAC only */ struct { - struct icp_qat_hw_cipher_algo_blk cd_cipher -__rte_packed __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct icp_qat_hw_cipher_algo_blk cd_cipher + __rte_packed;phys_addr_t cd_phys_addr; } spc_gmac; } opt;
drivers/crypto/qat/qat_sym_session.h +5 -5
@@ -92,7 +92,7 @@ typedef int (*qat_sym_build_request_t)(void *in_op, struct qat_sym_session *ctx, uint8_t *out_msg, void *op_cookie);/* Common content descriptor */ -struct qat_sym_cd { +struct __rte_cache_aligned qat_sym_cd {struct icp_qat_hw_cipher_algo_blk cipher;union {struct icp_qat_hw_auth_algo_blk hash;
@@ -100,7 +100,7 @@ struct qat_sym_cd {struct icp_qat_hw_gen3_crc_cd crc_gen3;struct icp_qat_hw_gen4_crc_cd crc_gen4; }; -}__rte_packed __rte_cache_aligned; +} __rte_packed;struct qat_sym_session {enum icp_qat_fw_la_cmd_id qat_cmd;
@@ -115,7 +115,7 @@ struct qat_sym_session {struct qat_sym_cd cd;uint8_t key_array[32 ]; }; - uint8_t prefix_state[QAT_PREFIX_TBL_SIZE] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint8_t prefix_state[QAT_PREFIX_TBL_SIZE ];uint8_t *cd_cur_ptr;union {phys_addr_t cd_paddr;
@@ -153,8 +153,8 @@ struct qat_sym_session {qat_sym_build_request_t build_request[2 ];#ifndef RTE_QAT_OPENSSL IMB_MGR *mb_mgr; - uint64_t expkey[4*15] __rte_aligned(16); - uint32_t dust[4*15] __rte_aligned(16); + alignas(16 )uint64_t expkey[4 *15 ]; + alignas(16 )uint32_t dust[4 *15 ];uint8_t docsis_key_len;#endif };
Signature · 1 line
1.8.3.1
PATCH v2 53/83 crypto/openssl: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/openssl/openssl_pmd_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/openssl/openssl_pmd_private.h +6 -6
@@ -62,7 +62,7 @@ struct openssl_private { };/** OPENSSL crypto queue pair */ -struct openssl_qp { +struct __rte_cache_aligned openssl_qp {uint16_t id;/**< Queue Pair Identifier */ char name[RTE_CRYPTODEV_NAME_MAX_LEN ];
@@ -78,10 +78,10 @@ struct openssl_qp {* by the driver when verifying a digest provided * by the user (using authentication verify operation) */ -} __rte_cache_aligned; +};/** OPENSSL crypto private session structure */ -struct openssl_session { +struct __rte_cache_aligned openssl_session {enum openssl_chain_order chain_order;/**< chain order mode */
@@ -166,10 +166,10 @@ struct openssl_session {/**< digest length */ } auth; -} __rte_cache_aligned; +};/** OPENSSL crypto private asymmetric session structure */ -struct openssl_asym_session { +struct __rte_cache_aligned openssl_asym_session {enum rte_crypto_asym_xform_type xfrm_type;union { struct rsa {
@@ -213,7 +213,7 @@ struct openssl_asym_session {#endif } sm2; } u; -} __rte_cache_aligned; +};/** Set and validate OPENSSL crypto session parameters */ extern int openssl_set_session_parameters(struct openssl_session *sess,
Signature · 1 line
1.8.3.1
PATCH v2 54/83 crypto/octeontx: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/octeontx/otx_cryptodev_hw_access.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/octeontx/otx_cryptodev_hw_access.h +2 -2
@@ -77,7 +77,7 @@ struct command_queue {/** * CPT VF device structure */ -struct cpt_vf { +struct __rte_cache_aligned cpt_vf {/** CPT instance */ struct cpt_instance instance;/** Register start address */
@@ -111,7 +111,7 @@ struct cpt_vf {/** Device name */ char dev_name[32 ]; -} __rte_cache_aligned; +};/* * CPT Registers map for 81xx
Signature · 1 line
1.8.3.1
PATCH v2 55/83 crypto/null: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/null/null_crypto_pmd_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/null/null_crypto_pmd_private.h +4 -4
@@ -22,7 +22,7 @@ struct null_crypto_private { };/** NULL crypto queue pair */ -struct null_crypto_qp { +struct __rte_cache_aligned null_crypto_qp {uint16_t id;/**< Queue Pair Identifier */ char name[RTE_CRYPTODEV_NAME_MAX_LEN ];
@@ -33,13 +33,13 @@ struct null_crypto_qp {/**< Session Mempool */ struct rte_cryptodev_stats qp_stats;/**< Queue pair statistics */ -} __rte_cache_aligned; +};/** NULL crypto private session structure */ -struct null_crypto_session { +struct __rte_cache_aligned null_crypto_session {uint32_t reserved; -} __rte_cache_aligned; +};/** Set and validate NULL crypto session parameters */ extern int
Signature · 1 line
1.8.3.1
PATCH v2 56/83 crypto/mvsam: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/mvsam/mrvl_pmd_private.h | 12 ++++++------ drivers/crypto/mvsam/rte_mrvl_pmd.c | 12 +++++------- 2 files changed, 11 insertions(+), 13 deletions(-)
drivers/crypto/mvsam/mrvl_pmd_private.h +6 -6
@@ -44,7 +44,7 @@ struct mrvl_crypto_private { };/** MRVL crypto queue pair structure. */ -struct mrvl_crypto_qp { +struct __rte_cache_aligned mrvl_crypto_qp {/** SAM CIO (MUSDK Queue Pair equivalent).*/ struct sam_cio *cio;
@@ -59,10 +59,10 @@ struct mrvl_crypto_qp {/** CIO initialization parameters.*/ struct sam_cio_params cio_params; -} __rte_cache_aligned; +};/** MRVL crypto private session structure. */ -struct mrvl_crypto_session { +struct __rte_cache_aligned mrvl_crypto_session {/** Crypto operations chain order. */ enum mrvl_crypto_chain_order chain_order;
@@ -74,12 +74,12 @@ struct mrvl_crypto_session {/** Cipher IV offset. */ uint16_t cipher_iv_offset; -} __rte_cache_aligned; +}; -struct mrvl_crypto_src_table { +struct __rte_cache_aligned mrvl_crypto_src_table {uint16_t iter_ops;struct sam_buf_info src_bd[MRVL_MAX_SEGMENTS ]; -} __rte_cache_aligned; +};/** Set and validate MRVL crypto session parameters */ int
drivers/crypto/mvsam/rte_mrvl_pmd.c +5 -7
@@ -47,22 +47,20 @@ enum algo_supported { };/** Map elements for cipher mapping.*/ -struct cipher_params_mapping { +/* We want to squeeze in multiple maps into the cache line. */ +struct __rte_aligned(32) cipher_params_mapping {enum algo_supported supported;/**< On/Off switch */ enum sam_cipher_alg cipher_alg;/**< Cipher algorithm */ enum sam_cipher_mode cipher_mode;/**< Cipher mode */ unsigned int max_key_len;/**< Maximum key length (in bytes)*/ -} -/* We want to squeeze in multiple maps into the cache line. */ -__rte_aligned(32); +};/** Map elements for auth mapping.*/ -struct auth_params_mapping { +/* We want to squeeze in multiple maps into the cache line. */ +struct __rte_aligned(32) auth_params_mapping {enum algo_supported supported;/**< On/off switch */ enum sam_auth_alg auth_alg;/**< Auth algorithm */ } -/* We want to squeeze in multiple maps into the cache line. */ -__rte_aligned(32);/** * Map of supported cipher algorithms.
Signature · 1 line
1.8.3.1
PATCH v2 57/83 crypto/mlx5: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/mlx5/mlx5_crypto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/mlx5/mlx5_crypto.h +2 -2
@@ -80,12 +80,12 @@ struct mlx5_crypto_qp {uint16_t cpy_tag_op; }; -struct mlx5_crypto_dek { +struct __rte_cache_aligned mlx5_crypto_dek {struct mlx5_list_entry entry;/* Pointer to DEK hash list entry. */ struct mlx5_devx_obj *obj;/* Pointer to DEK DevX object. */ uint8_t data[MLX5_CRYPTO_KEY_LENGTH ];/* DEK key data. */ uint32_t size;/* key+keytag size. */ -} __rte_cache_aligned; +};struct mlx5_crypto_devarg_params {bool login_devarg;
Signature · 1 line
1.8.3.1
PATCH v2 58/83 crypto/ipsec_mb: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 4 ++-- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 24 ++++++++++++------------ drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h | 4 ++-- drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 4 ++-- drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 4 ++-- drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-)
drivers/crypto/ipsec_mb/pmd_aesni_mb.c +2 -2
@@ -32,8 +32,8 @@ struct aesni_mb_op_buf_data { {uint32_t i, length; - uint8_t ipad_buf[blocksize] __rte_aligned(16); - uint8_t opad_buf[blocksize] __rte_aligned(16); + alignas(16 )uint8_t ipad_buf[blocksize]; + alignas(16 )uint8_t opad_buf[blocksize];/* Setup inner and outer pads */ memset (ipad_buf,HMAC_IPAD_VALUE , blocksize);
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h +12 -12
@@ -848,7 +848,7 @@ struct aesni_mb_qp_data { }/** AES-NI multi-buffer private session structure */ -struct aesni_mb_session { +struct __rte_cache_aligned aesni_mb_session {IMB_JOB template_job;/*< Template job structure */ uint32_t session_id;
@@ -869,9 +869,9 @@ struct aesni_mb_session {struct {union {struct { - uint32_t encode[60] __rte_aligned(16); + alignas(16 )uint32_t encode[60 ];/* *< encode key */ - uint32_t decode[60] __rte_aligned(16); + alignas(16 )uint32_t decode[60 ];/* *< decode key */ } expanded_aes_keys;/* *< Expanded AES keys - Allocating space to
@@ -903,9 +903,9 @@ struct aesni_mb_session {/* *< auth operation generate or verify */ union {struct { - uint8_t inner[128] __rte_aligned(16); + alignas(16 )uint8_t inner[128 ];/* *< inner pad */ - uint8_t outer[128] __rte_aligned(16); + alignas(16 )uint8_t outer[128 ];/* *< outer pad */ } pads;/* *< HMAC Authentication pads -
@@ -915,20 +915,20 @@ struct aesni_mb_session {*/ struct { - uint32_t k1_expanded[44] __rte_aligned(16); + alignas(16 )uint32_t k1_expanded[44 ];/* *< k1 (expanded key). */ - uint8_t k2[16] __rte_aligned(16); + alignas(16 )uint8_t k2[16 ];/* *< k2. */ - uint8_t k3[16] __rte_aligned(16); + alignas(16 )uint8_t k3[16 ];/* *< k3. */ } xcbc;struct { - uint32_t expkey[60] __rte_aligned(16); + alignas(16 )uint32_t expkey[60 ];/* *< k1 (expanded key). */ - uint32_t skey1[4] __rte_aligned(16); + alignas(16 )uint32_t skey1[4 ];/* *< k2. */ - uint32_t skey2[4] __rte_aligned(16); + alignas(16 )uint32_t skey2[4 ];/* *< k3. */ } cmac;/* *< Expanded XCBC authentication keys */
@@ -943,7 +943,7 @@ struct aesni_mb_session {uint16_t req_digest_len; } auth; -} __rte_cache_aligned; +};typedef void (*hash_one_block_t )(const void *data,void *digest); typedef void (*aes_keyexp_t)(const void *key, void *enc_exp_keys,
drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h +2 -2
@@ -46,7 +46,7 @@ struct rte_cryptodev_capabilities chacha20_poly1305_capabilities[] = {uint8_t pmd_driver_id_chacha20_poly1305;/** CHACHA20 POLY1305 private session structure */ -struct chacha20_poly1305_session { +struct __rte_cache_aligned chacha20_poly1305_session {struct {uint16_t length;uint16_t offset;
@@ -60,7 +60,7 @@ struct chacha20_poly1305_session {/**< Generated digest length */ uint8_t key[CHACHA20_POLY1305_KEY_SIZE ];enum ipsec_mb_operation op; -} __rte_cache_aligned; +};struct chacha20_poly1305_qp_data {struct chacha20_poly1305_context_data chacha20_poly1305_ctx_data;
drivers/crypto/ipsec_mb/pmd_kasumi_priv.h +2 -2
@@ -61,14 +61,14 @@ };/** KASUMI private session structure */ -struct kasumi_session { +struct __rte_cache_aligned kasumi_session {/* Keys have to be 16-byte aligned */ kasumi_key_sched_t pKeySched_cipher;kasumi_key_sched_t pKeySched_hash;enum ipsec_mb_operation op;enum rte_crypto_auth_operation auth_op;uint16_t cipher_iv_offset; -} __rte_cache_aligned; +};struct kasumi_qp_data {uint8_t temp_digest[KASUMI_DIGEST_LENGTH ];
drivers/crypto/ipsec_mb/pmd_snow3g_priv.h +2 -2
@@ -65,14 +65,14 @@ };/** SNOW 3G private session structure */ -struct snow3g_session { +struct __rte_cache_aligned snow3g_session {enum ipsec_mb_operation op;enum rte_crypto_auth_operation auth_op;snow3g_key_schedule_t pKeySched_cipher;snow3g_key_schedule_t pKeySched_hash;uint16_t cipher_iv_offset;uint16_t auth_iv_offset; -} __rte_cache_aligned; +};struct snow3g_qp_data {uint8_t temp_digest[SNOW3G_DIGEST_LENGTH ];
drivers/crypto/ipsec_mb/pmd_zuc_priv.h +2 -2
@@ -64,14 +64,14 @@ };/** ZUC private session structure */ -struct zuc_session { +struct __rte_cache_aligned zuc_session {enum ipsec_mb_operation op;enum rte_crypto_auth_operation auth_op;uint8_t pKey_cipher[ZUC_IV_KEY_LENGTH ];uint8_t pKey_hash[ZUC_IV_KEY_LENGTH ];uint16_t cipher_iv_offset;uint16_t auth_iv_offset; -} __rte_cache_aligned; +};struct zuc_qp_data {
Signature · 1 line
1.8.3.1
PATCH v2 59/83 crypto/cnxk: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/cnxk/cn10k_cryptodev_sec.h | 4 ++-- drivers/crypto/cnxk/cn10k_ipsec.h | 4 ++-- drivers/crypto/cnxk/cn10k_tls.h | 4 ++-- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 2 +- drivers/crypto/cnxk/cn9k_ipsec.h | 8 ++++---- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 4 ++-- drivers/crypto/cnxk/cnxk_se.h | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-)
drivers/crypto/cnxk/cn10k_cryptodev_sec.h +2 -2
@@ -25,7 +25,7 @@ struct cn10k_tls_opt { uint16_t mac_len : 7; }; -struct cn10k_sec_session { +struct __rte_aligned(ROC_ALIGN) cn10k_sec_session {uint8_t rte_sess[SEC_SESS_SIZE ];/** PMD private space */
@@ -57,7 +57,7 @@ struct cn10k_sec_session {struct cn10k_ipsec_sa sa;struct cn10k_tls_record tls_rec; }; -}__rte_aligned (ROC_ALIGN ); +};static inline uint64_t cpt_inst_w7_get (struct roc_cpt *roc_cpt,void *cptr)
drivers/crypto/cnxk/cn10k_ipsec.h +2 -2
@@ -18,14 +18,14 @@/* Forward declaration */ struct cn10k_sec_session ; -struct cn10k_ipsec_sa { +struct __rte_aligned(ROC_ALIGN) cn10k_ipsec_sa {union {/** Inbound SA */ struct roc_ot_ipsec_inb_sa in_sa;/** Outbound SA */ struct roc_ot_ipsec_outb_sa out_sa; }; -}__rte_aligned (ROC_ALIGN ); +}; int cn10k_ipsec_session_create(struct cnxk_cpt_vf *vf, struct cnxk_cpt_qp *qp, struct rte_security_ipsec_xform *ipsec_xfrm,
drivers/crypto/cnxk/cn10k_tls.h +2 -2
@@ -16,14 +16,14 @@/* Forward declaration */ struct cn10k_sec_session ; -struct cn10k_tls_record { +struct __rte_aligned(ROC_ALIGN) cn10k_tls_record {union {/** Read SA */ struct roc_ie_ot_tls_read_sa read_sa;/** Write SA */ struct roc_ie_ot_tls_write_sa write_sa; }; -}__rte_aligned (ROC_ALIGN ); +}; int cn10k_tls_record_session_update(struct cnxk_cpt_vf *vf, struct cnxk_cpt_qp *qp, struct cn10k_sec_session *sess,
drivers/crypto/cnxk/cn9k_cryptodev_ops.c +1 -1
@@ -126,7 +126,7 @@ cn9k_cpt_enqueue_burst(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops) {struct cpt_inflight_req *infl_req_1, *infl_req_2; - struct cpt_inst_s inst[2] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct cpt_inst_s inst[2 ];struct rte_crypto_op *op_1, *op_2;uint16_t nb_allowed, count =0 ;struct cnxk_cpt_qp *qp = qptr;
drivers/crypto/cnxk/cn9k_ipsec.h +4 -4
@@ -11,18 +11,18 @@#include "cnxk_security.h" #include "cnxk_security_ar.h" -struct cn9k_ipsec_sa { +struct __rte_aligned(8) cn9k_ipsec_sa {union {/** Inbound SA */ struct roc_ie_on_inb_sa in_sa;/** Outbound SA */ struct roc_ie_on_outb_sa out_sa; }; -} __rte_aligned(8); +};#define SEC_SESS_SIZE sizeof(struct rte_security_session) -struct cn9k_sec_session { +struct __rte_cache_aligned cn9k_sec_session {uint8_t rte_sess[SEC_SESS_SIZE ];/** PMD private space */
@@ -57,7 +57,7 @@ struct cn9k_sec_session {struct cnxk_cpt_qp *qp;struct cn9k_ipsec_sa sa; -} __rte_cache_aligned; +};void cn9k_sec_ops_override (void );
drivers/crypto/cnxk/cnxk_cryptodev_ops.h +2 -2
@@ -42,7 +42,7 @@ struct cpt_qp_meta_info {#define CPT_OP_FLAGS_IPSEC_DIR_INBOUND (1 << 2)#define CPT_OP_FLAGS_IPSEC_INB_REPLAY (1 << 3) -struct cpt_inflight_req { +struct __rte_aligned(ROC_ALIGN) cpt_inflight_req {union cpt_res_s res;union {void *opaque;
@@ -59,7 +59,7 @@ struct cpt_inflight_req {uint8_t *rptr;#endif void *qp; -}__rte_aligned (ROC_ALIGN ); +};PLT_STATIC_ASSERT (sizeof (struct cpt_inflight_req ) ==ROC_CACHE_LINE_SZ );
drivers/crypto/cnxk/cnxk_se.h +2 -2
@@ -31,7 +31,7 @@ enum cpt_dp_thread_type {#define SYM_SESS_SIZE sizeof(struct rte_cryptodev_sym_session) -struct cnxk_se_sess { +struct __rte_aligned(ROC_ALIGN) cnxk_se_sess {uint8_t rte_sess[SYM_SESS_SIZE ]; uint8_t aes_gcm : 1;
@@ -67,7 +67,7 @@ struct cnxk_se_sess {struct cnxk_cpt_qp *qp;struct roc_se_ctx roc_se_ctx;struct roc_cpt_lf *lf; -}__rte_aligned (ROC_ALIGN ); +};struct cnxk_sym_dp_ctx {struct cnxk_se_sess *sess;
Signature · 1 line
1.8.3.1
PATCH v2 60/83 crypto/ccp: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/ccp/ccp_crypto.h | 4 ++-- drivers/crypto/ccp/ccp_dev.h | 8 ++++---- drivers/crypto/ccp/ccp_pmd_private.h | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-)
drivers/crypto/ccp/ccp_crypto.h +2 -2
@@ -246,7 +246,7 @@ enum ccp_hash_op { };/* CCP crypto private session structure */ -struct ccp_session { +struct __rte_cache_aligned ccp_session {bool auth_opt;enum ccp_cmd_order cmd_id;/**< chain order mode */
@@ -314,7 +314,7 @@ struct ccp_session {/**< AEAD Algorithm */ uint32_t reserved; -} __rte_cache_aligned; +};extern uint8_t ccp_cryptodev_driver_id;
drivers/crypto/ccp/ccp_dev.h +4 -4
@@ -178,7 +178,7 @@ static inline uint32_t ccp_pci_reg_read(void *base, int offset)/** * A structure describing a CCP command queue. */ -struct ccp_queue { +struct __rte_cache_aligned ccp_queue {struct ccp_device *dev;char memz_name[RTE_MEMZONE_NAMESIZE ];
@@ -214,12 +214,12 @@ struct ccp_queue {/**< lsb assigned for sha ctx */ uint32_t sb_hmac;/**< lsb assigned for hmac ctx */ -} __rte_cache_aligned; +};/** * A structure describing a CCP device. */ -struct ccp_device { +struct __rte_cache_aligned ccp_device {TAILQ_ENTRY (ccp_device) next;int id;/**< ccp dev id on platform */
@@ -237,7 +237,7 @@ struct ccp_device {/**< current queue index */ int hwrng_retries;/**< retry counter for CCP TRNG */ -} __rte_cache_aligned; +};/**< CCP H/W engine related */ /**
drivers/crypto/ccp/ccp_pmd_private.h +4 -4
@@ -46,7 +46,7 @@ struct ccp_private { };/* CCP batch info */ -struct ccp_batch_info { +struct __rte_cache_aligned ccp_batch_info {struct rte_crypto_op *op[CCP_MAX_BURST ];/**< optable populated at enque time from app*/ int op_idx;
@@ -66,10 +66,10 @@ struct ccp_batch_info {int lsb_buf_idx;uint16_t auth_ctr;/**< auth only ops batch for CPU based auth */ -} __rte_cache_aligned; +};/**< CCP crypto queue pair */ -struct ccp_qp { +struct __rte_cache_aligned ccp_qp {uint16_t id;/**< Queue Pair Identifier */ char name[RTE_CRYPTODEV_NAME_MAX_LEN ];
@@ -91,7 +91,7 @@ struct ccp_qp {* by the driver when verifying a digest provided * by the user (using authentication verify operation) */ -} __rte_cache_aligned; +};/**< device specific operations function pointer structure */
Signature · 1 line
1.8.3.1
PATCH v2 61/83 crypto/caam_jr: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/caam_jr/caam_jr_desc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/caam_jr/caam_jr_desc.h +4 -4
@@ -261,15 +261,15 @@ struct load_command_s {* will be type-casted to this one * this one. */ -struct sec_sd_t { +struct __rte_aligned(64) sec_sd_t {uint32_t rsvd[MAX_DESC_SIZE_WORDS ]; -} __rte_packed __rte_aligned(64); +} __rte_packed;/* Structure encompassing a job descriptor which processes * a single packet from a context. The job descriptor references * a shared descriptor from a SEC context. */ -struct sec_job_descriptor_t { +struct __rte_aligned(64) sec_job_descriptor_t {struct descriptor_header_s deschdr;dma_addr_t sd_ptr;struct seq_out_command_s seq_out;
@@ -280,6 +280,6 @@ struct sec_job_descriptor_t {uint32_t in_ext_length;struct load_command_s load_dpovrd; uint32_t dpovrd; -} __rte_packed __rte_aligned(64); +} __rte_packed;#endif
Signature · 1 line
1.8.3.1
PATCH v2 62/83 crypto/bcmfs: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/bcmfs/bcmfs_qp.h | 4 ++-- drivers/crypto/bcmfs/bcmfs_sym_session.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/bcmfs/bcmfs_qp.h +2 -2
@@ -76,7 +76,7 @@ struct bcmfs_queue {char memz_name[RTE_MEMZONE_NAMESIZE ]; }; -struct bcmfs_qp { +struct __rte_cache_aligned bcmfs_qp {/* Queue-pair ID */ uint16_t qpair_id;/* Mapped IO address */
@@ -104,7 +104,7 @@ struct bcmfs_qp {/* a temporary buffer to keep message pointers */ struct bcmfs_qp_message *infl_msgs[BCMFS_MAX_REQS_BUFF ]; -} __rte_cache_aligned; +};/* Structure defining h/w queue pair operations */ struct bcmfs_hw_queue_pair_ops {
drivers/crypto/bcmfs/bcmfs_sym_session.h +2 -2
@@ -24,7 +24,7 @@ enum bcmfs_sym_chain_order { };/* BCMFS_SYM crypto private session structure */ -struct bcmfs_sym_session { +struct __rte_cache_aligned bcmfs_sym_session {enum bcmfs_sym_chain_order chain_order;/* Cipher Parameters */
@@ -83,7 +83,7 @@ struct bcmfs_sym_session { } aead;bool cipher_first; -} __rte_cache_aligned; +}; int bcmfs_process_crypto_op(struct rte_crypto_op *op,
Signature · 1 line
1.8.3.1
PATCH v2 63/83 crypto/armv8: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/crypto/armv8/armv8_pmd_private.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/crypto/armv8/armv8_pmd_private.h +6 -8
@@ -99,7 +99,7 @@ struct armv8_crypto_private { };/** ARMv8 crypto queue pair */ -struct armv8_crypto_qp { +struct __rte_cache_aligned armv8_crypto_qp {uint16_t id;/**< Queue Pair Identifier */ struct rte_ring *processed_ops;
@@ -115,10 +115,10 @@ struct armv8_crypto_qp {* by the driver when verifying a digest provided * by the user (using authentication verify operation) */ -} __rte_cache_aligned; +};/** ARMv8 crypto private session structure */ -struct armv8_crypto_session { +struct __rte_cache_aligned armv8_crypto_session {enum armv8_crypto_chain_order chain_order;/**< chain order mode */ crypto_func_t crypto_func;
@@ -160,11 +160,9 @@ struct armv8_crypto_session { } auth;struct { - uint8_t i_key_pad[SHA_BLOCK_MAX] -__rte_cache_aligned ; + alignas(RTE_CACHE_LINE_SIZE )uint8_t i_key_pad[SHA_BLOCK_MAX ];/**< inner pad (max supported block length) */ - uint8_t o_key_pad[SHA_BLOCK_MAX] -__rte_cache_aligned ; + alignas(RTE_CACHE_LINE_SIZE )uint8_t o_key_pad[SHA_BLOCK_MAX ];/**< outer pad (max supported block length) */ uint8_t key[SHA_BLOCK_MAX ];/**< HMAC key (max supported block length)*/
@@ -174,7 +172,7 @@ struct armv8_crypto_session {/* Digest length */ } auth; -} __rte_cache_aligned; +};/** Set and validate ARMv8 crypto session parameters */ extern int armv8_crypto_set_session_parameters(
Signature · 1 line
1.8.3.1
PATCH v2 64/83 compress/zlib: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/compress/zlib/zlib_pmd_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/compress/zlib/zlib_pmd_private.h +6 -6
@@ -30,7 +30,7 @@ struct zlib_private {struct rte_mempool *mp; }; -struct zlib_qp { +struct __rte_cache_aligned zlib_qp {struct rte_ring *processed_pkts;/**< Ring for placing process packets */ struct rte_compressdev_stats qp_stats;
@@ -39,7 +39,7 @@ struct zlib_qp {/**< Queue Pair Identifier */ char name[RTE_COMPRESSDEV_NAME_MAX_LEN ];/**< Unique Queue Pair Name */ -} __rte_cache_aligned; +};/* Algorithm handler function prototype */ typedef void (*comp_func_t )(struct rte_comp_op *op,z_stream *strm);
@@ -47,19 +47,19 @@ struct zlib_qp {typedef int (*comp_free_t )(z_stream *strm);/** ZLIB Stream structure */ -struct zlib_stream { +struct __rte_cache_aligned zlib_stream {z_stream strm;/**< zlib stream structure */ comp_func_t comp;/**< Operation (compression/decompression) */ comp_free_t free;/**< Free Operation (compression/decompression) */ -} __rte_cache_aligned; +};/** ZLIB private xform structure */ -struct zlib_priv_xform { +struct __rte_cache_aligned zlib_priv_xform {struct zlib_stream stream; -} __rte_cache_aligned; +}; int zlib_set_stream_parameters(const struct rte_comp_xform *xform,
Signature · 1 line
1.8.3.1
PATCH v2 65/83 compress/qat: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/compress/qat/qat_comp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/compress/qat/qat_comp.h +2 -2
@@ -50,10 +50,10 @@ struct array_of_ptrs {phys_addr_t pointer[0 ]; }; -struct qat_inter_sgl { +struct __rte_cache_aligned qat_inter_sgl { qat_sgl_hdr;struct qat_flat_buf buffers[QAT_NUM_BUFS_IN_IM_SGL ]; -} __rte_packed __rte_cache_aligned; +} __rte_packed;struct qat_comp_op_cookie {
Signature · 1 line
1.8.3.1
PATCH v2 66/83 compress/octeontx: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/compress/octeontx/otx_zip.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/compress/octeontx/otx_zip.h +8 -8
@@ -106,21 +106,21 @@ typedef int (*comp_func_t)(struct rte_comp_op *op, struct zipvf_qp *qp, struct zip_stream *zstrm, int num);/* Scatter gather list */ -struct zipvf_sginfo { +struct __rte_aligned(16) zipvf_sginfo {union zip_zptr_addr_s sg_addr;union zip_zptr_ctl_s sg_ctl; -} __rte_aligned(16); +};/** * ZIP private stream structure */ -struct zip_stream { +struct __rte_cache_aligned zip_stream {union zip_inst_s *inst[ZIP_BURST_SIZE ];/* zip instruction pointer */ comp_func_t func;/* function to process comp operation */ void *bufs[MAX_BUFS_PER_STREAM *ZIP_BURST_SIZE ]; -} __rte_cache_aligned; +};/**
@@ -140,7 +140,7 @@ struct zipvf_cmdq {/** * ZIP device queue structure */ -struct zipvf_qp { +struct __rte_cache_aligned zipvf_qp {struct zipvf_cmdq cmdq;/* Hardware instruction queue structure */ struct rte_ring *processed_pkts;
@@ -158,12 +158,12 @@ struct zipvf_qp {/* SGL pointers */ uint64_t num_sgbuf;uint64_t enqed; -} __rte_cache_aligned; +};/** * ZIP VF device structure. */ -struct zip_vf { +struct __rte_cache_aligned zip_vf {int vfid;/* vf index */ struct rte_pci_device *pdev;
@@ -177,7 +177,7 @@ struct zip_vf {struct rte_mempool *zip_mp;struct rte_mempool *sg_mp;/* pointer to pools */ -} __rte_cache_aligned; +}; static inline int
Signature · 1 line
1.8.3.1
PATCH v2 67/83 compress/nitrox: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/compress/nitrox/nitrox_comp_reqmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/compress/nitrox/nitrox_comp_reqmgr.c +1 -1
@@ -304,7 +304,7 @@ struct nitrox_sgtable {struct nitrox_softreq {struct nitrox_zip_instr instr; - struct nitrox_zip_result zip_res __rte_aligned(8); + alignas(8 )struct nitrox_zip_result zip_res;uint8_t decomp_threshold[NITROX_ZIP_MAX_ONFSIZE ];struct rte_comp_op *op;struct nitrox_sgtable src;
Signature · 1 line
1.8.3.1
PATCH v2 68/83 compress/isal: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/compress/isal/isal_compress_pmd_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/compress/isal/isal_compress_pmd_private.h +4 -4
@@ -19,7 +19,7 @@ struct isal_comp_private { };/** ISA-L queue pair */ -struct isal_comp_qp { +struct __rte_cache_aligned isal_comp_qp {/* Queue Pair Identifier */ uint16_t id;/* Unique Queue Pair Name */
@@ -34,17 +34,17 @@ struct isal_comp_qp {struct inflate_state *state;/* Number of free elements on ring */ uint16_t num_free_elements; -} __rte_cache_aligned; +};/** ISA-L private xform structure */ -struct isal_priv_xform { +struct __rte_cache_aligned isal_priv_xform {enum rte_comp_xform_type type;union {struct rte_comp_compress_xform compress;struct rte_comp_decompress_xform decompress; };uint32_t level_buffer_size; -} __rte_cache_aligned; +};/** Set and validate NULL comp private xform parameters */ extern int
Signature · 1 line
1.8.3.1
PATCH v2 69/83 common/qat: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/common/qat/qat_adf/icp_qat_hw.h | 8 ++++---- drivers/common/qat/qat_common.h | 4 ++-- drivers/common/qat/qat_qp.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/common/qat/qat_adf/icp_qat_hw.h +4 -4
@@ -391,10 +391,10 @@ enum icp_qat_hw_cipher_convert {#define ICP_QAT_HW_CCM_MSG_LEN_MAX_FIELD_SIZE 4#define ICP_QAT_HW_CCM_NONCE_OFFSET 1 -struct icp_qat_hw_cipher_algo_blk { +struct __rte_cache_aligned icp_qat_hw_cipher_algo_blk {struct icp_qat_hw_cipher_config cipher_config;uint8_t key[ICP_QAT_HW_CIPHER_MAX_KEY_SZ ]; -} __rte_cache_aligned; +};struct icp_qat_hw_gen2_crc_cd {uint32_t flags;
@@ -423,10 +423,10 @@ struct icp_qat_hw_ucs_cipher_config {uint32_t reserved[3 ]; }; -struct icp_qat_hw_cipher_algo_blk20 { +struct __rte_cache_aligned icp_qat_hw_cipher_algo_blk20 {struct icp_qat_hw_ucs_cipher_config cipher_config;uint8_t key[ICP_QAT_HW_CIPHER_MAX_KEY_SZ ]; -} __rte_cache_aligned; +};enum icp_qat_hw_ucs_cipher_reflect_out {ICP_QAT_HW_CIPHER_UCS_REFLECT_OUT_DISABLED =0 ,
drivers/common/qat/qat_common.h +2 -2
@@ -61,11 +61,11 @@ struct qat_flat_buf { } __extension__ -struct qat_sgl { +struct __rte_cache_aligned qat_sgl { qat_sgl_hdr;/* flexible array of flat buffers*/ struct qat_flat_buf buffers[0 ]; -} __rte_packed __rte_cache_aligned; +} __rte_packed;/** Common, i.e. not service-specific, statistics */ struct qat_common_stats {
drivers/common/qat/qat_qp.h +3 -3
@@ -81,7 +81,7 @@ typedef int (*qat_op_dequeue_t)(void **op, uint8_t *resp, void *op_cookie,#define QAT_BUILD_REQUEST_MAX_OPAQUE_SIZE 2 -struct qat_qp { +struct __rte_cache_aligned qat_qp {void *mmap_bar_addr;struct qat_queue tx_q;struct qat_queue rx_q;
@@ -95,10 +95,10 @@ struct qat_qp {struct qat_pci_device *qat_dev;/**< qat device this qp is on */ uint32_t enqueued; - uint32_t dequeued __rte_aligned(4); + alignas(sizeof (uint32_t ))uint32_t dequeued;uint16_t max_inflights;uint16_t min_enq_burst_threshold; -} __rte_cache_aligned; +};/** * Structure with data needed for creation of queue pair.
Signature · 1 line
1.8.3.1
PATCH v2 70/83 common/mlx5: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/common/mlx5/linux/mlx5_glue.c | 2 +- drivers/common/mlx5/linux/mlx5_nl.c | 2 +- drivers/common/mlx5/mlx5_common_mr.h | 4 ++-- drivers/common/mlx5/mlx5_common_utils.h | 12 ++++++------ drivers/common/mlx5/mlx5_prm.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-)
drivers/common/mlx5/linux/mlx5_glue.c +1 -1
@@ -1578,7 +1578,7 @@#endif } -__rte_cache_aligned +alignas(RTE_CACHE_LINE_SIZE )const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue ) { .version =MLX5_GLUE_VERSION , .fork_init = mlx5_glue_fork_init,
drivers/common/mlx5/linux/mlx5_nl.c +1 -1
@@ -1507,7 +1507,7 @@ struct mlx5_nl_port_info {struct ifinfomsg *ifm;char name[sizeof (MLX5_VMWA_VLAN_DEVICE_PFX ) +32 ]; - __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) uint8_t buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)) + NLMSG_ALIGN(sizeof(struct nlattr)) * 8 +
drivers/common/mlx5/mlx5_common_mr.h +2 -2
@@ -91,7 +91,7 @@ struct mlx5_mr_share_cache { } __rte_packed;/* Multi-Packet RQ buffer header. */ -struct mlx5_mprq_buf { +struct __rte_cache_aligned mlx5_mprq_buf {struct rte_mempool *mp;uint16_t refcnt;/* Atomically accessed refcnt. */ struct rte_mbuf_ext_shared_info shinfos[];
@@ -100,7 +100,7 @@ struct mlx5_mprq_buf {* More memory will be allocated for the first stride head-room and for * the strides data. */ -} __rte_cache_aligned; +};__rte_internal void mlx5_mprq_buf_free_cb(void *addr, void *opaque);
drivers/common/mlx5/mlx5_common_utils.h +6 -6
@@ -29,7 +29,7 @@*/ struct mlx5_list_entry {LIST_ENTRY (mlx5_list_entry) next;/* Entry pointers in the list. */ - uint32_t ref_cnt __rte_aligned(8); /* 0 means, entry is invalid. */ + alignas(8 )uint32_t ref_cnt;/* 0 means, entry is invalid. */ uint32_t lcore_idx;union {struct mlx5_list_entry *gentry;
@@ -37,10 +37,10 @@ struct mlx5_list_entry { }; } __rte_packed; -struct mlx5_list_cache { +struct __rte_cache_aligned mlx5_list_cache { LIST_HEAD(mlx5_list_head, mlx5_list_entry) h;uint32_t inv_cnt;/* Invalid entries counter. */ -} __rte_cache_aligned; +};/** * Type of callback function for entry removal.
@@ -243,9 +243,9 @@ int mlx5_list_unregister(struct mlx5_list *list,/********************* Hash List **********************/ /* Hash list bucket. */ -struct mlx5_hlist_bucket { +struct __rte_cache_aligned mlx5_hlist_bucket {struct mlx5_list_inconst l; -} __rte_cache_aligned; +};/** * Hash list table structure
@@ -257,7 +257,7 @@ struct mlx5_hlist {uint8_t flags;bool direct_key;/* Whether to use the key directly as hash index. */ struct mlx5_list_const l_const;/* List constant data. */ - struct mlx5_hlist_bucket buckets[] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct mlx5_hlist_bucket buckets[]; };/**
drivers/common/mlx5/mlx5_prm.h +2 -2
@@ -319,12 +319,12 @@ enum mlx5_mpw_mode { };/* WQE Control segment. */ -struct mlx5_wqe_cseg { +struct __rte_aligned(MLX5_WSEG_SIZE) mlx5_wqe_cseg {uint32_t opcode;uint32_t sq_ds;uint32_t flags;uint32_t misc; -} __rte_packed __rte_aligned(MLX5_WSEG_SIZE); +} __rte_packed;/* * WQE CSEG opcode field size is 32 bits, divided:
Signature · 1 line
1.8.3.1
PATCH v2 71/83 common/idpf: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/common/idpf/idpf_common_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/idpf/idpf_common_device.h +1 -1
@@ -52,7 +52,7 @@ struct idpf_adapter {uint32_t cmd_retval;/* return value of the cmd response from cp */ uint8_t *mbx_resp;/* buffer to store the mailbox response from cp */ - uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE )uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE ];bool is_tx_singleq;/* true - single queue model, false - split queue model */ bool is_rx_singleq;/* true - single queue model, false - split queue model */
Signature · 1 line
1.8.3.1
PATCH v2 72/83 common/cpt: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/common/cpt/cpt_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/common/cpt/cpt_common.h +2 -2
@@ -41,7 +41,7 @@ struct pending_queue {unsigned int head; }; -struct cpt_request_info { +struct __rte_aligned(8) cpt_request_info {/** Data path fields */ uint64_t comp_baddr;volatile uint64_t *completion_addr;
@@ -58,7 +58,7 @@ struct cpt_request_info {/** Control path fields */ uint64_t time_out;uint8_t extra_time; -}__rte_aligned (8 ); +}; static __rte_always_inline void pending_queue_push(struct pending_queue *q, void *rid, unsigned int off,
Signature · 1 line
1.8.3.1
PATCH v2 73/83 bus/fslmc: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +2 -2
@@ -151,7 +151,7 @@ typedef void (dpaa2_queue_cb_dqrr_t)(struct qbman_swp *swp,typedef void (dpaa2_queue_cb_eqresp_free_t )(uint16_t eqresp_ci,struct dpaa2_queue *dpaa2_q); -struct dpaa2_queue { +struct __rte_cache_aligned dpaa2_queue {struct rte_mempool *mb_pool;/**< mbuf pool to populate RX ring. */ union {struct rte_eth_dev_data *eth_data;
@@ -179,7 +179,7 @@ struct dpaa2_queue {uint16_t resv;uint64_t offloads;uint64_t lpbk_cntx; -} __rte_cache_aligned; +};struct swp_active_dqs {struct qbman_result *global_active_dqs;
Signature · 1 line
1.8.3.1
PATCH v2 74/83 baseband/turbo_sw: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/baseband/turbo_sw/bbdev_turbo_software.c +2 -2
@@ -72,7 +72,7 @@ struct turbo_sw_params { };/* queue */ -struct turbo_sw_queue { +struct __rte_cache_aligned turbo_sw_queue {/* Ring for processed (encoded/decoded) operations which are ready to * be dequeued. */
@@ -95,7 +95,7 @@ struct turbo_sw_queue {uint8_t *adapter_output;/* Operation type of this queue */ enum rte_bbdev_op_type type; -} __rte_cache_aligned; +};#ifdef RTE_BBDEV_SDK_AVX2
Signature · 1 line
1.8.3.1
PATCH v2 75/83 baseband/null: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/baseband/null/bbdev_null.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/baseband/null/bbdev_null.c +2 -2
@@ -47,9 +47,9 @@ struct bbdev_private { };/* queue */ -struct bbdev_queue { +struct __rte_cache_aligned bbdev_queue {struct rte_ring *processed_pkts;/* Ring for processed packets */ -} __rte_cache_aligned; +};/* Get device info */ static void
Signature · 1 line
1.8.3.1
PATCH v2 76/83 app/test: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/test/test_cryptodev_aead_test_vectors.h | 6 +++--- app/test/test_cryptodev_blockcipher.h | 2 +- app/test/test_cryptodev_kasumi_test_vectors.h | 2 +- app/test/test_cryptodev_mixed_test_vectors.h | 2 +- app/test/test_cryptodev_security_docsis_test_vectors.h | 2 +- app/test/test_cryptodev_snow3g_test_vectors.h | 2 +- app/test/test_cryptodev_zuc_test_vectors.h | 2 +- app/test/test_distributor.c | 12 ++++++------ app/test/test_distributor_perf.c | 6 +++--- app/test/test_mempool_perf.c | 6 +++--- app/test/test_pmd_perf.c | 4 ++-- app/test/test_ring_stress_impl.h | 10 +++++----- app/test/test_rwlock.c | 8 ++++---- app/test/test_seqlock.c | 8 ++++---- app/test/test_ticketlock.c | 4 ++-- app/test/test_trace_perf.c | 8 ++++---- 16 files changed, 42 insertions(+), 42 deletions(-)
app/test/test_cryptodev_aead_test_vectors.h +3 -3
@@ -47,7 +47,7 @@ struct aead_test_data { } key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned len; } iv;
@@ -79,7 +79,7 @@ struct gmac_test_data { } key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned len; } iv;
@@ -2025,7 +2025,7 @@ struct cryptodev_perf_test_data { } key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned len; } iv;
app/test/test_cryptodev_blockcipher.h +1 -1
@@ -72,7 +72,7 @@ struct blockcipher_test_data { } cipher_key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned int len; } iv;
app/test/test_cryptodev_kasumi_test_vectors.h +1 -1
@@ -12,7 +12,7 @@ struct kasumi_test_data { } key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned int len; } cipher_iv;
app/test/test_cryptodev_mixed_test_vectors.h +1 -1
@@ -32,7 +32,7 @@ struct mixed_cipher_auth_test_data { } cipher_key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned int len;/* length must be in Bytes */ } cipher_iv;
app/test/test_cryptodev_security_docsis_test_vectors.h +1 -1
@@ -21,7 +21,7 @@ struct docsis_test_data { } key;struct { - uint8_t data[16] __rte_aligned(16); + alignas(16 )uint8_t data[16 ];unsigned int len; } iv;
app/test/test_cryptodev_snow3g_test_vectors.h +1 -1
@@ -12,7 +12,7 @@ struct snow3g_test_data { } key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned len; } cipher_iv;
app/test/test_cryptodev_zuc_test_vectors.h +1 -1
@@ -12,7 +12,7 @@ struct wireless_test_data { } key;struct { - uint8_t data[64] __rte_aligned(16); + alignas(16 )uint8_t data[64 ];unsigned len; } cipher_iv;
app/test/test_distributor.c +6 -6
@@ -53,9 +53,9 @@ struct worker_params {static volatile unsigned worker_idx;static volatile unsigned zero_idx; -struct worker_stats { +struct __rte_cache_aligned worker_stats {volatile unsigned handled_packets; -} __rte_cache_aligned; +};struct worker_stats worker_stats[RTE_MAX_LCORE ];/* returns the total count of the number of packets handled by the worker
@@ -87,7 +87,7 @@ struct worker_stats {static int handle_work (void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_mbuf *buf[8 ];struct worker_params *wp = arg;struct rte_distributor *db = wp->dist;unsigned int num;
@@ -306,7 +306,7 @@ struct worker_stats {static int handle_work_with_free_mbufs (void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_mbuf *buf[8 ];struct worker_params *wp = arg;struct rte_distributor *d = wp->dist;unsigned int i;
@@ -375,7 +375,7 @@ struct worker_stats {static int handle_work_for_shutdown_test (void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_mbuf *buf[8 ];struct worker_params *wp = arg;struct rte_distributor *d = wp->dist;unsigned int num;
@@ -592,7 +592,7 @@ struct worker_stats {static int handle_and_mark_work (void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_mbuf *buf[8 ];struct worker_params *wp = arg;struct rte_distributor *db = wp->dist;unsigned int num, i;
app/test/test_distributor_perf.c +3 -3
@@ -33,9 +33,9 @@static volatile int quit;static volatile unsigned worker_idx; -struct worker_stats { +struct __rte_cache_aligned worker_stats {volatile unsigned handled_packets; -} __rte_cache_aligned; +};static struct worker_stats worker_stats[RTE_MAX_LCORE ];/*
@@ -122,7 +122,7 @@ struct worker_stats {unsigned int num =0 ;int i;unsigned int id =__atomic_fetch_add (&worker_idx,1 , __ATOMIC_RELAXED); - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )struct rte_mbuf *buf[8 ];for (i =0 ; i <8 ; i++) buf[i] =NULL ;
app/test/test_mempool_perf.c +3 -3
@@ -101,9 +101,9 @@static int use_constant_values;/* number of enqueues / dequeues */ -struct mempool_test_stats { +struct __rte_cache_aligned mempool_test_stats {uint64_t enq_count; -} __rte_cache_aligned; +};static struct mempool_test_stats stats[RTE_MAX_LCORE ];
@@ -124,7 +124,7 @@ struct mempool_test_stats { test_loop(struct rte_mempool *mp, struct rte_mempool_cache *cache, unsigned int x_keep, unsigned int x_get_bulk, unsigned int x_put_bulk) { - void *obj_table[MAX_KEEP] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *obj_table[MAX_KEEP];unsigned int idx;unsigned int i;int ret;
app/test/test_pmd_perf.c +2 -2
@@ -94,12 +94,12 @@ enum { LCORE_USED, }; -struct lcore_conf { +struct __rte_cache_aligned lcore_conf {uint8_t status;uint8_t socketid;uint16_t nb_ports;uint16_t portlist[RTE_MAX_ETHPORTS ]; -} __rte_cache_aligned; +};struct lcore_conf lcore_conf[RTE_MAX_LCORE ];
app/test/test_ring_stress_impl.h +5 -5
@@ -24,7 +24,7 @@ enum { WRK_CMD_RUN, }; -static uint32_t wrk_cmd __rte_cache_aligned = WRK_CMD_STOP; +static alignas(RTE_CACHE_LINE_SIZE )uint32_t wrk_cmd =WRK_CMD_STOP ;/* test run-time in seconds */ static const uint32_t run_time =60 ;
@@ -41,14 +41,14 @@ struct lcore_stat { } op; }; -struct lcore_arg { +struct __rte_cache_aligned lcore_arg {struct rte_ring *rng;struct lcore_stat stats; -} __rte_cache_aligned; +}; -struct ring_elem { +struct __rte_cache_aligned ring_elem {uint32_t cnt[RTE_CACHE_LINE_SIZE /sizeof (uint32_t )]; -} __rte_cache_aligned; +};/* * redefinable functions
app/test/test_rwlock.c +4 -4
@@ -42,7 +42,7 @@ enum { LC_TYPE_WRLOCK, }; -static struct { +static alignas(RTE_CACHE_LINE_SIZE) struct { rte_rwlock_t lock; uint64_t tick;
@@ -50,9 +50,9 @@ enum {uint8_t u8[RTE_CACHE_LINE_SIZE ];uint64_t u64[RTE_CACHE_LINE_SIZE /sizeof (uint64_t )]; } data; -}__rte_cache_aligned try_rwlock_data; +} try_rwlock_data; -struct try_rwlock_lcore { +struct __rte_cache_aligned try_rwlock_lcore {int32_t rc;int32_t type;struct {
@@ -60,7 +60,7 @@ struct try_rwlock_lcore {uint64_t fail;uint64_t success; } stat; -} __rte_cache_aligned; +};static struct try_rwlock_lcore try_lcore_data[RTE_MAX_LCORE ];
app/test/test_seqlock.c +4 -4
@@ -12,13 +12,13 @@#include "test.h" -struct data { +struct __rte_cache_aligned data {rte_seqlock_t lock;uint64_t a; - uint64_t b __rte_cache_aligned; - uint64_t c __rte_cache_aligned; -} __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint64_t b; + alignas(RTE_CACHE_LINE_SIZE )uint64_t c; +};struct reader {struct data *data;
app/test/test_ticketlock.c +2 -2
@@ -95,8 +95,8 @@ }static rte_ticketlock_t lk =RTE_TICKETLOCK_INITIALIZER ; -static uint64_t lcount __rte_cache_aligned; -static uint64_t lcore_count[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )uint64_t lcount; +static alignas(RTE_CACHE_LINE_SIZE )uint64_t lcore_count[RTE_MAX_LCORE ];static uint64_t time_cost[RTE_MAX_LCORE ];#define MAX_LOOP 10000
app/test/test_trace_perf.c +4 -4
@@ -14,17 +14,17 @@struct test_data ; -struct lcore_data { +struct __rte_cache_aligned lcore_data {volatile bool done;volatile bool started;uint64_t total_cycles;uint64_t total_calls; -} __rte_cache_aligned; +}; -struct test_data { +struct __rte_cache_aligned test_data {unsigned int nb_workers;struct lcore_data ldata[]; -} __rte_cache_aligned; +};#define STEP 100#define CENT_OPS (OP ) do { \
Signature · 1 line
1.8.3.1
RE: [EXTERNAL] [PATCH v2 76/83] app/test: move alignment attribute on types
Quoted 8 lines
Move location of
__rte_aligned(a)to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.Signed-off-by Tyler Retzlaff <[email protected]>Acked-by Morten Brørup <[email protected]>
Quoted 8 lines
--- app/test/test_cryptodev_aead_test_vectors.h | 6 +++--- app/test/test_cryptodev_blockcipher.h | 2 +- app/test/test_cryptodev_kasumi_test_vectors.h | 2 +- app/test/test_cryptodev_mixed_test_vectors.h | 2 +- app/test/test_cryptodev_security_docsis_test_vectors.h | 2 +- app/test/test_cryptodev_snow3g_test_vectors.h | 2 +- app/test/test_cryptodev_zuc_test_vectors.h | 2 +-
PATCH v2 77/83 app/test-pipeline: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/test-pipeline/main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pipeline/main.h +2 -2
@@ -18,7 +18,7 @@ struct app_mbuf_array {#define APP_MAX_PORTS 4#endif -struct app_params { +struct __rte_cache_aligned app_params {/* CPU cores */ uint32_t core_rx;uint32_t core_worker;
@@ -56,7 +56,7 @@ struct app_params {/* App behavior */ uint32_t pipeline_type; -} __rte_cache_aligned; +};extern struct app_params app;
Signature · 1 line
1.8.3.1
PATCH v2 78/83 app/test-mldev: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/test-mldev/test_device_ops.h | 4 ++-- app/test-mldev/test_inference_common.h | 4 ++-- app/test-mldev/test_model_ops.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
app/test-mldev/test_device_ops.h +2 -2
@@ -9,9 +9,9 @@#include "test_common.h" -struct test_device { +struct __rte_cache_aligned test_device {/* common data */ struct test_common cmn; -} __rte_cache_aligned; +};#endif /* TEST_DEVICE_OPS_H */
app/test-mldev/test_inference_common.h +2 -2
@@ -37,7 +37,7 @@ struct ml_core_args {uint64_t end_cycles; }; -struct test_inference { +struct __rte_cache_aligned test_inference {/* common data */ struct test_common cmn;
@@ -59,7 +59,7 @@ struct test_inference {struct rte_ml_dev_xstats_map *xstats_map;uint64_t *xstats_values;int xstats_size; -} __rte_cache_aligned; +};bool test_inference_cap_check (struct ml_options *opt);int test_inference_opt_check (struct ml_options *opt);
app/test-mldev/test_model_ops.h +2 -2
@@ -9,12 +9,12 @@#include "test_model_common.h" -struct test_model_ops { +struct __rte_cache_aligned test_model_ops {/* common data */ struct test_common cmn;/* test specific data */ struct ml_model model[ML_TEST_MAX_MODELS ]; -} __rte_cache_aligned; +};#endif /* TEST_MODEL_OPS_H */
Signature · 1 line
1.8.3.1
PATCH v2 79/83 app/test-flow-perf: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/test-flow-perf/actions_gen.c | 51 ++++++++++++++++++++++------------------ app/test-flow-perf/items_gen.c | 22 +++++++++-------- app/test-flow-perf/main.c | 8 +++---- 3 files changed, 44 insertions(+), 37 deletions(-)
app/test-flow-perf/actions_gen.c +28 -23
@@ -62,7 +62,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_mark mark_actions[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE ) +struct rte_flow_action_mark mark_actions[RTE_MAX_LCORE ];uint32_t counter = para.counter; do {
@@ -79,7 +80,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_queue queue_actions[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE ) +struct rte_flow_action_queue queue_actions[RTE_MAX_LCORE ]; do { queue_actions[para.core_idx].index = para.queue;
@@ -109,7 +111,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct action_rss_data *rss_data[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct action_rss_data *rss_data[RTE_MAX_LCORE ];uint16_t queue;
@@ -208,7 +210,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE ];uint32_t mac = para.counter;uint16_t i;
@@ -231,7 +233,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE ];uint32_t mac = para.counter;uint16_t i;
@@ -254,7 +256,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE ];uint32_t ip = para.counter;/* Fixed value */
@@ -273,7 +275,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE ];uint32_t ip = para.counter;/* Fixed value */
@@ -292,7 +294,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE ];uint32_t ipv6 = para.counter;uint8_t i;
@@ -315,7 +317,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE ];uint32_t ipv6 = para.counter;uint8_t i;
@@ -338,7 +340,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE ];uint32_t tp = para.counter;/* Fixed value */
@@ -359,7 +361,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE ];uint32_t tp = para.counter;/* Fixed value */
@@ -381,7 +383,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )rte_be32_t value[RTE_MAX_LCORE ];uint32_t ack_value = para.counter;/* Fixed value */
@@ -399,7 +401,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )rte_be32_t value[RTE_MAX_LCORE ];uint32_t ack_value = para.counter;/* Fixed value */
@@ -417,7 +419,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )rte_be32_t value[RTE_MAX_LCORE ];uint32_t seq_value = para.counter;/* Fixed value */
@@ -435,7 +437,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )rte_be32_t value[RTE_MAX_LCORE ];uint32_t seq_value = para.counter;/* Fixed value */
@@ -453,7 +455,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ttl set_ttl[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_ttl set_ttl[RTE_MAX_LCORE ];uint32_t ttl_value = para.counter;/* Fixed value */
@@ -482,7 +484,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE ];uint32_t dscp_value = para.counter;/* Fixed value */
@@ -503,7 +505,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE ];uint32_t dscp_value = para.counter;/* Fixed value */
@@ -770,7 +772,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct action_raw_encap_data *action_encap_data[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE ) +struct action_raw_encap_data *action_encap_data[RTE_MAX_LCORE ];uint64_t encap_data = para.encap_data;uint8_t *header;uint8_t i;
@@ -807,7 +810,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct action_raw_decap_data *action_decap_data[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE ) +struct action_raw_decap_data *action_decap_data[RTE_MAX_LCORE ];uint64_t decap_data = para.decap_data;uint8_t *header;uint8_t i;
@@ -844,7 +848,8 @@ struct action_rss_data { uint8_t actions_counter, __rte_unused struct additional_para para) { - static struct rte_flow_action_vxlan_encap vxlan_encap[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE ) +struct rte_flow_action_vxlan_encap vxlan_encap[RTE_MAX_LCORE ];static struct rte_flow_item items[5 ];static struct rte_flow_item_eth item_eth;static struct rte_flow_item_ipv4 item_ipv4;
@@ -900,8 +905,8 @@ struct action_rss_data { uint8_t actions_counter, __rte_unused struct additional_para para) { - static struct rte_flow_action_meter - meters[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_action_meter + meters[RTE_MAX_LCORE ]; meters[para.core_idx].mtr_id = para.counter; actions[actions_counter].type =RTE_FLOW_ACTION_TYPE_METER ;
app/test-flow-perf/items_gen.c +12 -10
@@ -52,8 +52,8 @@ struct additional_para { add_ipv4(struct rte_flow_item *items, uint8_t items_counter, struct additional_para para) { - static struct rte_flow_item_ipv4 ipv4_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_ipv4 ipv4_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_ipv4 ipv4_specs[RTE_MAX_LCORE]; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_item_ipv4 ipv4_masks[RTE_MAX_LCORE ];uint8_t ti = para.core_idx; ipv4_specs[ti].hdr.src_addr =RTE_BE32 (para.src_ip);
@@ -69,8 +69,8 @@ struct additional_para { add_ipv6(struct rte_flow_item *items, uint8_t items_counter, struct additional_para para) { - static struct rte_flow_item_ipv6 ipv6_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_ipv6 ipv6_specs[RTE_MAX_LCORE]; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE ];uint8_t ti = para.core_idx;uint8_t i;
@@ -118,8 +118,8 @@ struct additional_para { uint8_t items_counter, struct additional_para para) { - static struct rte_flow_item_vxlan vxlan_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_vxlan vxlan_masks[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_item_vxlan vxlan_specs[RTE_MAX_LCORE ]; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_item_vxlan vxlan_masks[RTE_MAX_LCORE ];uint8_t ti = para.core_idx;uint32_t vni_value;uint8_t i;
@@ -145,8 +145,10 @@ struct additional_para { uint8_t items_counter, __rte_unused struct additional_para para) { - static struct rte_flow_item_vxlan_gpe vxlan_gpe_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_vxlan_gpe vxlan_gpe_masks[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE ) +struct rte_flow_item_vxlan_gpe vxlan_gpe_specs[RTE_MAX_LCORE ]; +static alignas(RTE_CACHE_LINE_SIZE ) +struct rte_flow_item_vxlan_gpe vxlan_gpe_masks[RTE_MAX_LCORE ];uint8_t ti = para.core_idx;uint32_t vni_value;uint8_t i;
@@ -189,8 +191,8 @@ struct additional_para { uint8_t items_counter, __rte_unused struct additional_para para) { - static struct rte_flow_item_geneve geneve_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_geneve geneve_masks[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_item_geneve geneve_specs[RTE_MAX_LCORE ]; +static alignas(RTE_CACHE_LINE_SIZE )struct rte_flow_item_geneve geneve_masks[RTE_MAX_LCORE ];uint8_t ti = para.core_idx;uint32_t vni_value;uint8_t i;
app/test-flow-perf/main.c +4 -4
@@ -113,7 +113,7 @@ struct stream {int rx_queue; }; -struct lcore_info { +struct __rte_cache_aligned lcore_info {int mode;int streams_nb;struct stream streams[MAX_STREAMS ];
@@ -122,7 +122,7 @@ struct lcore_info {uint64_t tx_drops;uint64_t rx_pkts;struct rte_mbuf *pkts[MAX_PKT_BURST ]; -} __rte_cache_aligned; +};static struct lcore_info lcore_infos[RTE_MAX_LCORE ];
@@ -131,14 +131,14 @@ struct used_cpu_time {double deletion[MAX_PORTS ][RTE_MAX_LCORE ]; }; -struct multi_cores_pool { +struct __rte_cache_aligned multi_cores_pool {uint32_t cores_count;uint32_t rules_count;struct used_cpu_time meters_record;struct used_cpu_time flows_record;int64_t last_alloc[RTE_MAX_LCORE ];int64_t current_alloc[RTE_MAX_LCORE ]; -} __rte_cache_aligned; +};static struct multi_cores_pool mc_pool = { .cores_count =1 ,
Signature · 1 line
1.8.3.1
PATCH v2 80/83 app/test-eventdev: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/test-eventdev/test_order_common.h | 4 ++-- app/test-eventdev/test_perf_common.h | 24 ++++++++++++------------ app/test-eventdev/test_pipeline_common.h | 18 +++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-)
app/test-eventdev/test_order_common.h +2 -2
@@ -39,7 +39,7 @@ struct prod_data {struct test_order *t; }; -struct test_order { +struct __rte_cache_aligned test_order {/* Don't change the offset of "err". Signal handler use this memory * to terminate all lcores work. */
@@ -60,7 +60,7 @@ struct test_order {uint32_t *producer_flow_seq;uint32_t *expected_flow_seq;struct evt_options *opt; -} __rte_cache_aligned; +};static inline void order_flow_id_copy_from_mbuf (struct test_order *t,struct rte_event *event)
app/test-eventdev/test_perf_common.h +12 -12
@@ -31,13 +31,13 @@struct test_perf ; -struct worker_data { +struct __rte_cache_aligned worker_data {uint64_t processed_pkts;uint64_t latency;uint8_t dev_id;uint8_t port_id;struct test_perf *t; -} __rte_cache_aligned; +};struct crypto_adptr_data {uint8_t cdev_id;
@@ -51,16 +51,16 @@ struct dma_adptr_data {void **dma_op; }; -struct prod_data { +struct __rte_cache_aligned prod_data {uint8_t dev_id;uint8_t port_id;uint8_t queue_id;struct crypto_adptr_data ca;struct dma_adptr_data da;struct test_perf *t; -} __rte_cache_aligned; +}; -struct test_perf { +struct __rte_cache_aligned test_perf {/* Don't change the offset of "done". Signal handler use this memory * to terminate all lcores work. */
@@ -74,17 +74,17 @@ struct test_perf {struct prod_data prod[EVT_MAX_PORTS ];struct worker_data worker[EVT_MAX_PORTS ];struct evt_options *opt; - uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned; -struct rte_event_timer_adapter *timer_adptr[ - RTE_EVENT_TIMER_ADAPTER_NUM_MAX] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint8_t sched_type_list[EVT_MAX_STAGES ]; + alignas(RTE_CACHE_LINE_SIZE )struct rte_event_timer_adapter *timer_adptr[ +RTE_EVENT_TIMER_ADAPTER_NUM_MAX ];struct rte_mempool *ca_op_pool;struct rte_mempool *ca_sess_pool;struct rte_mempool *ca_asym_sess_pool;struct rte_mempool *ca_vector_pool;struct rte_mempool *da_op_pool; -} __rte_cache_aligned; +}; -struct perf_elt { +struct __rte_cache_aligned perf_elt { union { struct rte_event_timer tim; struct {
@@ -92,7 +92,7 @@ struct perf_elt {uint64_t timestamp; }; }; -} __rte_cache_aligned; +};#define BURST_SIZE 16#define MAX_PROD_ENQ_BURST_SIZE 128
@@ -111,7 +111,7 @@ struct perf_elt {const uint8_t nb_stages = t->opt->nb_stages;\const uint8_t laststage = nb_stages -1 ;\uint8_t cnt =0 ;\ - void *bufs[16] __rte_cache_aligned;\ + alignas(RTE_CACHE_LINE_SIZE )void *bufs[16 ];\int const sz =RTE_DIM (bufs);\uint8_t stage;\struct perf_elt *pe =NULL ;\
app/test-eventdev/test_pipeline_common.h +9 -9
@@ -31,14 +31,14 @@struct test_pipeline ; -struct worker_data { +struct __rte_cache_aligned worker_data {uint64_t processed_pkts;uint8_t dev_id;uint8_t port_id;struct test_pipeline *t; -} __rte_cache_aligned; +}; -struct test_pipeline { +struct __rte_cache_aligned test_pipeline {/* Don't change the offset of "done". Signal handler use this memory * to terminate all lcores work. */
@@ -52,8 +52,8 @@ struct test_pipeline {struct rte_mempool *pool[RTE_MAX_ETHPORTS ];struct worker_data worker[EVT_MAX_PORTS ];struct evt_options *opt; - uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned; -} __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE )uint8_t sched_type_list[EVT_MAX_STAGES ]; +};#define BURST_SIZE 16
@@ -62,7 +62,7 @@ struct test_pipeline {struct test_pipeline *t = w->t; \const uint8_t dev = w->dev_id; \const uint8_t port = w->port_id; \ - struct rte_event ev __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev#define PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT \ int i; \
@@ -70,7 +70,7 @@ struct test_pipeline {struct test_pipeline *t = w->t; \const uint8_t dev = w->dev_id; \const uint8_t port = w->port_id; \ - struct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev[BURST_SIZE + 1]#define PIPELINE_WORKER_MULTI_STAGE_INIT \ struct worker_data *w = arg; \
@@ -81,7 +81,7 @@ struct test_pipeline {const uint8_t last_queue = t->opt->nb_stages -1 ; \uint8_t *const sched_type_list = &t->sched_type_list[0 ]; \const uint8_t nb_stages = t->opt->nb_stages +1 ; \ - struct rte_event ev __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev#define PIPELINE_WORKER_MULTI_STAGE_BURST_INIT \ int i; \
@@ -93,7 +93,7 @@ struct test_pipeline {const uint8_t last_queue = t->opt->nb_stages -1 ; \uint8_t *const sched_type_list = &t->sched_type_list[0 ]; \const uint8_t nb_stages = t->opt->nb_stages +1 ; \ - struct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev[BURST_SIZE + 1] static __rte_always_inline voidpipeline_fwd_event (struct rte_event *ev,uint8_t sched)
Signature · 1 line
1.8.3.1
PATCH v2 81/83 app/pdump: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/pdump/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
app/pdump/main.c +2 -2
@@ -106,7 +106,7 @@ struct pdump_stats {uint64_t freed_pkts; }; -struct pdump_tuples { +struct __rte_cache_aligned pdump_tuples {/* cli params */ uint16_t port;char *device_id;
@@ -133,7 +133,7 @@ struct pdump_tuples {/* stats */ struct pdump_stats stats; -} __rte_cache_aligned; +};static struct pdump_tuples pdump_t[APP_ARG_TCPDUMP_MAX_TUPLES ];struct parse_val {
Signature · 1 line
1.8.3.1
PATCH v2 82/83 app/graph: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- app/graph/ethdev_rx.h | 4 ++-- app/graph/ethdev_rx_priv.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
app/graph/ethdev_rx.h +2 -2
@@ -17,13 +17,13 @@ struct lcore_rx_queue {char node_name[RTE_NODE_NAMESIZE ]; }; -struct lcore_conf { +struct __rte_cache_aligned lcore_conf {uint16_t n_rx_queue;struct lcore_rx_queue rx_queue_list[ETHDEV_RX_QUEUE_PER_LCORE_MAX ];struct rte_graph *graph;char name[RTE_GRAPH_NAMESIZE ];rte_graph_t graph_id; -} __rte_cache_aligned; +};uint8_t ethdev_rx_num_rx_queues_get (uint16_t port);
app/graph/ethdev_rx_priv.h +2 -2
@@ -14,10 +14,10 @@#define MAX_JUMBO_PKT_LEN 9600#define NB_SOCKETS 8 -struct lcore_params { +struct __rte_cache_aligned lcore_params {uint16_t port_id;uint8_t queue_id;uint8_t lcore_id; -} __rte_cache_aligned; +};#endif
Signature · 1 line
1.8.3.1
PATCH v2 83/83 bus/dpaa: move alignment attribute on types
In reply to Tyler RetzlaffMove location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation.
--- drivers/bus/dpaa/base/qbman/qman.c | 3 +-- drivers/bus/dpaa/include/fsl_bman.h | 4 ++-- drivers/bus/dpaa/include/fsl_qman.h | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 14 deletions(-)
drivers/bus/dpaa/base/qbman/qman.c +1 -2
@@ -95,8 +95,7 @@ struct qman_portal {* to 2 ** 10 to ensure DQRR index calculations based shadow copy * address (6 bits for address shift + 4 bits for the DQRR size). */ - struct qm_dqrr_entry shadow_dqrr[QM_DQRR_SIZE] -__rte_aligned (1024 ); + alignas(1024 )struct qm_dqrr_entry shadow_dqrr[QM_DQRR_SIZE ];#endif };
drivers/bus/dpaa/include/fsl_bman.h +2 -2
@@ -41,7 +41,7 @@ static inline void bman_depletion_fill(struct bman_depletion *c)* pool id specific to this buffer is needed (BM_RCR_VERB_CMD_BPID_MULTI, * BM_MCC_VERB_ACQUIRE), the 'bpid' field is used. */ -struct bm_buffer { +struct __rte_aligned(8) bm_buffer { union { struct { #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
@@ -67,7 +67,7 @@ struct bm_buffer { };u64 opaque; }; -}__rte_aligned (8 ); +};static inline u64 bm_buffer_get64 (const struct bm_buffer *buf) {return buf->addr;
drivers/bus/dpaa/include/fsl_qman.h +10 -10
@@ -124,7 +124,7 @@ enum qm_fd_format {#define QM_FD_COMPOUND QM_FD_FORMAT_COMPOUND/* "Frame Descriptor (FD)" */ -struct qm_fd { +struct __rte_aligned(8) qm_fd { union { struct { #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
@@ -200,7 +200,7 @@ struct qm_fd {u32 cmd;u32 status; }; -}__rte_aligned (8 ); +};#define QM_FD_DD_NULL 0x00#define QM_FD_PID_MASK 0x3fstatic inline u64 qm_fd_addr_get64 (const struct qm_fd *fd)
@@ -330,9 +330,9 @@ struct __rte_aligned(8) qm_dqrr_entry {/* "ERN Message Response" */ /* "FQ State Change Notification" */ -struct qm_mr_entry { +struct __rte_aligned(8) qm_mr_entry { union { - struct { + alignas(8) struct { u8 verb; u8 dca; u16 seqnum;
@@ -341,8 +341,8 @@ struct qm_mr_entry {u32 fqid;/* 24-bit */ u32 tag;struct qm_fd fd;/* this has alignment 8 */ - } __packed __rte_aligned(8) ern; -struct { + }__packed ern; + alignas(8) struct { u8 verb; #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ u8 colour:2; /* See QM_MR_DCERN_COLOUR_* */
@@ -359,18 +359,18 @@ struct qm_mr_entry {u32 fqid;/* 24-bit */ u32 tag;struct qm_fd fd;/* this has alignment 8 */ - } __packed __rte_aligned(8) dcern; -struct { + }__packed dcern; + alignas(8 )struct {u8 verb;u8 fqs;/* Frame Queue Status */ u8 __reserved1[6 ];u32 fqid;/* 24-bit */ u32 contextB;u8 __reserved2[16 ]; - } __packed __rte_aligned(8) fq; /* FQRN/FQRNI/FQRL/FQPN */ + } __packed fq; /* FQRN/FQRNI/FQRL/FQPN */ };u8 __reserved2[32 ]; -} __packed __rte_aligned(8); +} __packed;#define QM_MR_VERB_VBIT 0x80/* * ERNs originating from direct-connect portals ("dcern") use 0x20 as a verb
Signature · 1 line
1.8.3.1
Hello Tyler,
Quoted 294 lines · Tyler Retzlaff
The current location used for
__rte_aligned(a)for alignment of types and variables is not compatible with MSVC. There is only a single location accepted by both toolchains.After having established this as the conventional standard for
lib/*this series is intended to convert the remainder of the source tree to use the same location for__rte_aligned(a)and alignas(a) for consistency.v2:
* examples/ipsec remove alignment of pointers to size of a pointer explicit alignment is unnecessary.Tyler Retzlaff (83):
examples: move alignment attribute on types net/ark: move alignment attribute on types net/avp: move alignment attribute on types net/axgbe: move alignment attribute on types net/bnxt: move alignment attribute on types net/bonding: move alignment attribute on types net/cxgbe: move alignment attribute on types net/e1000: move alignment attribute on types net/ena: move alignment attribute on types net/enic: move alignment attribute on types net/fm10k: move alignment attribute on types net/hinic: move alignment attribute on types net/hns3: move alignment attribute on types net/i40e: move alignment attribute on types net/iavf: move alignment attribute on types net/ice: move alignment attribute on types net/igc: move alignment attribute on types net/ionic: move alignment attribute on types net/ixgbe: move alignment attribute on types net/memif: move alignment attribute on types net/mlx5: move alignment attribute on types net/mlx4: move alignment attribute on types net/mvpp2: move alignment attribute on types net/netvsc: move alignment attribute on types net/nfp: move alignment attribute on types net/ngbe: move alignment attribute on types net/octeontx: move alignment attribute on types net/pfe: move alignment attribute on types net/qede: move alignment attribute on types net/softnic: move alignment attribute on types net/tap: move alignment attribute on types net/thunderx: move alignment attribute on types net/txgbe: move alignment attribute on types net/virtio: move alignment attribute on types vdpa/mlx5: move alignment attribute on types regex/cn9k: move alignment attribute on types raw/ntb: move alignment attribute on types ml/cnxk: move alignment attribute on types mempool/cnxk: move alignment attribute on types event/sw: move alignment attribute on types event/skeleton: move alignment attribute on types event/opdl: move alignment attribute on types event/octeontx: move alignment attribute on types event/dsw: move alignment attribute on types event/dlb2: move alignment attribute on types event/cnxk: move alignment attribute on types dma/skeleton: move alignment attribute on types dma/ioat: move alignment attribute on types dma/idxd: move alignment attribute on typescrypto/uadk: move alignment attribute on typescrypto/scheduler: move alignment attribute on typescrypto/qat: move alignment attribute on typescrypto/openssl: move alignment attribute on typescrypto/octeontx: move alignment attribute on typescrypto/null: move alignment attribute on typescrypto/mvsam: move alignment attribute on typescrypto/mlx5: move alignment attribute on typescrypto/ipsec_mb: move alignment attribute on typescrypto/cnxk: move alignment attribute on typescrypto/ccp: move alignment attribute on typescrypto/caam_jr: move alignment attribute on typescrypto/bcmfs: move alignment attribute on typescrypto/armv8: move alignment attribute on types compress/zlib: move alignment attribute on types compress/qat: move alignment attribute on types compress/octeontx: move alignment attribute on types compress/nitrox: move alignment attribute on types compress/isal: move alignment attribute on types common/qat: move alignment attribute on types common/mlx5: move alignment attribute on types common/idpf: move alignment attribute on types common/cpt: move alignment attribute on types bus/fslmc: move alignment attribute on types baseband/turbo_sw: move alignment attribute on types baseband/null: move alignment attribute on types app/test: move alignment attribute on types app/test-pipeline: move alignment attribute on types app/test-mldev: move alignment attribute on types app/test-flow-perf: move alignment attribute on types app/test-eventdev: move alignment attribute on types app/pdump: move alignment attribute on types app/graph: move alignment attribute on types bus/dpaa: move alignment attribute on typesapp/graph/ethdev_rx.h | 4 +- app/graph/ethdev_rx_priv.h | 4 +- app/pdump/main.c | 4 +- app/test-eventdev/test_order_common.h | 4 +- app/test-eventdev/test_perf_common.h | 24 +++++----- app/test-eventdev/test_pipeline_common.h | 18 ++++---- app/test-flow-perf/actions_gen.c | 51 ++++++++++++---------- app/test-flow-perf/items_gen.c | 22 +++++----- app/test-flow-perf/main.c | 8 ++-- app/test-mldev/test_device_ops.h | 4 +- app/test-mldev/test_inference_common.h | 4 +- app/test-mldev/test_model_ops.h | 4 +- app/test-pipeline/main.h | 4 +- app/test/test_cryptodev_aead_test_vectors.h | 6 +-- app/test/test_cryptodev_blockcipher.h | 2 +- app/test/test_cryptodev_kasumi_test_vectors.h | 2 +- app/test/test_cryptodev_mixed_test_vectors.h | 2 +- .../test_cryptodev_security_docsis_test_vectors.h | 2 +- app/test/test_cryptodev_snow3g_test_vectors.h | 2 +- app/test/test_cryptodev_zuc_test_vectors.h | 2 +- app/test/test_distributor.c | 12 ++--- app/test/test_distributor_perf.c | 6 +-- app/test/test_mempool_perf.c | 6 +-- app/test/test_pmd_perf.c | 4 +- app/test/test_ring_stress_impl.h | 10 ++--- app/test/test_rwlock.c | 8 ++-- app/test/test_seqlock.c | 8 ++-- app/test/test_ticketlock.c | 4 +- app/test/test_trace_perf.c | 8 ++-- drivers/baseband/null/bbdev_null.c | 4 +- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 4 +- drivers/bus/dpaa/base/qbman/qman.c | 3 +- drivers/bus/dpaa/include/fsl_bman.h | 4 +- drivers/bus/dpaa/include/fsl_qman.h | 20 ++++----- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 +- drivers/common/cpt/cpt_common.h | 4 +- drivers/common/idpf/idpf_common_device.h | 2 +- drivers/common/mlx5/linux/mlx5_glue.c | 2 +- drivers/common/mlx5/linux/mlx5_nl.c | 2 +- drivers/common/mlx5/mlx5_common_mr.h | 4 +- drivers/common/mlx5/mlx5_common_utils.h | 12 ++--- drivers/common/mlx5/mlx5_prm.h | 4 +- drivers/common/qat/qat_adf/icp_qat_hw.h | 8 ++-- drivers/common/qat/qat_common.h | 4 +- drivers/common/qat/qat_qp.h | 6 +-- drivers/compress/isal/isal_compress_pmd_private.h | 8 ++-- drivers/compress/nitrox/nitrox_comp_reqmgr.c | 2 +- drivers/compress/octeontx/otx_zip.h | 16 +++---- drivers/compress/qat/qat_comp.h | 4 +- drivers/compress/zlib/zlib_pmd_private.h | 12 ++--- drivers/crypto/armv8/armv8_pmd_private.h | 14 +++--- drivers/crypto/bcmfs/bcmfs_qp.h | 4 +- drivers/crypto/bcmfs/bcmfs_sym_session.h | 4 +- drivers/crypto/caam_jr/caam_jr_desc.h | 8 ++-- drivers/crypto/ccp/ccp_crypto.h | 4 +- drivers/crypto/ccp/ccp_dev.h | 8 ++-- drivers/crypto/ccp/ccp_pmd_private.h | 8 ++-- drivers/crypto/cnxk/cn10k_cryptodev_sec.h | 4 +- drivers/crypto/cnxk/cn10k_ipsec.h | 4 +- drivers/crypto/cnxk/cn10k_tls.h | 4 +- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 2 +- drivers/crypto/cnxk/cn9k_ipsec.h | 8 ++-- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 4 +- drivers/crypto/cnxk/cnxk_se.h | 4 +- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 4 +- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 24 +++++----- drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h | 4 +- drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 4 +- drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 4 +- drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 4 +- drivers/crypto/mlx5/mlx5_crypto.h | 4 +- drivers/crypto/mvsam/mrvl_pmd_private.h | 12 ++--- drivers/crypto/mvsam/rte_mrvl_pmd.c | 12 +++-- drivers/crypto/null/null_crypto_pmd_private.h | 8 ++-- drivers/crypto/octeontx/otx_cryptodev_hw_access.h | 4 +- drivers/crypto/openssl/openssl_pmd_private.h | 12 ++--- drivers/crypto/qat/qat_asym.h | 15 +++---- drivers/crypto/qat/qat_sym.h | 8 ++-- drivers/crypto/qat/qat_sym_session.h | 10 ++--- .../crypto/scheduler/scheduler_pkt_size_distr.c | 4 +- drivers/crypto/scheduler/scheduler_pmd_private.h | 8 ++-- drivers/crypto/uadk/uadk_crypto_pmd_private.h | 12 ++--- drivers/dma/idxd/idxd_hw_defs.h | 38 ++++++++-------- drivers/dma/ioat/ioat_internal.h | 4 +- drivers/dma/skeleton/skeleton_dmadev.h | 4 +- drivers/event/cnxk/cn10k_eventdev.h | 8 ++-- drivers/event/cnxk/cnxk_eventdev.h | 24 +++++----- drivers/event/cnxk/cnxk_tim_evdev.h | 4 +- drivers/event/cnxk/cnxk_tim_worker.c | 2 +- drivers/event/dlb2/dlb2_priv.h | 16 +++---- drivers/event/dsw/dsw_evdev.h | 20 ++++----- drivers/event/octeontx/ssovf_evdev.h | 8 ++-- drivers/event/octeontx/timvf_evdev.h | 8 ++-- drivers/event/octeontx/timvf_worker.c | 2 +- drivers/event/opdl/opdl_evdev.h | 6 +-- drivers/event/opdl/opdl_ring.c | 19 ++++---- drivers/event/skeleton/skeleton_eventdev.h | 8 ++-- drivers/event/sw/event_ring.h | 2 +- drivers/event/sw/iq_chunk.h | 4 +- drivers/event/sw/sw_evdev.h | 18 ++++---- drivers/mempool/cnxk/cn10k_mempool_ops.c | 4 +- drivers/ml/cnxk/cnxk_ml_ops.h | 4 +- drivers/net/ark/ark_ethdev_rx.c | 6 +-- drivers/net/ark/ark_ethdev_tx.c | 6 +-- drivers/net/avp/avp_ethdev.c | 8 ++-- drivers/net/avp/rte_avp_common.h | 4 +- drivers/net/axgbe/axgbe_rxtx.h | 8 ++-- drivers/net/bnxt/bnxt_rxr.c | 2 +- drivers/net/bonding/rte_eth_bond_8023ad.h | 28 ++++++------ drivers/net/cxgbe/base/adapter.h | 14 +++--- drivers/net/cxgbe/cxgbe_ofld.h | 2 +- drivers/net/e1000/igb_rxtx.c | 4 +- drivers/net/ena/ena_ethdev.h | 17 ++++---- drivers/net/enic/enic_rxtx_common.h | 2 +- drivers/net/fm10k/fm10k_rxtx.c | 5 +-- drivers/net/hinic/hinic_pmd_rx.h | 8 ++-- drivers/net/hns3/hns3_ethdev.h | 4 +- drivers/net/hns3/hns3_fdir.c | 4 +- drivers/net/hns3/hns3_rxtx.h | 4 +- drivers/net/i40e/i40e_ethdev.h | 4 +- drivers/net/i40e/i40e_rxtx.h | 2 +- drivers/net/iavf/iavf.h | 2 +- drivers/net/iavf/iavf_rxtx.c | 3 +- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_rxtx.c | 3 +- drivers/net/igc/igc_txrx.c | 4 +- drivers/net/ionic/ionic_lif.h | 2 +- drivers/net/ionic/ionic_rxtx.c | 6 +-- drivers/net/ixgbe/ixgbe_ipsec.h | 4 +- drivers/net/ixgbe/ixgbe_rxtx.c | 10 ++--- drivers/net/memif/memif.h | 2 +- drivers/net/mlx4/mlx4_rxtx.c | 2 +- drivers/net/mlx5/hws/mlx5dr_send.h | 4 +- drivers/net/mlx5/mlx5.h | 6 +-- drivers/net/mlx5/mlx5_flow.h | 4 +- drivers/net/mlx5/mlx5_hws_cnt.h | 14 +++--- drivers/net/mlx5/mlx5_rx.h | 4 +- drivers/net/mlx5/mlx5_rxtx.c | 6 +-- drivers/net/mlx5/mlx5_tx.h | 10 ++--- drivers/net/mlx5/mlx5_utils.h | 2 +- drivers/net/mvpp2/mrvl_ethdev.h | 4 +- drivers/net/netvsc/hn_var.h | 4 +- drivers/net/nfp/flower/nfp_flower_flow.c | 4 +- drivers/net/nfp/nfp_ipsec.h | 4 +- drivers/net/nfp/nfp_rxtx.h | 8 ++-- drivers/net/ngbe/ngbe_ptypes.c | 2 +- drivers/net/ngbe/ngbe_rxtx.c | 2 +- drivers/net/octeontx/octeontx_ethdev.c | 4 +- drivers/net/octeontx/octeontx_ethdev.h | 12 ++--- drivers/net/octeontx/octeontx_rxtx.h | 2 +- drivers/net/pfe/base/pfe.h | 4 +- drivers/net/qede/qede_rxtx.c | 14 +++--- drivers/net/softnic/rte_eth_softnic_internals.h | 4 +- drivers/net/tap/tap_bpf.h | 4 +- drivers/net/thunderx/nicvf_rxtx.c | 8 ++-- drivers/net/thunderx/nicvf_struct.h | 16 +++---- drivers/net/txgbe/txgbe_ipsec.h | 4 +- drivers/net/txgbe/txgbe_ptypes.c | 10 ++--- drivers/net/txgbe/txgbe_rxtx.c | 2 +- drivers/net/virtio/virtqueue.h | 4 +- drivers/raw/ntb/ntb.h | 6 +-- drivers/regex/cn9k/cn9k_regexdev.h | 4 +- drivers/vdpa/mlx5/mlx5_vdpa.h | 4 +- examples/bbdev_app/main.c | 8 ++-- examples/bond/main.c | 2 +- examples/distributor/main.c | 32 +++++++------- examples/eventdev_pipeline/pipeline_common.h | 8 ++-- examples/ip_fragmentation/main.c | 4 +- examples/ip_pipeline/thread.c | 4 +- examples/ip_reassembly/main.c | 4 +- examples/ipsec-secgw/ipsec-secgw.c | 4 +- examples/ipsec-secgw/ipsec-secgw.h | 8 ++-- examples/ipsec-secgw/ipsec.h | 22 +++++----- examples/ipsec-secgw/ipsec_worker.h | 4 +- examples/ipv4_multicast/main.c | 4 +- examples/l2fwd-crypto/main.c | 12 ++--- examples/l2fwd-event/l2fwd_common.h | 8 ++-- examples/l2fwd-event/l2fwd_poll.h | 4 +- examples/l2fwd-jobstats/main.c | 8 ++-- examples/l2fwd-keepalive/main.c | 8 ++-- examples/l2fwd-macsec/main.c | 12 ++--- examples/l2fwd/main.c | 12 ++--- examples/l3fwd-graph/main.c | 8 ++-- examples/l3fwd-power/main.c | 24 +++++----- examples/l3fwd-power/main.h | 4 +- examples/l3fwd-power/perf_core.c | 4 +- examples/l3fwd/l3fwd.h | 8 ++-- examples/l3fwd/l3fwd_em.c | 4 +- examples/l3fwd/main.c | 4 +- examples/link_status_interrupt/main.c | 8 ++-- .../multi_process/client_server_mp/shared/common.h | 8 ++-- examples/multi_process/symmetric_mp/main.c | 4 +- examples/ntb/ntb_fwd.c | 4 +- examples/packet_ordering/main.c | 16 +++---- examples/pipeline/thread.c | 4 +-
Quoted 8 lines
examples/qos_sched/app_thread.c | 2 +- examples/qos_sched/main.h | 4 +- examples/server_node_efd/shared/common.h | 12 ++--- examples/vhost/main.h | 4 +- examples/vhost_blk/vhost_blk.h | 4 +- examples/vhost_crypto/main.c | 4 +- examples/vm_power_manager/power_manager.c | 4 +- 202 files changed, 726 insertions(+), 732 deletions(-)
v1 looked good.
CI is happy on v2.
No one objected.
Let's merge this work early before too many patches are merged in subtrees.
Series applied, thanks.
Signature · 1 line
David Marchand