From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0080.outbound.protection.outlook.com [104.47.42.80]) by dpdk.org (Postfix) with ESMTP id 8328A58CB for ; Mon, 5 Dec 2016 08:29:02 +0100 (CET) Received: from BY2PR03CA071.namprd03.prod.outlook.com (10.141.249.44) by CY1PR0301MB0747.namprd03.prod.outlook.com (10.160.159.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Mon, 5 Dec 2016 07:29:01 +0000 Received: from BL2FFO11FD020.protection.gbl (2a01:111:f400:7c09::161) by BY2PR03CA071.outlook.office365.com (2a01:111:e400:2c5d::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Mon, 5 Dec 2016 07:29:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; 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 BL2FFO11FD020.mail.protection.outlook.com (10.173.161.38) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Mon, 5 Dec 2016 07:28:59 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:703; Count:10 Received: from netperf2.ap.freescale.net ([10.232.133.164]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB57SdmX016006; Mon, 5 Dec 2016 00:28:56 -0700 From: Akhil Goyal To: CC: , , , , Akhil Goyal Date: Mon, 5 Dec 2016 18:25:37 +0530 Message-ID: <20161205125540.6419-6-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161205125540.6419-1-akhil.goyal@nxp.com> References: <20161205125540.6419-1-akhil.goyal@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131253965407129208; (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)(7916002)(2980300002)(1109001)(1110001)(339900001)(336004)(189002)(199003)(77096006)(33646002)(356003)(48376002)(6916009)(81156014)(2950100002)(36756003)(104016004)(39840400001)(81166006)(39860400001)(305945005)(85426001)(8666005)(8676002)(50226002)(7846002)(8936002)(86362001)(68736007)(6666003)(97736004)(2906002)(105606002)(110136003)(47776003)(2351001)(106466001)(50986999)(4326007)(626004)(39400400001)(39410400001)(39380400001)(39850400001)(38730400001)(5003940100001)(50466002)(5660300001)(39450400002)(92566002)(1076002)(76176999)(189998001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0747; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD020; 1:hy+P/xrPQ8qZDyPUzKG++2yXDmTnpkg3wWptOH2DKwJUCTj6EHfv2YyDKgQZpCNKcY79wtodY2bolgFOQz4UAxyL1br/HZ5ED5vFyAjRF6SCsc2/Fb0atN37CQNX54z+DlFWOWhoajvPMHgAaWu84T4ntVdlqSghNX3WwK8Ucvy1LEhdZ2ose4ZrVRV9iS20JQY1pLuUlMUzVPr2tL1g7CZecQEckheP/uU3k/5EKL6fGOzTT2+Axv6feWQfR4RgerHIfjoP8HPjNjVfdhIJ5LGwtKLnRbNYvyhx4M5J0/wN2XKtmdJHHOLu8J1ZvbjXlR78V/3YENVk0lohWQw8fEnRpFM32tEJ/ZD+clA18q9idaDVuFGPSL48wCiQScAuqbWP572Nd1Pd956+cCz4tJyC9J/EEHmuAreu4RgoJz2Z80QRH4zRbjMbwRIkFhRf9KQziFvI1ubNuzkx08k0yp8hKPgJy+M3syYzukcJF//NhdHKYJFpWLSivWTAyPHxLNP6obu8a5AJSv6NFjmFPlzr3BLi9DmpOC/+RblN3ppKPTlmzzBMA1DZVlpxTFoYpZYwOvF4k0PR4tJK7FAKaZ0ZDuqO1JA0I8O/h0tKpRvPTJODcKBXvH1CY06QHOczk+pMQW324z21w0IAdbnvCgk9osLjxGJTyG4M3i6bEYRqMuNMHDYp95+0/5qFlClWGE1aPTE4rEIS1B3Gk9zoJCPPeqG8v/zWZMmtC2KxXUwZA+XxBfxUSUAIYk0b+gCrtKLmfIraeFtYF6s4sNchzA== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 134ef9ee-82f5-48fd-ad19-08d41ce061e8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0301MB0747; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0747; 3:5u8Vkp3bFYvt2tFu0jzPDY3KkAmq2qRAJBs7yfwKaKXuocmEI0xNWMdN68rmWxlCy0X5rLAtXzd3lCRgJcaUxIt+TRfLeq2d9teXiDCt9swjv+0O9ExgFFQ4gFRJWtSbk2rrxAbJW0/XLNKXe34z/TV5hB4tM1Rb6OEikVgbCHKaMpi23mK2NeXa+shYHxYUAZpWoa3tWbr8TjJvKnEe5ITH5iyX9etTWvyqXAWLVXCLoYplyKP1YrQ3OwaNrt6VV5WCXAEldCcEYPWOnZcRE/NQ5vZkgwgrC8Hr9+kBK6VRcU1yaMAzcPPmveAN2a8DsYMac/6aNy7L9a6JnTOtaLpXs/EDj2AWBLMU6+kUajw+wfHa4gxVu//b6BjUZV2M; 25:1wV/nEQD4JO7vVTZjC7JMS6peKlkiKVKcLFDlUjhVJoYYGbbUkT7Scyfn6FUMoQTTWWsxKu/tHJL9Xpvh0c9tAhn4tY6oyUZcDUZ/E0EVLLVXZ8rhKO9PoFNDmpcl10Q3AgDAzUEZ0lR9OsTe/0Va62uaLHs31/qeTZ/pj3Bv4keCgHNard9ZLiRSKIJc4mnveweFrMSd92gtfspDpcX3+7BncwxqxgnJlz6bdsGGKELJWzz0Qo4Y7mQj5HnZABv0bkri/aMAvN3rN9o6lAope3h5cq9mJQUmswXsONMNg6KHvB3oqi/WQ64c+P7TfpTWnM84xdjRqc1a6owwRWJeuPPZawNL+wk4ZSQFLy7boxRb8S91uL1oVa2E4YzIIUEGA0yPejk+HTaitLFLelxvWondCYzKKkcHmId1hP+7YsKWh4NsqIOOW4i62s01tt/KYfBnDg9jLDMUzqIPRIK9Q== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0747; 31:oHqiDX4Ug+hH5Ep7/K6Fw4NIMrCHEasmHGvMELMUTQiIck5cGC9XX6JecC5VHX/4Q/6sXdL1ayf+sMBL1+Z1lyQwx0PYNVU2euURc1oRETsb8TK35nnQe5L9dtu7Xpv8zLKMSlAaCjAan1/7EjuuiZJq+pOuXp7JYI+nCYiAaM46CnM4uB10xxQ6NTvWRxXfQjREbwFCUVPYCzbwam8PKdy4g4v5nAjBhuUw2/0MoVz+utZnULAY3P+VlkM/Tikdsn+HnxiTMxsypE7fCg42sDgBhwac4DnJVK/tfe9qZ6s= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13017025)(13015025)(13024025)(13018025)(13023025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(20161123565025)(20161123559025); SRVR:CY1PR0301MB0747; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0747; X-Microsoft-Exchange-Diagnostics: 1; CY1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Lm+QAIWnQ6XUk6Ayz/lioJZWUMG9W7q/IH8zubGOA58= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0747; 7:aVp1yRm7zoSfSNersy+IMbWnQ/6MZiGOoXLMIF5jlm4EhMeFP7kOTff2PybchevPKwyiTzXMWi9v7KIwqwvIlxbi4ipjkKC7jQBqVTuXcbnbmDs2svlnTI1BmpSj48jkZZ0vSLwBU0ny7vNQKUpTaI22ixAgeOt/Rf3C+tX5FDwQoUSVc4spgFFSpZ8P+P8nZmfYKQLNP1MdzSrIYol7bJznpz12O3XSfBtsFodqnQ3NlYMS+mp0CGS4Gj4GP6R0hfqq/bXkTnATy5PLktcAtnR3yJhsrztA3z8lah7orpSwtdpCsKh8vgLZgbwvlOBu2MSu1RWuHhdKU9AifdqPs5e7942P/eudjF8JvP6m22QTQ6gHuc6xCv5vGq/ApwOMI64NxYfWlXoQxiGONc/AYAq4DEjrZAg9Z4z0eLOd4HZUnwe1sAOeseJ/ilu6/GvvtxjfxogVZ+pXdU6zWtsijw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2016 07:28:59.8705 (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: CY1PR0301MB0747 Subject: [dpdk-dev] [PATCH 5/8] crypto/dpaa2_sec: debug and log support 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, 05 Dec 2016 07:29:03 -0000 Signed-off-by: Akhil Goyal Reviewed-by: Hemant Agrawal --- config/defconfig_arm64-dpaa2-linuxapp-gcc | 3 ++ drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 10 +++++ drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h | 70 +++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h diff --git a/config/defconfig_arm64-dpaa2-linuxapp-gcc b/config/defconfig_arm64-dpaa2-linuxapp-gcc index cc202ea..5338010 100644 --- a/config/defconfig_arm64-dpaa2-linuxapp-gcc +++ b/config/defconfig_arm64-dpaa2-linuxapp-gcc @@ -56,3 +56,6 @@ CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n #NXP DPAA2 crypto sec driver for CAAM HW CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=y +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 46e3571..83b9b61 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -48,6 +48,7 @@ #include #include +#include "dpaa2_sec_logs.h" #define FSL_VENDOR_ID 0x1957 #define FSL_DEVICE_ID 0x410 #define FSL_SUBSYSTEM_SEC 1 @@ -60,6 +61,9 @@ dpaa2_sec_uninit(__attribute__((unused)) const struct rte_cryptodev_driver *cryp if (dev->data->name == NULL) return -EINVAL; + PMD_INIT_LOG(INFO, "Closing DPAA2_SEC device %s on numa socket %u\n", + dev->data->name, rte_socket_id()); + return 0; } @@ -81,6 +85,7 @@ dpaa2_sec_dev_init(__attribute__((unused)) struct rte_cryptodev_driver *crypto_d * RX function */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) { + PMD_INIT_LOG(DEBUG, "Device already init by primary process"); return 0; } @@ -88,20 +93,25 @@ dpaa2_sec_dev_init(__attribute__((unused)) struct rte_cryptodev_driver *crypto_d dpseci = (struct fsl_mc_io *)rte_calloc(NULL, 1, sizeof(struct fsl_mc_io), 0); if (!dpseci) { + PMD_INIT_LOG(ERR, "Error in allocating the memory for dpsec object"); return -1; } dpseci->regs = mcp_ptr_list[0]; retcode = dpseci_open(dpseci, CMD_PRI_LOW, hw_id, &token); if (retcode != 0) { + PMD_INIT_LOG(ERR, "Cannot open the dpsec device: Error = %x", + retcode); goto init_error; } sprintf(dev->data->name, "dpsec-%u", hw_id); + PMD_INIT_LOG(DEBUG, "driver %s: created\n", dev->data->name); return 0; init_error: + PMD_INIT_LOG(ERR, "driver %s: create failed\n", dev->data->name); /* dpaa2_sec_uninit(crypto_dev_name); */ return -EFAULT; diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h new file mode 100644 index 0000000..03d4c70 --- /dev/null +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_logs.h @@ -0,0 +1,70 @@ +/*- + * BSD LICENSE + * + * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. + * Copyright (c) 2016 NXP. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Freescale Semiconductor, Inc nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _DPAA2_SEC_LOGS_H_ +#define _DPAA2_SEC_LOGS_H_ + +#define PMD_INIT_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) + +#ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT +#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") +#else +#define PMD_INIT_FUNC_TRACE() do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_RX +#define PMD_RX_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) +#else +#define PMD_RX_LOG(level, fmt, args...) do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_TX +#define PMD_TX_LOG(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args) +#else +#define PMD_TX_LOG(level, fmt, args...) do { } while (0) +#endif + +#ifdef RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER +#define PMD_DRV_LOG_RAW(level, fmt, args...) \ + RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args) +#else +#define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0) +#endif + +#define PMD_DRV_LOG(level, fmt, args...) \ + PMD_DRV_LOG_RAW(level, fmt "\n", ## args) + +#endif /* _DPAA2_SEC_LOGS_H_ */ -- 2.9.3