From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0045.outbound.protection.outlook.com [104.47.2.45]) by dpdk.org (Postfix) with ESMTP id 120F272FB for ; Wed, 25 Apr 2018 14:59:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4D8WfJHc6gzvRxigmP5s6Ws61Y/hT4lmIA9BABc1Q7s=; b=unFI5ncSHVhTO0+5vRe3w74+0JwzU6OShGTu4LRjZo4nvcG9BWdssJThJCYrzXudiMuUFhqM7bgbUj8Iu3aKyWH7XB6ldUKz27UeTsHyFhQM6PPvKoc0HN5OqFicmmbrHVA46NSDB2pHp+Dl0EQYrrS5S2aKBwDlhuEu9AHcASE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Wed, 25 Apr 2018 12:59:12 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, shreyansh.jain@nxp.com Date: Wed, 25 Apr 2018 18:27:02 +0530 Message-Id: <1524661022-21484-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524661022-21484-1-git-send-email-hemant.agrawal@nxp.com> References: <1524661022-21484-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0035.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::21) To DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB4PR04MB0765; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 3:ls8fFr9lhcNGOTcaX/14KymbbvtnPyO+AaHWj+tAEknMxByMXCOHCksN61ZbYmhbr8O7XIBPH77A490tuvaQBlUBSJLxNsoUtptMcZXQ6XlBScG3xys/8kcRFharLKkYnDkeVvk2UVamN1DVOMDIumSw0FRQCvmllkyNO3UuP8lj/1puULw+DMSBPO7BSgzGLIHeTuD+RvC5xjkyuovTUZu8clSL9wSXYhB1hTYibOqOwX3Tgpm+9OKIGh/uk2gM; 25:lwnduiceFBjn6iRI1aL/biKT0AlWgs5Cs+iCsqCXfH4wLCZsjKYTSdM0UpE7kHAnGGblvslCO69ee7DEbQ4qcRl6YEuQ/XmIbku8p4kAU/DnMSiTMV5i6nYwQ1Co1Ph7nP9dQRG4RG++RUlBqJNVEDrsDY3ipmTEnYnfqiKT4OUy5u5g31QnmWKFTfTdyLkGKSponGSzinMuGkNVLM9lzOvPOjcccuWUx4Xe2HwM6VM2HZ1FMaGv+h4/gJDIayOE1TsUiXFNWY/lv2jo2ULD+XwumMhsQ3wGhWGCLUk8PPRZrs4nzUyT8OdNDia86YLel7g5KCGtoD+INZwAmURGTaC3O1PdpQb76Duplasg52I=; 31:6yQYFRmxztxmd2YLA+rP5+BUZpR3HAQMx8gytJRDuJMcEPpIng+24U/D/yrdhFJw+Uq+WVDjgBRczMCUXtymCc/9rQ895SSFaOiC1aKgHdzLYKkPHsi7hCYlSzt56dRWk7pQJYMeAseTPrYJ77uqnXg8pHoa2l0g4bivkpiY3ICBxVW0zRVNUuFU1nf41fGsQ9Z4URUFdF/fPIJG2rbuak/hQS0m+bko3Wv9NhEZ2ZQ= X-MS-TrafficTypeDiagnostic: DB4PR04MB0765: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 20:Wgp0hPJjqTwwJGlpKaGHDZubl5bPr2L661IbXbGDMTj6BwDHidWFFSatxOmi+JYAW6C34u+5699pgwUcQ7mi92SHj+UofmviyJx8eYVb/g3HreDTtnlTsMJ3QyIiJLHlt095hv3Sj21Yq85ruC3SopDyi4HgwfK2h4ZHv+iYirGXlQnKv7WB5Z6ZLi7GN2H8Vnqbjl21DExvhFTzF+cpfBIX5w/tb4dHS41+b7ih2Yke0ya0op5ILAU+B1DuYboEa7RRELex3/6O3ehz+U4/Z+sLh1w5FKWzHwyM55arFg97g1ZTFEJFkOAkL8sYfDqNp16Utk7xIx0xCYdYxKMbE4/6t8AA6rA5rktH7vIXsZM9ks/urAcvj7VAnqpRlJHSOVkwEjCsyxl9hXaznk4xXE1U6tFYrihglwGy7VqIHCZTprYwAJBXQugkF7UupnvoP9bM8a8cgetZ1rZOcUPOpNYAPsj2ut4NElGSzrRnasywU5cdFPm3bsN/qCsb7RXP; 4:FXOc2+z2HTFkp9yD0wyPtz9Ik+8vUNWwt/0sRrWdpAEz54AT/AT90x1c0Z1so923jux1ycCKG3d7mo8cUdjmvsDM1ZaUsiE1S9Lp+4+WVOsI0avJfj1maKzClEGsY5mvZ3OXB2iX5fDuUXFBKcC08+jU+asL1BgUXzpKUDYH64tDB95OA/mnJiIIHDwnvGQunESKHWhv6VLss9j9y40q7SFAaMrRfgoH3fGcD5Dycxom6pe0sfzV0cFcCb7cg3uhFu0JaSCLHd35Ex4dF7EZxBuf9blfoy8i11+Pa7iGlbXBrx9BDVmfQYkl/wIANpJV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231232)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:DB4PR04MB0765; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0765; X-Forefront-PRVS: 06530126A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(376002)(39860400002)(396003)(366004)(189003)(199004)(3846002)(186003)(26005)(6506007)(956004)(76176011)(97736004)(2616005)(11346002)(105586002)(446003)(6486002)(5009440100003)(486006)(386003)(52116002)(2351001)(2361001)(51416003)(5660300001)(25786009)(478600001)(2906002)(44832011)(316002)(16586007)(50226002)(47776003)(6666003)(6916009)(36756003)(8936002)(476003)(6512007)(106356001)(59450400001)(6116002)(55236004)(66066001)(53936002)(16526019)(68736007)(4326008)(86362001)(7736002)(81156014)(8676002)(81166006)(50466002)(305945005)(48376002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0765; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR04MB0765; 23:3iKLg3RrqXlqNP0EldkiO/DmQga//HfRoKE+B4/Kw?= =?us-ascii?Q?NO1j6CWlIKN61Bjfsy50Xhc986rQbHfzkaJwtcsJsDEZ4TvjZLl2vooF8xkf?= =?us-ascii?Q?5ZdTGJLVgRofH+DLU9Yf+Ih3X5rqaXss6DnHZYLh+btXAZRuQGUEnsmFzWle?= =?us-ascii?Q?wPsCSq/Ypj+FWmZIiDNcItqAJJQ+uReS6Z/rXNe7URze9Qop/IiekZkPwsiy?= =?us-ascii?Q?YfXhil6ftXT/aQhR76vByhZ9xC41PfMUJo5ux26FTDO6c4H2HZEc2DCr3MGq?= =?us-ascii?Q?6JbIoRaw0hnKPwUX2XrUMeveOrREwpXRu5XlhzvQihWAwetdl/Q0kH04jfes?= =?us-ascii?Q?djytQO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VTSY4piFsYPk?= =?us-ascii?Q?5wTzTsJR4l7nadOcDHM9SQFRW0RfFW2DJ4pPgR6tjySr4B2uKWLB92mdnVN/?= =?us-ascii?Q?LfK3bSdQu4WIwkEfmV6YFpEsBXJsDJ792tjenz6aGtq?= X-Microsoft-Antispam-Message-Info: cppglMDPiJ+KOkEdspENFTqxBUG3obKBqlq8Hw2pREyIjMrFtouwHAooRGOXpG1e3qdSvLzXcBbqnuzSbY7U97RUX1li+e5WhDUk8MJH1JYr2M2GJUGgwiOgkUOm51WqkY1rF/XslyjYy/cNka00kFgV4dPTGMELjqpGosWmTWBtY2b9Ug9X9Zw+L9S6Uoni X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 6:IQ06DzvAyXGOFcwL81sUn7g1StYldyRCNcD9ekPUSowt80xXyFpr+s+BHsW3OqeFwvGgRFJXmecHuX2foqpAtSEiRdNuiogRMA+C0bjdS0VMnPnejsgQi4VjKlE7UDD5mRatvbcQ5vzZns2brbIsiO88IHyMI99MKX1wYtDMzyqRlouPTH0PrDZsAairkE/blcYIJzChNYNeOQmNJpdrGosCPUS2HcWzd+FsGmhF43jy4WQ0PgxdMnYtKHpJFUvFnLAAtwiyFuh8O4TwwXpqxESs9qc8xhfLSADxZIQgSpMKVjoMKULQ3ckKhQKDq4L1814sFpfs7aV9RMKQ7rjyf+JgNWdDNVlcVBT6pQp3+RhCwGraplINCGe7/6moG+Z7B8gVcyZyLm4TinKLNh6ude/4LmFgpleLK13J4a14JlwMaXQ6PE2xr96Q/a1BR2D/V1l9JUsh0du2H9LMryWz8A==; 5:++pyDnh75ZlAoipthfvJobJGL81/CwA6PS+BZMyA+1S3nSx26GSXRVN3STUlNtTCY8kOPXFNUdVqdz0B/V1lM7W2yUYYQVvJfki1RqD+CNcrygUOXyXh2L/FbtdwrjYDOuHE48YI7beYRDewPkjFRpuvSL34UEsKWGOTGEIesLM=; 24:sGYvvBtqRo9kvvPI+sjpZE34wyFmvB4T9gfSpNkdAGVDXZ7drplHt5Mj8OTU/4uN4hu2bdfS+6QgWS+0BcBEVn+GyL+ORkORP1W31TOgQHo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 7:RuN6P9inPLaGSJx4ZFAeSsQKfhV5YodrSEX3ei3j8dJ1We71TtkSZwbp4x5cDkWTF8dN6kTzlCYSrkUGXJDD+UcYDhDn/IICU5GJyXZm8MApC9kBk/u9ggf4h5xZc7QxYIACshVA20smGQeBdzh9RpK1L6uZ75d68E+KjEbhDciJygvHtmT7u4I6mMifOdZBO6qhnsaUd6rHmHWuzfUQ8yIjdvSmTGOYqQk3n1cViAbtbErQw3zNX75VUFIUi/mf X-MS-Office365-Filtering-Correlation-Id: d22eba93-9a23-4b1d-dad2-08d5aaac58a0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 12:59:12.7545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d22eba93-9a23-4b1d-dad2-08d5aaac58a0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0765 Subject: [dpdk-dev] [PATCH 5/5] bus/dpaa: improve the dynamic logging 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: Wed, 25 Apr 2018 12:59:16 -0000 Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman.c | 2 +- drivers/bus/dpaa/dpaa_bus.c | 16 +++++----------- drivers/bus/dpaa/rte_dpaa_logs.h | 11 ++++++----- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index be91da4..bdb7004 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -504,7 +504,7 @@ fman_if_init(const struct device_node *dpa_node) /* Parsing of the network interface is complete, add it to the list */ DPAA_BUS_LOG(DEBUG, "Found %s, Tx Channel = %x, FMAN = %x," - "Port ID = %x\n", + "Port ID = %x", dname, __if->__if.tx_channel_id, __if->__if.fman_idx, __if->__if.mac_idx); diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 2b85c9e..2046206 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -178,7 +178,7 @@ dpaa_create_device_list(void) memset(dev->name, 0, RTE_ETH_NAME_MAX_LEN); sprintf(dev->name, "fm%d-mac%d", (fman_intf->fman_idx + 1), fman_intf->mac_idx); - DPAA_BUS_LOG(DEBUG, "Device added: %s", dev->name); + DPAA_BUS_LOG(INFO, "%s netdev added", dev->name); dev->device.name = dev->name; dev->device.devargs = dpaa_devargs_lookup(dev); @@ -216,7 +216,7 @@ dpaa_create_device_list(void) */ memset(dev->name, 0, RTE_ETH_NAME_MAX_LEN); sprintf(dev->name, "dpaa-sec%d", i); - DPAA_BUS_LOG(DEBUG, "Device added: %s", dev->name); + DPAA_BUS_LOG(INFO, "%s cryptodev added", dev->name); dev->device.name = dev->name; dev->device.devargs = dpaa_devargs_lookup(dev); @@ -461,14 +461,11 @@ rte_dpaa_bus_scan(void) return 0; } - DPAA_BUS_LOG(DEBUG, "Bus: Address of netcfg=%p, Ethports=%d", - dpaa_netcfg, dpaa_netcfg->num_ethports); - #ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER dump_netcfg(dpaa_netcfg); #endif - DPAA_BUS_LOG(DEBUG, "Number of devices = %d\n", + DPAA_BUS_LOG(DEBUG, "Number of ethernet devices = %d", dpaa_netcfg->num_ethports); ret = dpaa_create_device_list(); if (ret) { @@ -486,9 +483,6 @@ rte_dpaa_bus_scan(void) return ret; } - DPAA_BUS_LOG(DEBUG, "dpaa_portal_key=%u, ret=%d\n", - (unsigned int)dpaa_portal_key, ret); - return 0; } @@ -644,11 +638,11 @@ dpaa_init_log(void) if (dpaa_logtype_mempool >= 0) rte_log_set_level(dpaa_logtype_mempool, RTE_LOG_NOTICE); - dpaa_logtype_pmd = rte_log_register("pmd.dpaa"); + dpaa_logtype_pmd = rte_log_register("pmd.net.dpaa"); if (dpaa_logtype_pmd >= 0) rte_log_set_level(dpaa_logtype_pmd, RTE_LOG_NOTICE); - dpaa_logtype_eventdev = rte_log_register("eventdev.dpaa"); + dpaa_logtype_eventdev = rte_log_register("pmd.event.dpaa"); if (dpaa_logtype_eventdev >= 0) rte_log_set_level(dpaa_logtype_eventdev, RTE_LOG_NOTICE); } diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h index 0fd70bb..e414354 100644 --- a/drivers/bus/dpaa/rte_dpaa_logs.h +++ b/drivers/bus/dpaa/rte_dpaa_logs.h @@ -15,10 +15,7 @@ extern int dpaa_logtype_pmd; extern int dpaa_logtype_eventdev; #define DPAA_BUS_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "%s(): " fmt "\n", \ - __func__, ##args) - -#define BUS_INIT_FUNC_TRACE() DPAA_BUS_LOG(DEBUG, " >>") + rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "dpaa: " fmt "\n", ##args) #ifdef RTE_LIBRTE_DPAA_DEBUG_BUS #define DPAA_BUS_HWWARN(cond, fmt, args...) \ @@ -31,7 +28,11 @@ extern int dpaa_logtype_eventdev; #endif #define DPAA_BUS_DEBUG(fmt, args...) \ - DPAA_BUS_LOG(DEBUG, fmt, ## args) + rte_log(RTE_LOG_DEBUG, dpaa_logtype_bus, "dpaa: %s(): " fmt "\n", \ + __func__, ##args) + +#define BUS_INIT_FUNC_TRACE() DPAA_BUS_DEBUG(" >>") + #define DPAA_BUS_INFO(fmt, args...) \ DPAA_BUS_LOG(INFO, fmt, ## args) #define DPAA_BUS_ERR(fmt, args...) \ -- 2.7.4