[dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' has been queued to stable release 17.05.2

Yuanhan Liu yliu at fridaylinux.org
Mon Aug 21 11:30:41 CEST 2017


Hi,

FYI, your patch has been queued to stable release 17.05.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/24/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From be4873a932957865acc00346712f113959eb2e3f Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal at nxp.com>
Date: Thu, 22 Jun 2017 18:18:07 +0530
Subject: [PATCH] mempool/dpaa2: fix error code for allocation failure

[ upstream commit 6ed4390e5e16ddc836279946591618527cd69544 ]

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")

Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
Reviewed-by: Olivier Matz <olivier.matz at 6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain at 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..27ed5a9 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -294,7 +294,7 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
 			/* Releasing all buffers allocated */
 			rte_dpaa2_mbuf_release(pool, obj_table, bpid,
 					   bp_info->meta_data_size, n);
-			return ret;
+			return -ENOBUFS;
 		}
 		/* assigning mbuf from the acquired objects */
 		for (i = 0; (i < ret) && bufs[i]; i++) {
-- 
2.7.4



More information about the stable mailing list