patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajitkhaparde@gmail.com>
To: Lance Richardson <lance.richardson@broadcom.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	dev@dpdk.org,  ferruh.yigit@intel.com, stable@dpdk.org
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] net/bnxt: fix doorbell write ordering
Date: Thu, 17 Dec 2020 15:55:42 -0800
Message-ID: <CAD6mc5YPkwS-mnTzWVsyTNPgh17h7YnF8=nsnsJGYXJSsL=1sA@mail.gmail.com> (raw)
In-Reply-To: <20201214185638.252662-1-lance.richardson@broadcom.com>

On Mon, Dec 14, 2020 at 10:56 AM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Write completion queue doorbell before receive descriptor
> doorbell to avoid possibility of completion queue overflow
> when completion queue size is equal to receive descriptor
> ring size. Remove unnecessary compiler barriers (db write
> functions have the necessary barriers.)
>
> Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing")
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Cc: stable@dpdk.org

Patch applied to dpdk-next-net-brcm.

> ---
> v2 - Fixed typo in commit log.
>
>  drivers/net/bnxt/bnxt_rxr.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index e2d388e69f..ffdeeecc3a 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -917,17 +917,17 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
>                 goto done;
>         }
>
> -       rte_compiler_barrier();
> +       /* Ring the completion queue doorbell. */
> +       bnxt_db_cq(cpr);
> +
> +       /* Ring the receive descriptor doorbell. */
>         if (rx_raw_prod != rxr->rx_raw_prod)
>                 bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod);
>
> -       rte_compiler_barrier();
>         /* Ring the AGG ring DB */
>         if (ag_raw_prod != rxr->ag_raw_prod)
>                 bnxt_db_write(&rxr->ag_db, rxr->ag_raw_prod);
>
> -       bnxt_db_cq(cpr);
> -
>         /* Attempt to alloc Rx buf in case of a previous allocation failure. */
>         if (rc == -ENOMEM) {
>                 int i = RING_NEXT(rx_raw_prod);
> --
> 2.25.1
>
>
> --
> This electronic communication and the information and any files transmitted
> with it, or attached to it, are confidential and are intended solely for
> the use of the individual or entity to whom it is addressed and may contain
> information that is confidential, legally privileged, protected by privacy
> laws, or otherwise restricted from disclosure to anyone else. If you are
> not the intended recipient or the person responsible for delivering the
> e-mail to the intended recipient, you are hereby notified that any use,
> copying, distributing, dissemination, forwarding, printing, or copying of
> this e-mail is strictly prohibited. If you received this e-mail in error,
> please return the e-mail to the sender, delete it from your computer, and
> destroy any printed copy of it.



-- 
Ajit Khaparde

      reply	other threads:[~2020-12-17 23:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 18:56 [dpdk-stable] " Lance Richardson
2020-12-17 23: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='CAD6mc5YPkwS-mnTzWVsyTNPgh17h7YnF8=nsnsJGYXJSsL=1sA@mail.gmail.com' \
    --to=ajitkhaparde@gmail.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lance.richardson@broadcom.com \
    --cc=somnath.kotur@broadcom.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