[dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox memory accesses
Jerin Jacob Kollanukkaran
jerinj at marvell.com
Fri Aug 2 05:51:10 CEST 2019
> -----Original Message-----
> From: vattunuru at marvell.com <vattunuru at marvell.com>
> Sent: Thursday, August 1, 2019 11:59 PM
> To: dev at dpdk.org
> Cc: thomas at monjalon.net; Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> Vamsi Krishna Attunuru <vattunuru at marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram at marvell.com>
> Subject: [dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox
> memory accesses
>
> From: Vamsi Attunuru <vattunuru at marvell.com>
>
> 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 <vattunuru at marvell.com>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram at marvell.com>
> ---
> 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.
More information about the dev
mailing list