From: Pavan Nikhilesh Date: Thu, 18 Jan 2018 13:44:33 +0000 (+0530) Subject: mempool/octeontx: fix natural alignment being optimized out X-Git-Tag: spdx-start~227 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb;p=dpdk.git mempool/octeontx: fix natural alignment being optimized out The mbox messages are naturally aligned and in some cases compiler optimization might disregard natural alignment. Use volatile key word to force compiler to disable optimizing and maintain alignment. Fixes: aecb8e093b52 ("event/octeontx: introduce specialized mbox message copy") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Santosh Shukla --- diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c index 28d8c8bb0c..f8cb6a4537 100644 --- a/drivers/mempool/octeontx/octeontx_mbox.c +++ b/drivers/mempool/octeontx/octeontx_mbox.c @@ -61,7 +61,7 @@ struct mbox_ram_hdr { }; static inline void -mbox_msgcpy(uint8_t *d, const uint8_t *s, uint16_t size) +mbox_msgcpy(volatile uint8_t *d, volatile const uint8_t *s, uint16_t size) { uint16_t i;