From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26CBBA0547; Sun, 26 Sep 2021 23:18:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1540C40E78; Sun, 26 Sep 2021 23:18:37 +0200 (CEST) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by mails.dpdk.org (Postfix) with ESMTP id 29C2640E46 for ; Sun, 26 Sep 2021 23:18:35 +0200 (CEST) Received: by mail-io1-f53.google.com with SMTP id p80so20153644iod.10 for ; Sun, 26 Sep 2021 14:18:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tK/jqgWYI3F3nKHDqXqZqv2psHZinWZkojIYiv+R6jM=; b=WzGDQtoQ4zVUsm0y/xN/frXsyG2qLIw0x8wzBnQjFLE8IKbBMUfGbWSfX35CYq4QDh 5BBy1H1AJhlK64jz3R0L0CzT/b4+0nNzp4QVpE3ana/jh/sEUEhuy11kGZbq04IAR6Uq lMF0Oa4peFKoiphZE3QAH4NKsOehamnWPQgkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tK/jqgWYI3F3nKHDqXqZqv2psHZinWZkojIYiv+R6jM=; b=1ANkx1WZ5kU4rlO6tFzfiaXM6/YMCh9L2aH+gCSzUBaBIV+bp/o7hcrv9e+4z5HOPx /q5DGkEyffa6nhiovMzsP+4ZzvCsSWJg9qeS+xlMoGjeksiA8jZmLM+ABzv5Payf+gbH 4n3zTz4/0YUDW5vX7NX4W1iPWgT94bKVVp7JSVRs+VZh3dzrJ4wyDxoUZYCD/seI28FJ MB+r69rUO8/7xgksO54linZM1dsUn0VzK31B0I77Hng8O0GyK4ivbWpHnuVb2J0T8JZe 5ek4ZiKeQvSf/aHwhgSx9DhqBKNrRim9TWfK6ZgItfUK0/IXpQ5hkPbioavKkgL/7HEh +K4A== X-Gm-Message-State: AOAM533iH24rlKVCJ4+fAQ2Re+JytUXM9yF2k35b9u39z+s/VYaQ6Wj1 idjxZc6+rT3MX83+d/E9UXWEhLptL+wmLHXaB/nnIR04T0s= X-Google-Smtp-Source: ABdhPJyG0qRFS8ZB2nmmgdNd6kisDAtHmNNH9XfwwAkAzxpp09Azhh0C2oN1b56+8H7x+FKx7TybCYyexQHk2qMOPLU= X-Received: by 2002:a6b:ec03:: with SMTP id c3mr18158656ioh.179.1632691114349; Sun, 26 Sep 2021 14:18:34 -0700 (PDT) MIME-Version: 1.0 References: <20210925005702.50971-1-ajit.khaparde@broadcom.com> In-Reply-To: <20210925005702.50971-1-ajit.khaparde@broadcom.com> From: Ajit Khaparde Date: Sun, 26 Sep 2021 14:18:18 -0700 Message-ID: To: dpdk-dev Cc: dpdk stable , Ferruh Yigit Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000ea7a9a05ccec8542" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix mem zone free for Tx and Rx rings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" --000000000000ea7a9a05ccec8542 Content-Type: text/plain; charset="UTF-8" On Fri, Sep 24, 2021 at 5:57 PM Ajit Khaparde 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 > Reviewed-by: Lance Richardson > Reviewed-by: Somnath Kotur 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) > --000000000000ea7a9a05ccec8542--