DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
To: Vamsi Krishna Attunuru <vattunuru@marvell.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	Vamsi Krishna Attunuru <vattunuru@marvell.com>,
	Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>
Subject: Re: [dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox memory accesses
Date: Fri, 2 Aug 2019 03:51:10 +0000	[thread overview]
Message-ID: <BYAPR18MB2424E2B0B43CDECBA85083B8C8D90@BYAPR18MB2424.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20190801182928.26216-1-vattunuru@marvell.com>

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



  reply	other threads:[~2019-08-02  3:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 18:29 vattunuru
2019-08-02  3:51 ` Jerin Jacob Kollanukkaran [this message]
2019-08-02  4:20 ` [dpdk-dev] [dpdk-devPATCH v2 " vattunuru
2019-08-02  5:57   ` Jerin Jacob Kollanukkaran
2019-08-02  6:57   ` [dpdk-dev] [PATCH v3 " vattunuru
2019-08-02  9:55     ` Jerin Jacob Kollanukkaran
2019-08-05 21:22       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR18MB2424E2B0B43CDECBA85083B8C8D90@BYAPR18MB2424.namprd18.prod.outlook.com \
    --to=jerinj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ndabilpuram@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=vattunuru@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).