[PATCH v2 66/83] compress/octeontx: move alignment attribute on types
Tyler Retzlaff
roretzla at linux.microsoft.com
Mon Apr 15 22:04:28 CEST 2024
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 <roretzla at linux.microsoft.com>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
drivers/compress/octeontx/otx_zip.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h
index 7391360..bb19854 100644
--- a/drivers/compress/octeontx/otx_zip.h
+++ b/drivers/compress/octeontx/otx_zip.h
@@ -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
--
1.8.3.1
More information about the dev
mailing list