DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Somnath Kotur <somnath.kotur@broadcom.com>
Cc: dpdk-dev <dev@dpdk.org>, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix regression in non-vector mode Rx data path on Thor
Date: Thu, 4 Nov 2021 18:01:07 -0700	[thread overview]
Message-ID: <CACZ4nhufyQ4U4Pj1u5mfdg-XJ5jzi1M16HSR=08nuPXYaNa9KA@mail.gmail.com> (raw)
In-Reply-To: <20211103160432.8052-1-somnath.kotur@broadcom.com>

On Wed, Nov 3, 2021 at 9:10 AM Somnath Kotur <somnath.kotur@broadcom.com> wrote:
>
> The patch introduced by
> commit 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed")
> ended up shortening the return code path from the function thereby
> resulting in not executing the line of code at the end of the function
> that was resetting the next consumer index to 0.
> This would result in an application crash when error recovery or other
> port stop/start scenarios were invoked on Thor which is what this
> commit 61cd4384fabf ("net/bnxt: fix crash after port stop/start")
> was addressing.
> Fix it by moving the resetting line of code before the return path
> in the case when aggregration rings are not used (default case).
>
> Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed")
>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Fixed typo in commit log.
Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_rxr.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index 992f97388c..8bc8ddc353 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -1369,6 +1369,9 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
>                 rxr->rx_buf_ring[i] = &rxq->fake_mbuf;
>         }
>
> +       /* Explicitly reset this driver internal tracker on a ring init */
> +       rxr->rx_next_cons = 0;
> +
>         if (!bnxt_need_agg_ring(rxq->bp->eth_dev))
>                 return 0;
>
> @@ -1407,9 +1410,6 @@ int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq)
>         }
>         PMD_DRV_LOG(DEBUG, "TPA alloc Done!\n");
>
> -       /* Explicitly reset this driver internal tracker on a ring init */
> -       rxr->rx_next_cons = 0;
> -
>         return 0;
>  }
>
> --
> 2.28.0.497.g54e85e7
>

      reply	other threads:[~2021-11-05  1:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 16:04 Somnath Kotur
2021-11-05  1:01 ` 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='CACZ4nhufyQ4U4Pj1u5mfdg-XJ5jzi1M16HSR=08nuPXYaNa9KA@mail.gmail.com' \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=somnath.kotur@broadcom.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).