patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Rasesh Mody <rmody@marvell.com>, Gavin Hu <gavin.hu@arm.com>
Cc: dpdk-dev <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
	 Ferruh Yigit <ferruh.yigit@intel.com>,
	 GR-Everest-DPDK-Dev <GR-Everest-DPDK-Dev@marvell.com>,
	dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 1/3] net/bnx2x: fix to use required mem barriers in Rx path
Date: Tue, 14 Jan 2020 19:19:03 +0530
Message-ID: <CALBAE1OhLgx_4iO0g8v1bVimRpRzw9AWButE0iuoV3rL=SR56Q@mail.gmail.com> (raw)
In-Reply-To: <20200114003920.17705-1-rmody@marvell.com>

+ Gavin

On Tue, Jan 14, 2020 at 6:09 AM Rasesh Mody <rmody@marvell.com> wrote:
>
> When handling RX completion queue PMD is not using required read/write
> barriers before reading completion queue element (CQE) indices,
> updating/writing hardware consumer and producer.
> This patch adds appropriate read/write memory barriers in places which
> are required by driver and adapter to read or update indices.
>
> Fixes: 540a211084a7 ("bnx2x: driver core")
> Cc: stable@dpdk.org
>
> Signed-off-by: Rasesh Mody <rmody@marvell.com>
> ---
>  drivers/net/bnx2x/bnx2x.c      |  5 +++++
>  drivers/net/bnx2x/bnx2x_rxtx.c | 22 ++++++++++++++++++++++
>  2 files changed, 27 insertions(+)
>
> diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
> index ed31335ac..9c5e7995d 100644
> --- a/drivers/net/bnx2x/bnx2x.c
> +++ b/drivers/net/bnx2x/bnx2x.c
> @@ -1255,6 +1255,11 @@ static uint8_t bnx2x_rxeof(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp)
>                 return 0;
>         }
>
> +       /* Add memory barrier as status block fields can change. This memory
> +        * barrier will flush out all the read/write operations to status block
> +        * generated before the barrier. It will ensure stale data is not read
> +        */
> +       mb();

# Do you need full barriers here?
# Which architecture did you saw this issue?
# rte_cio_* barriers are performance Friday, Have you checked
rte_cio_* would suffice the requirements.
See the discussion in  http://patches.dpdk.org/patch/64038/

I assume 2/3 and 3/3 patches are for the slow path. if so, it is fine
to use full barriers on those patches.

  parent reply	other threads:[~2020-01-14 13:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  0:39 [dpdk-stable] " Rasesh Mody
2020-01-14  0:39 ` [dpdk-stable] [PATCH 2/3] net/bnx2x: fix reset of scan FP flag Rasesh Mody
2020-01-14  0:39 ` [dpdk-stable] [PATCH 3/3] net/bnx2x: fix to sync fastpath Rx queue access Rasesh Mody
2020-01-14 13:49 ` Jerin Jacob [this message]
2020-01-15  1:57   ` [dpdk-stable] [EXT] Re: [dpdk-dev] [PATCH 1/3] net/bnx2x: fix to use required mem barriers in Rx path Rasesh Mody
2020-01-26 22:55     ` Rasesh Mody
2020-01-26 22:54 ` [dpdk-stable] [PATCH v2 1/2] net/bnx2x: fix reset of scan FP flag Rasesh Mody
2020-01-28  9:59   ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2020-01-26 22:54 ` [dpdk-stable] [PATCH v2 2/2] net/bnx2x: fix to sync fastpath Rx queue access Rasesh Mody

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='CALBAE1OhLgx_4iO0g8v1bVimRpRzw9AWButE0iuoV3rL=SR56Q@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=GR-Everest-DPDK-Dev@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gavin.hu@arm.com \
    --cc=jerinj@marvell.com \
    --cc=rmody@marvell.com \
    --cc=stable@dpdk.org \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git