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 9A021A0C41; Sat, 25 Sep 2021 02:57:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 853894068B; Sat, 25 Sep 2021 02:57:08 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id BAFD34003C for ; Sat, 25 Sep 2021 02:57:07 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id y186so124836pgd.0 for ; Fri, 24 Sep 2021 17:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version; bh=sLdm/d96Kmud8/BMsCGK4HURnDrUn0lIf2UkdFgmNZk=; b=CPfyoAQz4Mi+znGr0Z7Wt4oW0929VnuLhpvh5Qmv8UVzerE/f8Uew6Qb7vfTcBeLpE fR++FUQ6fYnRjaaR/WPhRPGFcyTNXCTSf6Z0TBmkuxqeIJiwm/YLS1at6QeLFHRwO2oC zRM59xRG0x0gyehfNUmQZHFwA/5JMMgKIASsA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=sLdm/d96Kmud8/BMsCGK4HURnDrUn0lIf2UkdFgmNZk=; b=vJBcD/tTAyPP9buk24BBM+/51TymgBjPL+3huz4lzbDyxpd1r8oCLeOt8IEKuOpYOo /s7Ss1PJ7hkrqCcZIVoJqpEht4V+Im22aVfZeUIjoWKyp68bmW7cH2JAFvW2pAXXeRUZ xSfIot/27TF08RiquxJVLojm4asVdQa//Ssbj+CtUN/lDuCHZSZ+1SYZGAb5OZe2pLMm Z43o4QXavrs814Z/wygATL9W2zdp4g3y+Nk8263gUDkt2dWkPHeDT5UfwTNITwQQFp3T JpvV43lebE+jkXNK0qmkGnFEPWZaa81zj4pvfK8j0YqQWAaSxU3o4dLiSI1htEZYjFsD Ceeg== X-Gm-Message-State: AOAM530VWE3t0x1PXGLBLYxfTdMamsZ7tQ+Y+NmAPyT+qYBvbKCyapAI bTGBhrIcAhd5cwha3GzSarXnMyjxg2Q2pInnZ+AsWBL6QtQUMmxbmP+mC5tSQ3Zvy+W0YoELyvi GLYetQG5CnrkaCZfRbsRK1IhrHgJR8fVusmu67cbigBue3zBlDmL6MvZegHXTt6I= X-Google-Smtp-Source: ABdhPJyawo7yyv746/NSnARUqKTeiIcEEgwPVoEt8lR4DYUSLhsm5QXXtvlMj67kOLC1C2RwuWHqpg== X-Received: by 2002:a63:d2:: with SMTP id 201mr6146725pga.400.1632531426631; Fri, 24 Sep 2021 17:57:06 -0700 (PDT) Received: from localhost.localdomain ([136.52.99.246]) by smtp.gmail.com with ESMTPSA id n19sm10016764pfa.60.2021.09.24.17.57.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Sep 2021 17:57:06 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org, Lance Richardson , Somnath Kotur Date: Fri, 24 Sep 2021 17:57:02 -0700 Message-Id: <20210925005702.50971-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000cb1be205ccc757ff" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [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" --000000000000cb1be205ccc757ff Content-Transfer-Encoding: 8bit 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 --- 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) --000000000000cb1be205ccc757ff--