From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0074.outbound.protection.outlook.com [104.47.37.74]) by dpdk.org (Postfix) with ESMTP id 6699E2C29; Tue, 23 May 2017 11:34:12 +0200 (CEST) Received: from CY1PR03CA0026.namprd03.prod.outlook.com (10.174.128.36) by DM2PR0301MB0909.namprd03.prod.outlook.com (10.160.217.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Tue, 23 May 2017 09:34:10 +0000 Received: from BN1BFFO11FD042.protection.gbl (2a01:111:f400:7c10::1:160) by CY1PR03CA0026.outlook.office365.com (2603:10b6:600::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Tue, 23 May 2017 09:34:09 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1BFFO11FD042.mail.protection.outlook.com (10.58.144.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 09:34:09 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v4N9Y5st022923; Tue, 23 May 2017 02:34:06 -0700 From: Hemant Agrawal To: CC: , , Date: Tue, 23 May 2017 15:03:47 +0530 Message-ID: <1495532028-9700-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131400056495979199; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39400400002)(39380400002)(39840400002)(39410400002)(39850400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(105606002)(47776003)(104016004)(2351001)(38730400002)(77096006)(33646002)(498600001)(86362001)(4326008)(110136004)(106466001)(305945005)(85426001)(5003940100001)(8656002)(54906002)(356003)(53936002)(6666003)(6916009)(50986999)(5660300001)(2906002)(81166006)(48376002)(50466002)(36756003)(8936002)(189998001)(50226002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0909; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD042; 1:uEMjfpHmPGubtTVLk/jl2zLyFRj+wuEFoWk1vqp2WkeESDKJ7TioyOpbRlRuAraCmoV2AgAoRzPFwUBXy/1UrCry7CWYrxiaMztEPv7L+3NlionsFB/9pYNx5swCaOkTiWf1CyU3DNVrHheH1I0pXyZ01f4EsmsPUAZHUkMSQM9HtlKsm+5KnR5SPAZ16gv8Wqdc+8b844h00oxD0pOBZ4HHpxb+VB6rsfQwvM8yRjQvuVXqAJwwLJuI+qXhw3iVe4a6l45kkBoN8OsVhaznckwYRPpxdRk7jHv3mS2q96/oRHg2xn2FUajw/hRdY7v2odsWdeGdxYCB8OBZlp0W5LEvWq6+wMZ2i/EfiUVPg5gQyy0sIdXeEKIbffKuTmyFWbcdSAGG4QjjzTLlsM4rRa8yNiHJBxtpr0NGQb1A3qH0U95KNLkDEBVynZjUXJJMEhotv9DY5Ber5lVPNwxBmJ9p6bSgLyiRFfwNd1EdXoVgs4668I363PK5VUL3XnsByPR3XvMb7C7LTHlTiw8QDD7HWM0nl5SLG5wPmFDZ4MsKCCDGspuI5JFfsMfKk0Ibaj5V04mvCjlyAncDD70ZWb+5nqbyDvtggL8AaKFm3YzpMCpuF5MiMfV0QBi+u+98NB0j7yrWpqCZjInX4flB22GVLyLq60H9HpEnoIdiUSUbpDGkd+KexdcIdB+EPCkJSl7vKZ6K3tSUfzt6czsBjDetsnghx2lO9qBvskvv1aM= MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0301MB0909: X-MS-Office365-Filtering-Correlation-Id: 6738489c-ba11-4a82-595e-08d4a1bedd5d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:DM2PR0301MB0909; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0909; 3:dk3Ej3jebHoaXjItpYlB8QjKag2JaqbRX9SG4E64bNz3+LK+tyniPmDTTK+G4KhTWriauSZNcU0IKFEQsvPLJiLygsWE48ctYbSMgNwhI05tDy83DrU8a+374Jrove+rGLdBFDM0R7bid5XHQJNWVjfwt/9Ob6ZL49wZJ/Gka0ZWSsTx2jlK9tgcyVyVmaNwEkRAxSuYS/z9OfRt/7TxPpVY7M0OR7UX2gedAHU2/ch3i6ouV7UwMgWofEMpvOEmYXRFby3kzqEum6D2s+B1RSlJGlF37lsci8QekTK6QAp9izHfz5HzGH73f5reiKKHnIHF3PCoBbSET8rCptb8giioj+rrFSf6N5lh8Sh+E6sYZ5WigvWnWYVUA/bcUqap7WMHtZKbmReOLc1R60EVd0nKIFhtn3yQu6DB3aPpC+LXj7LFWUTWUmp1ufK3t5h1; 25:TY3vrXQO1z2dL6cdNAah4EnAviC3c4LJPfkZ2Aj9KEsAxhbBR4y4zRm/3KEPwqCJvX4L3+WSuB9xhABXMXlidX/T5IQLFoNiA5DfjP4HLA9l4p6P4n3Jm9LBLv3TRP4Z8kjZ9RTeEvb4UmH1XkoczPr25o2Q0XvO63jU7jdQFv6/SvTX6BWCx5UJVq92I8zMzLQlowqTTRZ1q6WSdTwIxpPMuI4XDjGNJ7dKsTCk0+voDQ9oLnyBtCvR467tbusyEDxtHAC0BKnu+Jcs0HZUjtMOJk/p55bbsaK4WMsbqGeNQxJNsnNextC5+9auWu+9Tc6zxQoyKtN9KF8JRd4tMcCYHZW+UjTQ4wo76i1036sg/Q1/G79uk6qn4KHbS/wPHP8z0WGn8YTsFZc5KKg8/zIkuPunXbtGfoGpwUISMKjS8PezXqcOKMcg5ty7HbudlD59s/g65XdpuFAGpG22xeF+4uVUn07bdt/zDEkzYMI= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0909; 31:q4S6/bjLvcZIcpNPDbOuaEZl6Ky1gi4dnUwQoJyO4qvve3LBmSXXcdMn7qkhMKjprUPCO9/PghlAN0H+T15ZLenQWpF2kMLVjFeyatsG4bvcRcz2vjwK53Hpen+tPhQu/T4eZFOJmRNcu2FGHLU0Sps7+pAvidt5TVvStfeixuWdGbmiqKUbPUuDRVRLBow4pHktScvW9y1fQg6VFK305xpB7IxKkSgRB6v5bzPoq28darlfdI9c40jsMAP3cF+rOKaajNyvBwxX/GoIM/CLMg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13024025)(8121501046)(13018025)(13015025)(13017025)(13023025)(5005006)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123556025)(20161123565025)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123561025)(20161123563025); SRVR:DM2PR0301MB0909; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0909; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0909; 4:XpwbDJMp4biZgFQELojfbdGn1SbkIcYgQ6ZMNdhd?= =?us-ascii?Q?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Zyc5I1M6A55X/xw?= =?us-ascii?Q?22zYnsxAAPZWp1yCkx9NQgRQQjokdlAx6UmBHlCMLw=3D=3D?= X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0909; 23:BL4CRqn7RZ2/n6VSKpA1c4uFR6dVOGMJ7J9ZwR6?= =?us-ascii?Q?BIGRH3h6RavWZo615+m4A1h6pP1AfsGENAH4+hdkoOKbLC0VQXZVR8jkRm4y?= =?us-ascii?Q?sE36laVb8R/lgmlcYg/shwPRo8ZyuvI3cbxI9WC86qwv7tsDLUSZL38u+xOE?= =?us-ascii?Q?IHHVqlT5r5jud6hf0/rAITwExtr0oyc+hFadDYqLGG97Yly8Y7+0Pfj5Z3zR?= =?us-ascii?Q?cHoWF1R7i0DCT4ZzXu5Bi38R9181MRV3xWSoqf13XqWD9M7StwUWMs91pwPB?= =?us-ascii?Q?UoEVgD2ojp30ZN3B3xWRyPnRMv2sT7bRGT+JRAgEbWQYfl9MRfztuWDDEMKF?= =?us-ascii?Q?ElEaBduaRCIor8Zh+H2KoZaDYSI1c9FgKKpFahXebM/8k9n9RCVYvLV0eg9D?= =?us-ascii?Q?EfiWQaxAyXkOEQVImI8Ey/gBDAWU+ymM0yrUDQk+ToOo04RXhzD+y619CFKU?= =?us-ascii?Q?iJZt/7QJci0pmxZ+vLYbwZeunGBxRYuOlejh/kmQQRShZ6p2bbO1KEtzwtnF?= =?us-ascii?Q?qEKaqKAOBIxQfFoL5JuwWN7lpT2171oo5EywdD1xkkBBQIsE5pqiH7UhuX5s?= =?us-ascii?Q?gE0F5vX90IYu8R+SXwBhsg8MK0ZBMtBJG6R67Yh2oeyz6KGEUStq/q8gSwsT?= =?us-ascii?Q?cJA1OlNEf8nuw/fmWlpIQWPTV3g8jnLe6qIlaSEakqg5vqEgxM+Zl8tUxbji?= =?us-ascii?Q?q7Yi9dOrkq3sKB2Yi7lZfhPlALB6t/lAewxKwQiIekOldnMmPRVaq5Q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JLNyzWakOJxFxnjbFw/BjXTgywbquCVqqlJaOctmoEqfbcu3puENgg==; 5:RNb+us2SJFFYQcNyCVfD3UEVwQUTRHL7ep2ThzgJLdA/33x8pMsmD41xqY+4zdr0uUpVumR/+QvUOYVZnyKPgighnvhKTY6mNHF5Q1qAr6ASf28c3kygspisuTU6ZeWt7FjJJuPtqWagGAlnqfejsCb8DIsiJVnzsrZXcGdVufocWPUV3g+a3/6aYxDww7iy; 24:Sr/vRcJALDkmnrj/xbcv9ad1qNbfgJuRMJF0K5OHk2Qg2AX2ITlQQv9/WXDHyXuKrJbuIO9taxxo0TTlyE5o2Mpv0UwzwaqvVkEYVq3tUkc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0909; 7:l279WjfJy2wF6O8nhJlfDNtoUON9MWH2frzBJNKEu+4+PExdA4weI4vUqqTIzHBDpqbw+GmpQZtABHAeVOEnPbIcX0KqW/GvTup6Gkql253+JpBnOT/tNLlnBr0O0u0ubm0JgwZcERgWsd/bBHoEqfXDIGMzj0iDiV0DHrqkJT7pSH6gPEL0BBbHm2wZEpq81uUwAyirg1StcaltcRWKyW9Q5bvl00zvh6xRicgDtTSD8pTfRhXc4txWUz2C52FMVjCQcM+EDrcbbpFHMGmZjvf0esFFK8V4aPs1VH6XLRsFLjjC36xY9SXbEDL++DF/CCIIYCYmZ5sGFy9F451/OQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 09:34:09.3483 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0909 Subject: [dpdk-dev] [PATCH 1/2] mempool/dpaa2: fix the return value for alloc fail X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 09:34:13 -0000 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 --- 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