From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com [74.125.83.52]) by dpdk.org (Postfix) with ESMTP id 4A6E790F4 for ; Mon, 21 Aug 2017 11:35:25 +0200 (CEST) Received: by mail-pg0-f52.google.com with SMTP id n4so33232465pgn.1 for ; Mon, 21 Aug 2017 02:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cCA2rtVku4d6EvEKGHB8YqP+5CWw/k9DVbpmEW/9t6s=; b=cRpWrpUAF1rV3Dnx7NAoAbjlisStMzyjjlDnqRWIAI4YtBRz2AdrdMAMcMv0kFzDOl xJoalelKjmaYoP+tx9SyHS8D56EXkNwc4qMx3E/tz9cQc9lgQSBUxQFHgxTEEABK7Nwh nTqXRKI7YnMEugwPbwayOA+aC3+RBVVT03TdzmdHFCmrNrN73Y6u6ijrqze39DDhDrK1 FImCSvWE+4nTHdbBeHnXndt6+rr+qmMCj7QYGC1ethYpnNgCNq/1HF1Vw1584iS/DuPU 903C8nYgtci/wpAOghXuwE5EMHlN4u+XndUfG3RgzuAhN2lWVzESIoPqXXVNmyFxHIfh 8+Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cCA2rtVku4d6EvEKGHB8YqP+5CWw/k9DVbpmEW/9t6s=; b=LzTEB5Z6HUgv6ysiNTF9mjOydUpJfbPGjrDdVir5jgZ+AVXEjI04lHR8X033ChJ6+f I27BhQ/lhs7+TvIf2LRdywGdfIZlSPrL0cNIwtzByH15pqM5O0iJzfaa0uoqz/8Lq/K5 ivZy0HdNUbn/ZwA5wiIvEs1k4kVQfpNHAJVrE+jTtFN6dgJblGqxkuFbPzhKBmVTXqDp dcPYS9OLuXyFZq8psdp/ql6Oh4KUrKJePAtH9vG7GcVcTrvNzHiHqi7PuPa7VdwRTcCe YNuuaU6hLADj34ZGgWcCTIkZLSDcPrQ2tpCph3o7oJybKzBnZwXVocnlG4BmAzGm1RHK PEzw== X-Gm-Message-State: AHYfb5gtWIG/dZ3ZX2xZjyPVNsieCc9/P8qhOSyKqk8jxnDVcJ990owy 1UyVkwY/FnjSzOKb X-Received: by 10.99.116.28 with SMTP id p28mr10300733pgc.368.1503308124645; Mon, 21 Aug 2017 02:35:24 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 69sm23355087pfh.186.2017.08.21.02.35.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Aug 2017 02:35:23 -0700 (PDT) From: Yuanhan Liu To: Hemant Agrawal Cc: Olivier Matz , Shreyansh Jain , dpdk stable , Yuanhan Liu Date: Mon, 21 Aug 2017 17:30:41 +0800 Message-Id: <1503307878-16728-27-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> References: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'mempool/dpaa2: fix error code for allocation failure' has been queued to stable release 17.05.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 09:35:25 -0000 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 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 Reviewed-by: Olivier Matz Acked-by: Shreyansh Jain --- 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