From 9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Thu, 18 Jan 2018 19:14:33 +0530 Subject: [PATCH] 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 --- drivers/mempool/octeontx/octeontx_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1