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 E8C4FA0032; Fri, 18 Feb 2022 08:24:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A9CCC40395; Fri, 18 Feb 2022 08:24:00 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1570F40150 for ; Fri, 18 Feb 2022 08:23:58 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21I09D8E025648 for ; Thu, 17 Feb 2022 23:23:58 -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=r0guc+HMMFWHYPbdvZ7feQAEj3LNBsf9Uslt0zTGUIs=; b=GOfS92i92Gnngu2YvtO+CkYZolXD1Vq9fgoukuFkRuMOZcYYHZPOEYTsijj9YmS19Qkc /4UfDPemULElGG5EQC+VhLGURCj538UyI60SqzvHanYBwvbrNwzy7baLhCino+1JCMEv 8uvP8AxhVdWeNEJumdRKGDi8wMGD2J7uT1zvKPyCjD7xlv57m/zaz4HE0WvI9liLRUzG 3oEI2hkW4vGQCDPfvWB+ZIj5ZvpA7w4lu74h59DyXPvaNPd7qZY3xC4I8d527/DBvmCQ jTvG5dV5ywxOHHnfPozDzeLx2Ir2PhgRBHe4hhCTyn2QJiqaPqOUOi4n2mMnZ6y/RCWT bQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3e9kktvtnt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 17 Feb 2022 23:23:58 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 17 Feb 2022 23:23:56 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Feb 2022 23:23:56 -0800 Received: from lab-ci-142.marvell.com (unknown [10.28.36.142]) by maili.marvell.com (Postfix) with ESMTP id 2FEDD3F7040; Thu, 17 Feb 2022 23:23:52 -0800 (PST) From: Ashwin Sekhar T K To: CC: , , , , , , , , Subject: [PATCH v3] mempool/cnxk: fix bug in batch alloc issue failure path Date: Fri, 18 Feb 2022 12:57:12 +0530 Message-ID: <20220218072712.2946331-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: DvspBDS8c83Xwt5Lvw8iKaJsJPn2D_qC X-Proofpoint-GUID: DvspBDS8c83Xwt5Lvw8iKaJsJPn2D_qC 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 enqueuing 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