patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Gavin Hu <gavin.hu@arm.com>
Cc: dev@dpdk.org, nd@arm.com, Thomas Monjalon <thomas@monjalon.net>,
	 Bruce Richardson <bruce.richardson@intel.com>,
	yong.liu@intel.com, yinan.wang@intel.com,
	 Somnath Kotur <somnath.kotur@broadcom.com>,
	Honnappa.Nagarahalli@arm.com,  ruifeng.wang@arm.com,
	steve.capper@arm.com, dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v2 5/5] net/bnxt: enforce io barrier for doorbell command
Date: Mon, 16 Sep 2019 18:55:45 -0700	[thread overview]
Message-ID: <CACZ4nhtXd7kdJOap=todkAbCGf8gDHNb821HyDgkVVe8oxZsdA@mail.gmail.com> (raw)
In-Reply-To: <1568633238-47888-6-git-send-email-gavin.hu@arm.com>

On Mon, Sep 16, 2019 at 4:27 AM Gavin Hu <gavin.hu@arm.com> wrote:

> The doorbell ringing operation requires a rte_io_mb immediately to make
> the command complete and visible to the device before reading the
> response, otherwise it may read stale or invalid responses.
>
> Fixes: ca241d9a0952 ("net/bnxt: use I/O device memory read/write API")
> Cc: stable@dpdk.org
>
> Signed-off-by: Gavin Hu <gavin.hu@arm.com>
>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>


> ---
>  drivers/net/bnxt/bnxt_hwrm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index 2d5dc00..7d192e3 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -134,6 +134,12 @@ static int bnxt_hwrm_send_message(struct bnxt *bp,
> void *msg,
>         /* Ring channel doorbell */
>         bar = (uint8_t *)bp->bar0 + mb_trigger_offset;
>         rte_write32(1, bar);
> +       /*
> +        * Make sure the channel doorbell ring command complete before
> +        * reading the response to avoid getting stale or invalid
> +        * responses.
> +        */
> +       rte_io_mb();
>
>         /* Poll for the valid bit */
>         for (i = 0; i < HWRM_CMD_TIMEOUT; i++) {
> --
> 2.7.4
>
>

      reply	other threads:[~2019-09-17  1:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1568633238-47888-1-git-send-email-gavin.hu@arm.com>
2019-09-06  6:37 ` [dpdk-stable] [PATCH] net/bnxt: fix memory barriers Gavin Hu
2019-09-16 11:27   ` [dpdk-stable] [PATCH v2 3/5] net/bnxt: remove duplicate barrier Gavin Hu
2019-09-17  1:55     ` Ajit Khaparde
2019-09-16 11:27   ` [dpdk-stable] [PATCH v2 4/5] net/bnxt: replace with cio barrier for doorbell resp Gavin Hu
2019-09-17  1:56     ` Ajit Khaparde
2019-09-16 11:27   ` [dpdk-stable] [PATCH v2 5/5] net/bnxt: enforce io barrier for doorbell command Gavin Hu
2019-09-17  1:55     ` Ajit Khaparde [this message]

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='CACZ4nhtXd7kdJOap=todkAbCGf8gDHNb821HyDgkVVe8oxZsdA@mail.gmail.com' \
    --to=ajit.khaparde@broadcom.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.org \
    --cc=steve.capper@arm.com \
    --cc=thomas@monjalon.net \
    --cc=yinan.wang@intel.com \
    --cc=yong.liu@intel.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).