DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] mempool/dpaa2: fix the return value for alloc fail
@ 2017-05-23  9:33 Hemant Agrawal
  2017-05-23  9:33 ` [dpdk-dev] [PATCH 2/2] mempool/dpaa2: improving the alloc/free logging Hemant Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Hemant Agrawal @ 2017-05-23  9:33 UTC (permalink / raw)
  To: olivier.matz; +Cc: dev, stable, shreyansh.jain

In case the alloc api is not able to allocate the required
number of buffer, it can return '0', which will not indicate
the failure to the calling function.
This patch fix the return value to indicate the failure.

Fixes: 5dc43d22b5ad ("mempool/dpaa2: add hardware offloaded mempool")
CC: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 5a5d6aa..60dd1c0 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -294,7 +294,7 @@
 			/* Releasing all buffers allocated */
 			rte_dpaa2_mbuf_release(pool, obj_table, bpid,
 					   bp_info->meta_data_size, n);
-			return ret;
+			return -1;
 		}
 		/* assigning mbuf from the acquired objects */
 		for (i = 0; (i < ret) && bufs[i]; i++) {
-- 
1.9.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-21  6:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23  9:33 [dpdk-dev] [PATCH 1/2] mempool/dpaa2: fix the return value for alloc fail Hemant Agrawal
2017-05-23  9:33 ` [dpdk-dev] [PATCH 2/2] mempool/dpaa2: improving the alloc/free logging Hemant Agrawal
2017-06-08 10:08   ` Olivier Matz
2017-06-22 12:46     ` Hemant Agrawal
2017-06-08  9:53 ` [dpdk-dev] [PATCH 1/2] mempool/dpaa2: fix the return value for alloc fail Olivier Matz
2017-06-22 12:48 ` [dpdk-dev] [PATCH v2 " Hemant Agrawal
2017-06-22 12:48   ` [dpdk-dev] [PATCH v2 2/2] mempool/dpaa2: fix the incorrect free usages for bplist Hemant Agrawal
2017-07-10  8:11     ` Olivier Matz
2017-07-18 14:46     ` Shreyansh Jain
2017-07-10  8:10   ` [dpdk-dev] [PATCH v2 1/2] mempool/dpaa2: fix the return value for alloc fail Olivier Matz
2017-07-18 14:47   ` Shreyansh Jain
2017-07-21  6:29     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).