From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0040.outbound.protection.outlook.com [104.47.32.40]) by dpdk.org (Postfix) with ESMTP id 2340E1B3A9 for ; Mon, 23 Oct 2017 08:22:10 +0200 (CEST) Received: from MWHPR03CA0030.namprd03.prod.outlook.com (2603:10b6:301:3b::19) by DM2PR0301MB0733.namprd03.prod.outlook.com (2a01:111:e400:3c0d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 23 Oct 2017 06:22:08 +0000 Received: from BN1AFFO11FD025.protection.gbl (2a01:111:f400:7c10::160) by MWHPR03CA0030.outlook.office365.com (2603:10b6:301:3b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.156.4 via Frontend Transport; Mon, 23 Oct 2017 06:22:07 +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 BN1AFFO11FD025.mail.protection.outlook.com (10.58.52.85) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.156.4 via Frontend Transport; Mon, 23 Oct 2017 06:22:07 +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 v9N6LntY000944; Sun, 22 Oct 2017 23:22:05 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Mon, 23 Oct 2017 18:07:06 +0530 Message-ID: <1508762226-18938-5-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508762226-18938-1-git-send-email-nipun.gupta@nxp.com> References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> <1508762226-18938-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131532133278481503; (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)(376002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5660300001)(33646002)(86362001)(104016004)(68736007)(50466002)(48376002)(8676002)(81156014)(81166006)(77096006)(8936002)(2351001)(105606002)(498600001)(2950100002)(6916009)(53936002)(50226002)(106466001)(47776003)(5003940100001)(8656005)(2906002)(36756003)(356003)(305945005)(97736004)(189998001)(316002)(54906003)(4326008)(85426001)(50986999)(8656005)(76176999)(16586007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0733; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD025; 1:vyjaobz3EGDhiAo7SIW1enhLRRKOE1AEFuFjPNdCv/eijLuFA47WWKY0d4+Rd77uP60kkaN0gTwADDgrL202M6E2ZCg8QCjzJ+FVqDYQoDCIeL+I6EW2MA//u/8WJLyo MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4bf35ce4-c3bd-45e9-fc5f-08d519de6313 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4628075)(201703131517081)(2017052603199); SRVR:DM2PR0301MB0733; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0733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+g9xXThgt5Uxh7dmXdO6us1nCDkzcQmhfyNOxEWca7ROb8+rDt74FDnnmwxvrbCmysasFJCWzhpyQsXbIl+yPKoy8Ext2gGnHZsesJweFuxMBBy8b3UFGIKZ5LZJUxdXL7RJyTS3V4RPXuLycBAQDjp5qwBpvysVniqVGwfvS117GX+WOTwHzWjJaTaGgGgy0LHIICTjuBywBhyrhAsnd9COmtaBUHOVWKco0JghKF1dLuE7ZxJa51EDquNxYv4to0zZeZROpMMSORh3SCQ9WU= 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)(3231020)(3002001)(6055026)(6096035)(20161123559100)(20161123563025)(20161123561025)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0301MB0733; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0301MB0733; X-Forefront-PRVS: 046985391D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0733; 23:KaYndmUSV4Q4ugCfGEAnaZ+c0vZclHpNYkxqfti?= =?us-ascii?Q?ndA1qIDOHfDFPSXHDmHA5ZSrfoaLLI/03mhiUzy2uO/uz+7cTasCyKHA7uEK?= =?us-ascii?Q?KRD4opILY4sskFCkt9s6BzioZwXnXerDheJwV0TJCZYbLwW4q3A9XGLwzSrR?= =?us-ascii?Q?MCxXeN0TIvY/jLWGILLP/6SXCdec8AwXUgGH8q2M3bMK8JauGzsu9z/UeNen?= =?us-ascii?Q?wMbP9Nx1XbOzJuCXj1JLzShxjeeb+mcwH/T159mpROrednG/z44xvVmobQji?= =?us-ascii?Q?4jBxTl/dkQM6CoaOmNQnVEJOtoDVg/MrGvmhVtLiutEOO5X4hc0goMsKuc7T?= =?us-ascii?Q?0NufNPTzD/3IReiLbJp7+j+djE+T6NyAm7Kl0tnoDI7uJUOu+E5iHaaSKN/J?= =?us-ascii?Q?M+V3YYBzPumREeeMsMq05FXwbTG2DdR2mspvY/mdt4phUCSjUDwSl35SKDd6?= =?us-ascii?Q?eovw0+IPYoDaUjiNiWoVWXLNqOZqmEt9nf7pfEMbnrYT38kGmYkF7VXIP1UG?= =?us-ascii?Q?f9H2qn4+NLVj0j75ePek2siulOYBjb5cJEwtcxYxVot1uCjRSTt5n9/Q5snM?= =?us-ascii?Q?lGj/K/9tsuHIGK4hElPAEDJTfbsefZxUrPnAIJVL776msIyERv1xU4DXO17G?= =?us-ascii?Q?XerN4/RWm9JyWkdfS0OBX6VmSmlBFXpZ41tQD8EeIrDWowatXQ3GDSicswev?= =?us-ascii?Q?PwUAtlwJt/b7UjwnHYiofluD9ZDf8W3qDna8aO+oATCgT6AcQhD03Y9X0Ntc?= =?us-ascii?Q?GtzRiFivaR3SyADfwjr1mLch9ZI1iIuYrVucJLkZOpU0kHrMWy1UPAyg9mir?= =?us-ascii?Q?oU6YJA5Wy1unak9pt0JnZJ7rdW/kXtlL4bRsd5438u+Czp6ODCU2vfLhbN/v?= =?us-ascii?Q?fDr9Nz0NVtEmTWEdE0IF8JkphKiAlyRCqds5R3M8ElhgsnptJvWqXhu8ObyG?= =?us-ascii?Q?GtPFCClXbKDiiKRvwGh33T+rN3cVoRZChmDwAsGFhaVmlqllsD8B+2WgKfrw?= =?us-ascii?Q?I/VkXoH6pT1IuLnnkmOfzfeqYmnwJ6+tPhauKL54d0JahxEDx10pduMxxD5o?= =?us-ascii?Q?BXdbzDfXUZ0RgWROdgOJPbyfe05cbEqrIMpCzOdHMh+cg7TCNX5jbqWtzw47?= =?us-ascii?Q?o8D2QMuotHStkWAD104nf4ZduPvS8Y98Vqg/BG8S5AmU2Ixyveho8Bg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0733; 6:r3qY6tse0KZ8c/KdkVbPhd2vJpZNudnCKuDMiXldM9fSxwqxZ+xEKvI62n4pb+qyLfPX1UhvCP0ftIWWmiTpNpUD5ld/fOFiDqpbAfLiKcFAPvtZa1y2eSPWWmd1Z83MjfzDXYZPlcapdp5o4zEJvTj0Bss689fIakRW2hjdYhAhiXC+Er4S8Ws5Z1AG6ChiA5HUwgSUi80PinliDUw/SA6rf7AzInUlfKJO36BbutXKh/ULWOdyt94TXvbNbiObXvVwfveOE2xAIYIV56YF+qOhPtjpweYQcY8xb/U4V6Ey4uat03+vOfwdhbYAKZRWHYTnTCuWOoNCFZRw4+mAcA==; 5:+GkgAti7mT/ZurTXB5BO4w4Ffp+WQSwgf1ZkMsvdX0/uFslAdhFFbFonSrHEx+eWTg6OGr6ti3Q2CwkwnSIQgqtxcWXMtI9H+GuaOC1hcmaNggj6rfBcAGPZlix74za3cNqBrkdtS5dH6aP6fxJjQw==; 24:DYjpKw/67+nztrwQafgAHRAmCS+DHsODH26TRuSUaq/YhBEQKAOy5esjk09LWieP/x5vuRj79/yAvwRFqNJoCZUUfsPziQZU2ev3AaIiM0U=; 7:UNEJfjLeQLyEwZa7rvFgoCZHwaZ3QyJY+jJcTeY+PdVEHKxtS5JQmEPsmnirwhDEHmGyjjgdKQ5ycVAfO0NGFssypHtcophq6oyqJmyhByPDEV8UL9+npgVrGpsN77dzIwBCWETDTn7o6OpUt+wumjnG/6isdKKdK+y/YVALSZUQHB0vmMwb9+UGCpyPscfW7XKpHvDMO3QCZdY9O1MrFTTv97Rkrt4xT6YQCndV8Tw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2017 06:22:07.6765 (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: DM2PR0301MB0733 Subject: [dpdk-dev] [PATCH v5 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: Mon, 23 Oct 2017 06:22:10 -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