From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0058.outbound.protection.outlook.com [104.47.38.58]) by dpdk.org (Postfix) with ESMTP id 16A541B295 for ; Tue, 10 Oct 2017 13:36:39 +0200 (CEST) Received: from MWHPR03CA0016.namprd03.prod.outlook.com (10.175.133.154) by CY4PR03MB2695.namprd03.prod.outlook.com (10.173.43.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 10 Oct 2017 11:36:38 +0000 Received: from BL2FFO11FD051.protection.gbl (2a01:111:f400:7c09::197) by MWHPR03CA0016.outlook.office365.com (2603:10b6:300:117::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Tue, 10 Oct 2017 11:36:37 +0000 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 BL2FFO11FD051.mail.protection.outlook.com (10.173.161.213) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 10 Oct 2017 11:36:37 +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 v9ABaJOh014848; Tue, 10 Oct 2017 04:36:34 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Tue, 10 Oct 2017 23:21:27 +0530 Message-ID: <1507657887-11366-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131521089976326250; (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)(39380400002)(376002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(104016004)(81166006)(33646002)(189998001)(105606002)(106466001)(2351001)(53936002)(47776003)(36756003)(6916009)(5660300001)(8936002)(86362001)(68736007)(50986999)(54906003)(76176999)(77096006)(8656003)(498600001)(305945005)(16586007)(97736004)(69596002)(5003940100001)(8676002)(2950100002)(81156014)(2906002)(356003)(316002)(50226002)(48376002)(50466002)(4326008)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2695; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD051; 1:YJEEt4yd6Yt2D+VSwPtMd10h7uDIlf0caoefo9NL5ANdRIVsNsWfDnkLB76quzAn1T4x18G2J0jxpLqbwQAtH7h+OAQuDWEP5/WsZVhoyp4lz0jbB8nOrnLGZGbFNlNZ MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7e062b8-f29e-4c90-770c-08d50fd32af7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CY4PR03MB2695; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2695; 3:QQR79DQ60yiRuVFy0NF/6NV6sdYEKwZPG2hIDrfMj2IlY9fAARhRnfCYYOzvik6dkBmm9kWPZxZ10YIVpY3gJj38yJrYjcfQ7nmc3DSHvBC4vwmrAv5+ss5lfU5dB30bCuvjPukeCL09RfUw+jGwmv08QGDRe3QoqyaPx9pYJJ1t/Pd5tlR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JTEqOd34QKNPCpSWWR/WS4emSnNgIFr4B1Tz31hcv/C2c7l9KKZjlHqqu783jVQcb88AKn7/9b7nxkau4hCE7d54A= 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)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6096035)(20161123556025)(20161123561025)(20161123559100)(20161123563025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR03MB2695; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR03MB2695; X-Forefront-PRVS: 04569283F9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2695; 23:fdt9D6kRr9mv9MN1LXF/lq8+zx9IuoCWjX6KdNBxG?= =?us-ascii?Q?PenMIOipOB80mGC2cDcZcfsjnUOAQ7bCHnbd/FW1BiB4WYrVFVzOyoJjTVld?= =?us-ascii?Q?oteqWLi690TrbbElKnp2PNAHwceVLAUKJDkVd4byxI7aPg5SVP0b0aA6h+fj?= =?us-ascii?Q?nRV8KkhPyf/9Ympz0lZotdvnGF4fLC4ZdScL8NzMy/aawuj+NMb6S9/7rQYL?= =?us-ascii?Q?/mOm0GzWuzAQXyxIsVyUZ2yPQ/4xeh634ahug+mk6lCpw62L0eQhN1ouETIl?= =?us-ascii?Q?BODVGkhV+FsX3qL5crm2XUX4yYxVra3LXVnazB/IltiWmeDq8DZ1V5Dif68L?= =?us-ascii?Q?WASxAuSgO1zVZhl9NVh2W8NPN6ZFCFOpKt/2hvCbA2h6QBnSlJDw7U+FXAQK?=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dgE5cKbmMW6yJHAjsxoxAc9xGyf9PGuR6TTBWs2/9TjvR+sfwwe4kfgNsXOqvpJexuX3P2VLPcbIJf/GDZ2ZVOAexVRC4QzxwH/oMRwVI5V+xnkN0T1KDy5Lxvl+3n2dQctBlOaVidAodsm0piBtd1wMXmksX8kB5IuFz4k7E1R5yJX48lLDzir1rk4zY2BF8k5GQGw3UdZeNSxCLGrSeNxecboQFFmxd1qdYih59elpS8Ex/AIwKC2x8dpj3GP3NgYktJQ==; 5:LDDKOEzwv+YVQYIx1CjFZ/u6x48pYQwH3t4cazjDJBuYwKT30ZU3q09crYlEhipEDZz0OyiTHlgIB+NqrHCQW6zHy92P8FuzKAW3tIcViTXAo2cXhn8K0pxwbcrujnX4dFHQUSJpGkMQ1unibcNXQQ==; 24:BesU04zm68aA0CX/nmIkMIt6vzFuSRPV00cv7QBY+1m+M/qRMiyJRHkNPupLDBFNZD9YhWcMo6nUSDqQdWO1q/ku/KZFY+HgrdwpyuJ5YOg=; 7:bqRt6/kqGjB7fp4z1NRUFdwgxKaQ1znqannvnIN0nQgSXtAn4NPgHa5oHkMbnMUvfp8mPmEy3jAZZxP+UAu7D1pDfUPZuRPLxEPKBOXDfwbtIdJfqVtl0JuDXUnmlCyJGtgQLCdSbt6Tlu0zQOMqtYGYhr59Pw4g/NgUeCLaUEl49cJ0gnvxrimOBffYw7DokeltVA+pS9wu4qbN/7wrUmV/2KBuGVx+gyjxONloxG0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2017 11:36:37.3986 (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: CY4PR03MB2695 Subject: [dpdk-dev] [PATCH 4/4] 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, 10 Oct 2017 11:36:40 -0000 Signed-off-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 ca782c3..7cb5d43 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_eqdesc(swp, diff --git a/drivers/event/dpaa2/dpaa2_hw_dpcon.c b/drivers/event/dpaa2/dpaa2_hw_dpcon.c index d3e73f9..f889aa8 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