[dpdk-stable] [dpdk-dev] [PATCH] mempool/octeontx: fix natural	alignment being optimized out
    Pavan Nikhilesh 
    pbhagavatula at caviumnetworks.com
       
    Thu Jan 18 14:44:33 CET 2018
    
    
  
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 at dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
---
 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 640a58d3d..c89f4f513 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.15.1
    
    
More information about the stable
mailing list