> -----Original Message-----
> From: [email protected] <[email protected]>
> Sent: Thursday, August 1, 2019 11:59 PM
> To: [email protected]
> Cc: [email protected]; Jerin Jacob Kollanukkaran <[email protected]>;
> Vamsi Krishna Attunuru <[email protected]>; Nithin Kumar
> Dabilpuram <[email protected]>
> Subject: [dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox
> memory accesses
> 
> From: Vamsi Attunuru <[email protected]>
> 
> Octeontx2 PMD's mailbox client uses HW memory to send messages to

Change "HW memory" to "device memory" to align with ARM nomenclature

> mailbox server in the admin function Linux kernel driver.
> The device memory used for the mailbox communication needs to be
> qualified as volatile memory type to avoid unaligned device memory
> accesses because of compiler's memory access coalescing.
> 
> This patch modifies the mailbox request and responses as volatile type which
> were non-volatile earlier and accessed from unaligned memory addresses.
> 
> Fixes: 2b71657c8660 ("common/octeontx2: add mbox request and response
> ")
> 
> Signed-off-by: Vamsi Attunuru <[email protected]>
> Signed-off-by: Nithin Dabilpuram <[email protected]>
> ---
>  drivers/common/octeontx2/otx2_mbox.h           | 12 ++++++------
>  drivers/mempool/octeontx2/otx2_mempool_debug.c |  4 ++--
>  drivers/mempool/octeontx2/otx2_mempool_ops.c   |  6 +++---
>  drivers/net/octeontx2/otx2_ethdev_debug.c      |  6 +++---
>  4 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/common/octeontx2/otx2_mbox.h
> b/drivers/common/octeontx2/otx2_mbox.h
> index b2c59c8..ceec406 100644
> --- a/drivers/common/octeontx2/otx2_mbox.h
> +++ b/drivers/common/octeontx2/otx2_mbox.h
> @@ -547,7 +547,7 @@ struct npa_aq_enq_req {
>       uint32_t __otx2_io aura_id;
>       uint8_t __otx2_io ctype;
>       uint8_t __otx2_io op;
> -     union {
> +     __otx2_io union {
>               /* Valid when op == WRITE/INIT and ctype == AURA.
>                * LF fills the pool_id in aura.pool_addr. AF will translate
>                * the pool_id to pool context pointer.
> @@ -557,7 +557,7 @@ struct npa_aq_enq_req {
>               struct npa_pool_s pool;

Please move __otx2_io to individual members to align with other mbox elements.


Reply via email to