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 4BD0FA0032; Fri, 18 Feb 2022 07:37:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13DA540150; Fri, 18 Feb 2022 07:37:18 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6605340140 for ; Fri, 18 Feb 2022 07:37:16 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21I0WHcS014330 for ; Thu, 17 Feb 2022 22:37:14 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=wrRb1rXQ8R8xAxPl8GAurhBPeZwtMgQ4eZlwGpw/Kz0=; b=CtV6lCIkQ1WJD88okulsI/m4a1AJ6zHvSc53MVoMOyVuMh29bTZflOJv/AYysD1OumKN l/EbuWlZoQO3wYzvF+aykhYjmd9v3+R0FUeIhSnbRBnhQo0QZj7+C9ubkCqyWJgZFg2y oy4PRVHaap1oG8hj5OUCxlZaFlF1xkiLOydB7o410tixnHjGG5HVRGxM8lN1vS9xHfyF wudEtzMKl9fVOTdPeV65OXZ9/GDZQJVnVw5QvMJto+5k5G3NeBDINH/3iHpK4c2FC8PD cEnykIdVJr3CPcYrwEJw0A0rnCwD5+GCQq8SXJ7wNdykheR7lrJPqcYoZAC/fxDFDPtp gA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3e9sqrk673-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 17 Feb 2022 22:37:14 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 17 Feb 2022 22:37:13 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 17 Feb 2022 22:37:13 -0800 Received: from lab-ci-142.marvell.com (unknown [10.28.36.142]) by maili.marvell.com (Postfix) with ESMTP id 4C79E5B6923; Thu, 17 Feb 2022 22:37:10 -0800 (PST) From: Ashwin Sekhar T K To: CC: , , , , , , , , Subject: [PATCH v2] mempool/cnxk: fix bug in batch alloc issue failure path Date: Fri, 18 Feb 2022 12:10:29 +0530 Message-ID: <20220218064029.2906898-1-asekhar@marvell.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220210115256.2744447-1-asekhar@marvell.com> References: <20220210115256.2744447-1-asekhar@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: JSP_no8Kx07RyG0hH5V8vkUnySyLKonp X-Proofpoint-GUID: JSP_no8Kx07RyG0hH5V8vkUnySyLKonp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-18_02,2022-02-17_01,2021-12-02_01 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 Fix bug in batch alloc issue failure path where it was enqueing invalid pointers back to the pool. The code should rightly be falling back to default dequeue path in such cases. Fixes: 91531e63f4 ("mempool/cnxk: add cn10k batch dequeue") Signed-off-by: Ashwin Sekhar T K --- drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c index 4c669b878f..6ebbf91de5 100644 --- a/drivers/mempool/cnxk/cn10k_mempool_ops.c +++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c @@ -202,7 +202,7 @@ cn10k_mempool_deq(struct rte_mempool *mp, void **obj_table, unsigned int n) BATCH_ALLOC_SZ, 0, 1); /* If issue fails, try falling back to default alloc */ if (unlikely(rc)) - return cn10k_mempool_enq(mp, obj_table, n); + return cnxk_mempool_deq(mp, obj_table, n); mem->status = BATCH_ALLOC_OP_ISSUED; } -- 2.32.0