[v9,09/30] drivers/compress: replace packed attributes
Checks
Commit Message
MSVC struct packing is not compatible with GCC. Replace macro
__rte_packed with __rte_packed_begin to push existing pack value
and set packing to 1-byte and macro __rte_packed_end to restore
the pack value prior to the push.
Macro __rte_packed_end is deliberately utilized to trigger a
MSVC compiler warning if no existing packing has been pushed allowing
easy identification of locations where the __rte_packed_begin is
missing.
Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
drivers/compress/qat/qat_comp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -50,10 +50,10 @@ struct array_of_ptrs {
phys_addr_t pointer[0];
};
-struct __rte_cache_aligned qat_inter_sgl {
+struct __rte_cache_aligned __rte_packed_begin qat_inter_sgl {
qat_sgl_hdr;
struct qat_flat_buf buffers[QAT_NUM_BUFS_IN_IM_SGL];
-} __rte_packed;
+} __rte_packed_end;
struct qat_comp_op_cookie {