From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0074.outbound.protection.outlook.com [104.47.36.74]) by dpdk.org (Postfix) with ESMTP id 762351B265 for ; Thu, 12 Oct 2017 13:03:46 +0200 (CEST) Received: from BN3PR03CA0096.namprd03.prod.outlook.com (2603:10b6:400:4::14) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 12 Oct 2017 11:03:45 +0000 Received: from BN1AFFO11OLC004.protection.gbl (2a01:111:f400:7c10::170) by BN3PR03CA0096.outlook.office365.com (2603:10b6:400:4::14) 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; Thu, 12 Oct 2017 11:03:45 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11OLC004.mail.protection.outlook.com (10.58.53.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Thu, 12 Oct 2017 11:03:45 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v9CB3Ukk001793; Thu, 12 Oct 2017 04:03:42 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Thu, 12 Oct 2017 22:48:49 +0530 Message-ID: <1507828729-18194-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507828729-18194-1-git-send-email-nipun.gupta@nxp.com> References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> <1507828729-18194-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131522798252812389; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(346002)(39380400002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(54906003)(2906002)(498600001)(4326008)(85426001)(50226002)(5003940100001)(77096006)(2950100002)(8936002)(50466002)(5660300001)(48376002)(8656003)(6916009)(47776003)(104016004)(53936002)(316002)(33646002)(36756003)(16586007)(8676002)(50986999)(76176999)(106466001)(105606002)(68736007)(97736004)(81166006)(81156014)(189998001)(86362001)(2351001)(305945005)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC004; 1:P3doD7LmG5Rk6ruceHCqCQ2KereiZFZ64ZhF2dEitkRwsE0W+IvIqgYLiNtFeg4+hS40R7bCqSzu7jz2JTmM8ktENptr/DiIR+8WWa0ZgsBzhtTcRhgvqBb33BCIm7Px MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0afd8ac-4d27-414f-6865-08d51160e830 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:SN2PR03MB2366; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 3:htGbjWDMnfrT8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HTAutWtL4tMHBfNFcCYse5xv2JZkHjFJjVGMdp3q4F327u8X/J5NfnnNgiFm3CdKDtiKZrd0yH+wAu2lm4mbxHtKHgMpPOgex2eIT3tY7MkkzlMr20xrtPPd/rs+68d6YKXJ4ZHeQsE5om1zFBKNrj5L9Sj5eOQreapng0fqAesBvvYTtJf/kzLlSlRLIM8punfdJnLWpfkJU3qmSzAtszsyjUSqGhO+x5lkZDNv42sDE4g= 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)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(20161123556025)(20161123561025)(20161123563025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 04583CED1A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2366; 23:R/BJHYncuRsjlJvOoCDD+qJglzNT1cFqID0JiPyaR?= =?us-ascii?Q?249wd7kigexwGp/5b/82fZ0BpJnvgIoz2CVAnnAmChojFIHSgBGi7imO+zYk?= =?us-ascii?Q?iLoP3f9ZIbaoTP4omesc5aH1rPoVYiqbZeYj07vFxmXz4rM7gFSQ0MyGFq+e?= =?us-ascii?Q?3JMEjh7k7lD//ZozgAk2CgJzztR8eI/kfX0UAJUvhjHrYYgO9pDiS/vQ60Xn?= =?us-ascii?Q?2aWUvEBDwC3yQNWqi0rc8ucbxxpxAb7zxxmJuP9Ntorgp5MQcejHNrHKgP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qDGpSThvNRqUG?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 6:4zyIMx5sd6y6XI7iwr4kPtuoF0jSVA6+zOxjn5H733rO3uTRL9xddUBClgzVS0xnUgJS3jPySBCfGbU2rDhX9XO87EdcRyCxyx23K80Pa2RHAU8eaFuhOLVNU8yE3bD3rFlyNJi2HfHa1tlA6Cb14hk43nYkhnJ2WxMdbOFl9XnqFaTtf1OW/J3K7NHk86Rkf3mO1BD4U3E+ydn8SFkfokuyti0+0j4Cui2p6/W7JOkF/fXd6QK+t2xVSWZ3FohbCkGgVCVsVeOgeESYYQfyyjJ57WhBk3aXt4TCqB/CRlNIxhxt+Dbdo678C9H4k8bQrOHpjmAwdNRy79ZqlhYTZA==; 5:fSLX7sSXXDv0VEFSFFEkogD6lraUyCsJ1KfQAI/Nfl4bMlsG+xjTC4SMzAfRzP7XkT3Mk2WgkWYfCL2Sumez+HLmi5j0touO6OCRwxZwCpQ9kvLNN1oyYz1RrhKgEia0LTA30D/9kDfAxBXH7EYEEg==; 24:iPGMy5446JGW5wJ27hqE6N/79RwvfR0Sa7cXN91YcfzlXtn4MBjuCBDcQfLzGevKuaolTLQL8F7xhLFtz+VX+MBd2kDNh2U+WAqbcIF7tPc=; 7:8Zih/4EuxrLxvwwx1ikFs+VS/J4/d5BnTcjTKTsEheYa9hhDkJm6Zzt8PxpMzxAq0IUJoeMgViBXGmTagBsyh0GvsoVWt6bpp3k7mXPtFib7C6NpqZjEYiXPmv7NPLzfQFHWp7HelFqYe9AVh/xUtZohgRPF/JKezqdSDPVd1pXme7Rlvj/dULvSKpKTc8OoqBHIkqStwdmCjcSy8vDjP+vJSxa1MlNVLzjVc7MUw8M= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2017 11:03:45.1096 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2366 Subject: [dpdk-dev] [PATCH v2 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: Thu, 12 Oct 2017 11:03:47 -0000 Signed-off-by: Nipun Gupta --- 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