From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0058.outbound.protection.outlook.com [104.47.32.58]) by dpdk.org (Postfix) with ESMTP id 792B11B78C for ; Mon, 16 Oct 2017 17:29:36 +0200 (CEST) Received: from MWHPR03CA0039.namprd03.prod.outlook.com (10.174.173.156) by MWHPR03MB2704.namprd03.prod.outlook.com (10.168.207.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 16 Oct 2017 15:29:35 +0000 Received: from BY2FFO11FD043.protection.gbl (2a01:111:f400:7c0c::197) by MWHPR03CA0039.outlook.office365.com (2603:10b6:301:3b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Mon, 16 Oct 2017 15:29:35 +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 BY2FFO11FD043.mail.protection.outlook.com (10.1.14.228) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Mon, 16 Oct 2017 15:29:34 +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 v9GFTHPA021125; Mon, 16 Oct 2017 08:29:32 -0700 From: Nipun Gupta To: CC: , , , Nipun Gupta Date: Tue, 17 Oct 2017 03:14:35 +0530 Message-ID: <1508190275-32305-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508190275-32305-1-git-send-email-nipun.gupta@nxp.com> References: <1507657887-11366-1-git-send-email-nipun.gupta@nxp.com> <1508190275-32305-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131526413750019287; (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)(346002)(39380400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(5003940100001)(53936002)(68736007)(305945005)(105606002)(81156014)(189998001)(2950100002)(81166006)(316002)(106466001)(86362001)(97736004)(33646002)(8656003)(8676002)(356003)(8936002)(6916009)(50226002)(5660300001)(69596002)(2351001)(50986999)(36756003)(76176999)(498600001)(77096006)(104016004)(47776003)(85426001)(4326008)(50466002)(2906002)(48376002)(16586007)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR03MB2704; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD043; 1:K+7mys2RW+6DuVyyESKSRFLlcr/W6CuWADu7GK8z52RGYcxgdQy2abgW+wGVg9CDOkN+GdcsiN1tBsN7hg05OULs1HjdPS/Qq4W1iWnQ6crsAmYCfPCKVvEX/MhPufJW MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a7681b6-eeda-44b2-a4d7-08d514aab49d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:MWHPR03MB2704; X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 3:TD4Zz9ZIikXcoiDO03A0FpdwKv0Jm9p2pe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zAmlpAfccwYu4K9z1BET7Y0u93iZQz/yFN8iFUrY/WdMI8dc6kAaI08zPuuxnSImmgG2xqknCz/Cn2XhDWDmInPihxhIap3dbV6chpc0RSwFQZXVQcPy8XRlYTUSWY24GXRNEnJe7tiOIfwCwvSloGmjjvPAde1COhpKJ8v6L21BDvNXErGGOGjPXuWi+Jjwmw7nXbYJYB2RU= 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)(5005006)(8121501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6096035)(20161123565025)(20161123561025)(20161123563025)(20161123556025)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR03MB2704; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR03MB2704; X-Forefront-PRVS: 0462918D61 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR03MB2704; 23:he54BkQBHVMe68TLeM6Xj33l3/YP5hhJzt+/0SaRe?= =?us-ascii?Q?P/fP9Uu6eSBLoR2H7Ah3b0XQ9M3eBvln3SB/OE9VUCsdORHGHbpDBU0CLXVJ?= =?us-ascii?Q?axTyQhTZYk6i80Ml3Mz4e83GGE4U3ynVrqx7xfAiHbLRk2BIpTZtkujHsniC?= =?us-ascii?Q?iCdAuJDCTpNqP3bWNjSW/S7HfqwNQGbtPWvrRrVnfCGA/ze31yuQAlqZwq07?= =?us-ascii?Q?pN/TeZ4ESrBcaBDntmH0ieUH8rQ0Ve+x4QIGmlLHF4TBd3G1culEPgQSN1A2?= =?us-ascii?Q?V3APCypSLFeZSXvSkFjNjpDU1DqFmMersQf4v0xRYob8wPXicVWa6uIedLlT?= =?us-ascii?Q?2A2v1ei77pWlLsBk6VAo4iUkF6g4JYAiYq1zkaSc24TpKjPMZedxAlikHsvy?= =?us-ascii?Q?xeC2FtoD1hcfOAmapCFwqO5xXB92u39uEL3dkPOK9E/50ArCUqTXnRHkc/pZ?= =?us-ascii?Q?bAiyGEZrjYquQQtpoLY2FpcexK12r5yXjEPTFWdhVc3RGK/5qaRML8w9N8KW?= =?us-ascii?Q?hdEqNWYqYe/AJemw4V5329ULJey3Id6uZjys9CjIsYdMmMYIPQDZVELiIqCA?= =?us-ascii?Q?H0y8eo27cfdxAmCF2EzysU569+Okm4KksTxjwDxCzSZqLbNEEPQV4H9o6Kl0?= =?us-ascii?Q?y3Rx66Cwciq3M2rlQ4UwFUnflJ3O2m5+3tke955ausBp3ystVdnlieVTXdIg?= =?us-ascii?Q?MLEuJYMP5DS0oZYWgad1f/RtmeBwdFG0looIudREdXyoLjar6xVWfWqp3Rxl?= =?us-ascii?Q?rvQW6gE3vySdFHSHTo6Jzx1BNj/4i34dUp2OjRaD6Eem/42BrxYxceAbu+u9?= =?us-ascii?Q?zqhcRn5btz+EwMsQBwmF1veXA/B04xkMED9jXjgh50mE8BVrmj6GPXK0/EXy?= =?us-ascii?Q?nplni068TnU3H7ODE+j/wVCt9DjqsGNSsJCuGVjfDhoCqxeS4ze07WBWaESX?= =?us-ascii?Q?S7ld/YAJGkAhrRN9S9uEO6gFQrWaktUdjRc1c3GAiktbMeKBqD2NcSVwS+XY?= =?us-ascii?Q?xq3YPfVskJYFy+tbTiEGoo66WplowMz2IG/iT1S0qJNTuxFyXG28JFloROAB?= =?us-ascii?Q?18LbPPbOpTEKg+RYjrc2zWtsiY80Bb931qxcCHrNUNDZsEpSpcQPGKV8Vx7a?= =?us-ascii?Q?htgPU7dLK/AAQWPzYQGLXx4fihkHR/0z7EBPY+OLcSZXKLP3/C1CQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR03MB2704; 6:+aNDlqEdxxd11WGorDciJOQcOkeizXwuBs6GI0orE3S0pufxa7ANKlKCbQMUprj/yV0s3f0U6a8E+Fa+3GcTcU6M6LXQ+EGPkx/WK35T2oZ6mIue3Rf4riR4Lok/z8STSLgWvagUGNpy0Oqnvh+WGsGahZfpM1bUhc0wvWk7Yh4D0KnZhSI4ikRgWuEU9AM7sTsGT5hQoqAb4HfSEkyOTRXAa0SiPVxBHsNVp3MWnnWGG51r8+Rv2xXk6kJ9UXCCnjxZ5DHnLDhheFxSiUZ2vVRlUBP2Ou6FOVpgQJthTHlSQLZsfITeYSsgKX3BLce1XC3C6LlYvx4aIvz/aAvQnA==; 5:TzrmvxwMkEjQpaYA8HWxsptW5Pe/UmwllFRadH8v3VZ3/gVSrxigbR/IdRnBnyWq1x8+G6Rk/tYHDdHswYERGrKh3glcQKHk6VsyxVoHVVFtusy+Ojs3idTOBJA1NhMhcCWs7G3PYAdUAMeH2J7jWw==; 24:j3xFfbYUVPhOhEMiZoHJ9c+fx7zYS8At+im18x+NXuUmAcwFeIdag9wgcQMw0NrFR24eqbEZi4sbhHYoj9dwRGI/0v3XyYQ6xxX2M1G3vc8=; 7:al/BqYCyeztHtuaEmhfY305Me+j9r/a62uq19W+k93r2kZJNHAyUDz5p14sQwUm4SzMUV/mT1mUN6ohgZlOcINXEl594HmUdkdpoHHFNhKLBSVjqLiQsAS4ZYp1sQB8gAifXmkM9+0diz+nZdtMs2kF6GP6SOlnCNzsQVWksL1ANTjDlNGz2vmGLa58o9QKISC+mFcvi5JcYq+cb0uimM0sMYFK4ypXZbNVvb+QQ2Pg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2017 15:29:34.8927 (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: MWHPR03MB2704 Subject: [dpdk-dev] [PATCH v3 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: Mon, 16 Oct 2017 15:29:37 -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