From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0082.outbound.protection.outlook.com [104.47.40.82]) by dpdk.org (Postfix) with ESMTP id 117D61B7D0 for ; Tue, 17 Oct 2017 12:23:39 +0200 (CEST) Received: from BN3PR03CA0070.namprd03.prod.outlook.com (10.167.1.158) by BY2PR0301MB0726.namprd03.prod.outlook.com (10.160.63.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 17 Oct 2017 10:23:37 +0000 Received: from BN1BFFO11FD042.protection.gbl (2a01:111:f400:7c10::1:193) by BN3PR03CA0070.outlook.office365.com (2a01:111:e400:7a4d::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Tue, 17 Oct 2017 10:23:37 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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.20.77.10 via Frontend Transport; Tue, 17 Oct 2017 10:23:36 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v9HANHXh024567; Tue, 17 Oct 2017 03:23:33 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Tue, 17 Oct 2017 22:08:34 +0530 Message-ID: <1508258314-11151-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508258314-11151-1-git-send-email-nipun.gupta@nxp.com> References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> <1508258314-11151-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131527094171122786; (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)(7966004)(346002)(376002)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(8936002)(86362001)(33646002)(53936002)(4326008)(76176999)(2906002)(50986999)(77096006)(69596002)(305945005)(2351001)(356003)(5660300001)(36756003)(106466001)(105606002)(8676002)(50466002)(47776003)(54906003)(81156014)(16586007)(316002)(68736007)(50226002)(498600001)(189998001)(5003940100001)(2950100002)(104016004)(97736004)(8656003)(85426001)(48376002)(81166006)(6916009); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0726; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD042; 1:70V3yQhdMtOP+JUEUuChoAs45+keLQHNb6AHJrOGnhz0cV/Ik1u/TJypEMjwOxgankSQha+pQ1ddS5RMiBXIb9Qr5U36qancgxIo9l0yKd/78XJxy+rhgXNPPCxzRT+U MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 973cc1f0-a525-40ef-5b01-08d5154920dd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:BY2PR0301MB0726; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 3:KN5O2Lcy+Mv/HnoTYX5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Y0bcKtvrDfJ1wt3AjFVWm9ak+PE3Gs95OoCJ5//y/UJikVizGpFB4vuXQyXt16INdFvniNtNgwKlsi6bJvF5iT9Ax0wz6kSQRdv+aGZiezN/gcKhsG98pAtE1SdCWRtEPhVDz14gOK0433XBz6exV07no08xkQEiSvQuWm32329Hrrg0qmRYFyRWfup4LQsoFjI+6h9/0VdtnTQBYPOk9XJzETPQIitX+0OIbbKhb+ZVYKXL9ajXV8= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123559100)(20161123565025)(20161123556025)(20161123563025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0301MB0726; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0301MB0726; X-Forefront-PRVS: 04631F8F77 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0726; 23:2uCY8+eUQIk+xEse40ei2eQlXQOk/qOMbIalz++?= =?us-ascii?Q?smzZzqEai/Jg1FeSfgzVndohk8gpouxt/citfqgHrDJnoQGA3KoYTfeHAAEk?= =?us-ascii?Q?ZG5UyNQV00kP8OMmxy10uCNokQaRs4TjbmmZmn+PGFZb5CH8dZhUQnISLI9F?= =?us-ascii?Q?QnQ+MwkFbZR6IFz0BME/nSugIU/rAjq8ROgUCKJeftWyCBoXeKjoSTcFtOZc?= =?us-ascii?Q?X1R6o4mAhEyMO6qIOqZSngNVmQ+doXPkNBEc3V0Df0JStcYTebBX5IPM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ElBb+TefdNAAvyzmH0F/xghaD5igRXRX?= =?us-ascii?Q?zyH9xmG592dp7bzw=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0726; 6:WyeaK5KTmDh6zQcGeGa05bdZWVp0XJ78mdSW7EaiGVBEvNWU2ijMNLWIMhjhjc0pSQjXdET+gsSHTP2iqGTCrTXXffGegsXLcGq3IF8ET7csAJ3QROGTo/KldvKWJ7hkhFn+huj1QDLayvnpEHeBkrqKmKBFW5DZSyPNwkv1/lE3xoMX2hetvJN4UwvDYes/80Brlmt05moQozOLj/STpB/Ek84uK3Y3CJWfDF7NsIdT4smpyJnOVsQblkJHTaUCgK+h62AhlVVYiqaMU4SOA9OlPvJ+GUg+ZUAiqnh7Jcig3vncmLot3xpi8bVhSF/6RifldW2lG9lKjp+3p+6u2A==; 5:hDaDzAIky9gWxOZHxtAJUZ0BFQbU/ET8MhatU03wUy/QQ5P2Tl0lHo4sipn8Qe8Uz1ysXTdzx/wL23/5SUrZ9zK3NzRqLYMMIrbjofAoen4ILc5vs3KoHwW/feO09eANG94rMEvMvmRIIAXY1iXAxw==; 24:Hxg/TYMPfJEvsFrg/f0eZSbCNbdhiW+/F/6omcQDK3G/OdZPBkoN2WeDTBQl0aX0pQLg4opsjpimHl8EEIff/ktTYdgKETKEI7tOQ77z/DM=; 7:gZ+D48ak6CtrBzVXH5G5IC6z89wndpGEBgdG/yAx2zZ3M14LV2/cTHcM+qm1TfzuVB4I0dYDoqHw8z5CUiR9xvPXQTdmETgvCTVteaqyG3VKZ7oFR5v2tVHyjIy9yxQg55Tb/kniYG2Vp/5kch5qGv6FBs5TuRkeu1ESfme7rNj6aIUM/DUYun+QgTlwLx6K+EpoLNXOyAJdo+ahpCdLu0RCPcX3F+srmkcikhLH0UE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2017 10:23:36.8626 (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: BY2PR0301MB0726 Subject: [dpdk-dev] [PATCH v4 5/5] event/dpaa2: improve the err handling and log msg 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, 17 Oct 2017 10:23:40 -0000 Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- drivers/event/dpaa2/dpaa2_eventdev.c | 9 +++++++++ drivers/event/dpaa2/dpaa2_hw_dpcon.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index ee3a164..d1be5de 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -140,11 +140,20 @@ */ struct rte_event *ev_temp = rte_malloc(NULL, sizeof(struct rte_event), 0); + + if (!ev_temp) { + if (!loop) + return num_tx; + frames_to_send = loop; + PMD_DRV_LOG(ERR, "Unable to allocate memory"); + goto send_partial; + } rte_memcpy(ev_temp, event, sizeof(struct rte_event)); DPAA2_SET_FD_ADDR((&fd_arr[loop]), ev_temp); DPAA2_SET_FD_LEN((&fd_arr[loop]), sizeof(struct rte_event)); } +send_partial: loop = 0; while (loop < frames_to_send) { loop += qbman_swp_enqueue_multiple_desc(swp, diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index 2c416b5..005e623 100644 --- a/drivers/event/dpaa2/dpaa2_hw_dpcon.c +++ b/drivers/event/dpaa2/dpaa2_hw_dpcon.c @@ -100,7 +100,7 @@ TAILQ_INSERT_TAIL(&dpcon_dev_list, dpcon_node, next); - PMD_DRV_LOG(DEBUG, "DPAA2: Added [dpcon.%d]", dpcon_id); + RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpcon.%d]\n", dpcon_id); return 0; } -- 1.9.1