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 59019A04FD for ; Wed, 23 Nov 2022 19:05:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FE6042DB4; Wed, 23 Nov 2022 19:05:07 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5744B42DA3 for ; Wed, 23 Nov 2022 19:05:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669226705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OXfySYdFCtALD/GPh+vUJQ/x4iRmfMS8zhmmxkhgGgE=; b=YLMNLJL3pREmxjYo5XwQWyXunHDJB+E4rfTYJKlTL55vn4iIKhsmGcLbuvBw3aIS+yLWZL LXnllNWOUXOy0XVwZqKlxxdrzlVOp4gEGiOqT6FQ26zkWbFMZ2RA5o2AlJcXrH7CZ5Oj4o quMIAcFeSQXl1lNzFBSAZR5ic+Q6nTU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-U--z6a2HP9Oa_yEF12uLPA-1; Wed, 23 Nov 2022 13:05:03 -0500 X-MC-Unique: U--z6a2HP9Oa_yEF12uLPA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8AF3B803D48; Wed, 23 Nov 2022 18:05:01 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC8CB492B0B; Wed, 23 Nov 2022 18:05:00 +0000 (UTC) From: Kevin Traynor To: Ashwin Sekhar T K Cc: dpdk stable Subject: patch 'mempool/cnxk: fix destroying empty pool' has been queued to stable release 21.11.3 Date: Wed, 23 Nov 2022 18:03:46 +0000 Message-Id: <20221123180413.733554-33-ktraynor@redhat.com> In-Reply-To: <20221123180413.733554-1-ktraynor@redhat.com> References: <20221123180413.733554-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/28/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/08a6a565e788c323ce732422836b56dadb267e26 Thanks. Kevin --- >From 08a6a565e788c323ce732422836b56dadb267e26 Mon Sep 17 00:00:00 2001 From: Ashwin Sekhar T K Date: Tue, 8 Nov 2022 12:25:58 +0530 Subject: [PATCH] mempool/cnxk: fix destroying empty pool [ upstream commit 3af7276eafaf41a93e83a04636c1542e7c82018a ] In scenarios where rte_mempool_free() is called immediately after rte_mempool_create_empty(), the NPA pool will not be created. In such cases the free path should not call roc_npa_pool_destroy(). Fixes: bbf19e89b87c ("mempool/cnxk: add generic operations") Signed-off-by: Ashwin Sekhar T K --- drivers/mempool/cnxk/cnxk_mempool_ops.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mempool/cnxk/cnxk_mempool_ops.c b/drivers/mempool/cnxk/cnxk_mempool_ops.c index c7b75f026d..b3592d91dc 100644 --- a/drivers/mempool/cnxk/cnxk_mempool_ops.c +++ b/drivers/mempool/cnxk/cnxk_mempool_ops.c @@ -124,4 +124,12 @@ cnxk_mempool_free(struct rte_mempool *mp) plt_npa_dbg("aura_handle=0x%" PRIx64, mp->pool_id); + + /* It can happen that rte_mempool_free() is called immediately after + * rte_mempool_create_empty(). In such cases the NPA pool will not be + * allocated. + */ + if (roc_npa_aura_handle_to_base(mp->pool_id) == 0) + return; + rc = roc_npa_pool_destroy(mp->pool_id); if (rc) -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-23 09:55:57.860284485 +0000 +++ 0033-mempool-cnxk-fix-destroying-empty-pool.patch 2022-11-23 09:55:57.071149312 +0000 @@ -1 +1 @@ -From 3af7276eafaf41a93e83a04636c1542e7c82018a Mon Sep 17 00:00:00 2001 +From 08a6a565e788c323ce732422836b56dadb267e26 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3af7276eafaf41a93e83a04636c1542e7c82018a ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index a0b94bb95c..3769afd3d1 100644 +index c7b75f026d..b3592d91dc 100644 @@ -23 +24 @@ -@@ -127,4 +127,12 @@ cnxk_mempool_free(struct rte_mempool *mp) +@@ -124,4 +124,12 @@ cnxk_mempool_free(struct rte_mempool *mp)