patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] mempool/octeontx: fix natural alignment being optimized out
@ 2018-01-18 13:44 Pavan Nikhilesh
  2018-01-18 16:54 ` santosh
  0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh @ 2018-01-18 13:44 UTC (permalink / raw)
  To: jerin.jacob, santosh.shukla; +Cc: dev, Pavan Nikhilesh, stable

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>
---
 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] mempool/octeontx: fix natural alignment being optimized out
  2018-01-18 13:44 [dpdk-stable] [dpdk-dev] [PATCH] mempool/octeontx: fix natural alignment being optimized out Pavan Nikhilesh
@ 2018-01-18 16:54 ` santosh
  2018-01-18 23:33   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: santosh @ 2018-01-18 16:54 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob; +Cc: dev, stable


On Thursday 18 January 2018 07:14 PM, Pavan Nikhilesh wrote:
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] mempool/octeontx: fix natural alignment being optimized out
  2018-01-18 16:54 ` santosh
@ 2018-01-18 23:33   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-01-18 23:33 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: stable, santosh, jerin.jacob, dev

18/01/2018 17:54, santosh:
> On Thursday 18 January 2018 07:14 PM, Pavan Nikhilesh wrote:
> > 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>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-18 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 13:44 [dpdk-stable] [dpdk-dev] [PATCH] mempool/octeontx: fix natural alignment being optimized out Pavan Nikhilesh
2018-01-18 16:54 ` santosh
2018-01-18 23:33   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).