DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
Cc: dpdk-dev <dev@dpdk.org>, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix ring group free
Date: Wed, 1 Sep 2021 17:38:54 -0700	[thread overview]
Message-ID: <CACZ4nhvU+qN0AgrS6Ty2h6JfkEo4bDj2Dzc7AWivApKdZDQ1fg@mail.gmail.com> (raw)
In-Reply-To: <20210830035811.24206-1-kalesh-anakkur.purayil@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

On Sun, Aug 29, 2021 at 8:37 PM Kalesh A P
<kalesh-anakkur.purayil@broadcom.com> wrote:
>
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>
> Added an invalid fw_grp_id check inside bnxt_hwrm_ring_grp_free().
> This will prevent invalid fw_grp_id to be passed to the FW which can
> result in an error.
> This fixes the following failure in the "port stop" -> "port start"
> sequence:
>
> bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204
> bnxt_hwrm_ring_grp_free(): error 2:0:00000000:0204
>
> Fixes: 5803d86b87df ("net/bnxt: update ring group after ring stop start")
> Cc: stable@dpdk.org
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_hwrm.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index f29d574..d092fdc 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -1888,6 +1888,9 @@ int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx)
>         struct hwrm_ring_grp_free_input req = {.req_type = 0 };
>         struct hwrm_ring_grp_free_output *resp = bp->hwrm_cmd_resp_addr;
>
> +       if (bp->grp_info[idx].fw_grp_id == INVALID_HW_RING_ID)
> +               return 0;
> +
>         HWRM_PREP(&req, HWRM_RING_GRP_FREE, BNXT_USE_CHIMP_MB);
>
>         req.ring_group_id = rte_cpu_to_le_16(bp->grp_info[idx].fw_grp_id);
> --
> 2.10.1
>

      reply	other threads:[~2021-09-02  0:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30  3:58 Kalesh A P
2021-09-02  0:38 ` 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=CACZ4nhvU+qN0AgrS6Ty2h6JfkEo4bDj2Dzc7AWivApKdZDQ1fg@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=kalesh-anakkur.purayil@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).