patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dpdk-dev <dev@dpdk.org>
Cc: dpdk stable <stable@dpdk.org>, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-stable] [PATCH] net/bnxt: fix mem zone free for Tx and Rx rings
Date: Sun, 26 Sep 2021 14:18:18 -0700	[thread overview]
Message-ID: <CACZ4nhvLW4tMQG4u-_A2BCY1DrRzYyxYYbutz11W5ch9ywOG4Q@mail.gmail.com> (raw)
In-Reply-To: <20210925005702.50971-1-ajit.khaparde@broadcom.com>

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

On Fri, Sep 24, 2021 at 5:57 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> The device cleanup logic was freeing most of the ring related memory,
> but was not freeing up the mem zone associated with the rings.
> This patch fixes the issue.
>
> Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
> Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
> Cc: stable@dpdk.org
>
> Signed-off-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_rxr.c | 3 +++
>  drivers/net/bnxt/bnxt_txr.c | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index a40fa50138..4c1ee4294e 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -1207,6 +1207,9 @@ void bnxt_free_rx_rings(struct bnxt *bp)
>                 rte_free(rxq->cp_ring->cp_ring_struct);
>                 rte_free(rxq->cp_ring);
>
> +               rte_memzone_free(rxq->mz);
> +               rxq->mz = NULL;
> +
>                 rte_free(rxq);
>                 bp->rx_queues[i] = NULL;
>         }
> diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
> index 47824334ae..9e45ddd7a8 100644
> --- a/drivers/net/bnxt/bnxt_txr.c
> +++ b/drivers/net/bnxt/bnxt_txr.c
> @@ -38,6 +38,9 @@ void bnxt_free_tx_rings(struct bnxt *bp)
>                 rte_free(txq->cp_ring->cp_ring_struct);
>                 rte_free(txq->cp_ring);
>
> +               rte_memzone_free(txq->mz);
> +               txq->mz = NULL;
> +
>                 rte_free(txq);
>                 bp->tx_queues[i] = NULL;
>         }
> --
> 2.30.1 (Apple Git-130)
>

      reply	other threads:[~2021-09-26 21:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25  0:57 Ajit Khaparde
2021-09-26 21:18 ` 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=CACZ4nhvLW4tMQG4u-_A2BCY1DrRzYyxYYbutz11W5ch9ywOG4Q@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.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
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).