summaryrefslogtreecommitdiff
path: root/drivers/mempool
diff options
context:
space:
mode:
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>2018-01-18 19:14:33 +0530
committerThomas Monjalon <thomas@monjalon.net>2018-01-19 00:43:56 +0100
commit9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb (patch)
treec7d8855451b55a80631dd24adbcb9ed76bfee154 /drivers/mempool
parent83a4f267f2e39fd2283944208c2f568597c93dd8 (diff)
downloaddpdk-9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb.zip
dpdk-9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb.tar.gz
dpdk-9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb.tar.xz
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 <pbhagavatula@caviumnetworks.com> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Diffstat (limited to 'drivers/mempool')
-rw-r--r--drivers/mempool/octeontx/octeontx_mbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c
index 28d8c8b..f8cb6a4 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;