From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30073.outbound.protection.outlook.com [40.107.3.73]) by dpdk.org (Postfix) with ESMTP id 24FA25F2C for ; Wed, 17 Oct 2018 12:10:36 +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:X-MS-Exchange-SenderADCheck; bh=vZWkb2t9FgaZCEMw2MW+8w8UCzATqYv/P/7RXy2GtyE=; b=fgUQjyN0VJOIaDFHZ6dQBX9zFkDo1gij4CVqlGKroKfgh9w684J7EydwA2WZFqR5uC3HJTBcMO7fX14fpoFa35L2FvOfUmeuGUDC+xgQzwRgVWkHNdgw4JA2a3klffhm47cM4eNeEuorct6sXA66/zCiJp2aC8+flMfpvB6AlIw= Received: from VI1PR04MB4688.eurprd04.prod.outlook.com (20.177.56.80) by VI1PR04MB4974.eurprd04.prod.outlook.com (20.177.49.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.25; Wed, 17 Oct 2018 10:10:35 +0000 Received: from VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::7988:5f2:be74:bf7a]) by VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::7988:5f2:be74:bf7a%6]) with mapi id 15.20.1228.032; Wed, 17 Oct 2018 10:10:35 +0000 From: Shreyansh Jain To: "thomas@monjalon.net" CC: "dev@dpdk.org" , Shreyansh Jain Thread-Topic: [PATCH v2 1/3] common/dpaax: reduce logging level Thread-Index: AQHUZgGkJ+Jbm7hRiE6+co8A9hcs7w== Date: Wed, 17 Oct 2018 10:10:34 +0000 Message-ID: <20181017100954.18284-2-shreyansh.jain@nxp.com> References: <20181017091151.15017-1-shreyansh.jain@nxp.com> <20181017100954.18284-1-shreyansh.jain@nxp.com> In-Reply-To: <20181017100954.18284-1-shreyansh.jain@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.142.187.166] x-mailer: git-send-email 2.17.1 x-clientproxiedby: BM1PR01CA0088.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::28) To VI1PR04MB4688.eurprd04.prod.outlook.com (2603:10a6:803:71::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR04MB4974; 6:+vJJZAlmzIxm5cv4YfODMC74PRPS+sgzzaQfpsR7/e4a7n+xaddf9JdE5Kj7B8PVizpzQcZNZvhsKtHbDzQm03n0FxbpYSG+duYLqlLe1LaFgcg2Emc9rwmOKX6jeE4TR+AtmYBV65aKK6cwzxNyBh+e4/LTMxfLyZO+GF9p0DXupklgBR8azmuTvZHfuIAaTxhjdo4sMfc5xeOgM+i/Fekv9eit7SleK7qUX82afXk3Qk1fXrMjkFiKJGGV8Gpry5cZHTmzy8bXjTBBud2MOr+TkVQLBl+GHuQmzL2HySHev+d+zxdZyWJpg2sW7d6ygMwIxkMaVRFQ+D5l2ROTB+4QSxsWCGDTYgFCMCVrccqxyiR7Ccimd0h2P3FLFu/tYYvA+VHUMuJ/6YwpiYQBbqTTVPQbrkQBrAepclANOtBwLfGKXiziHGR+CjJbDlKcFvPKv/gpMUvokooeQgLDkw==; 5:wHTCuDjrpyircmcgMcHvgLupClbgjIeN50h2/md6wocSHSxHnHS37eKjoCtlFjc3oHEC4LW4LQH16w+9kbc5a3Fj1hW2W8ZCHxJDVzDhGrHE3yfS5RVrXZ/saeYmdjdTs0Xz4KfgmzXJ5g/4cCQrXdizd2R15NJ4ivOo6W8kYdM=; 7:CjAGGg6ifDPUBN1neIy9gH86+7XVZXf+1otUPN/wUbFEw7cfq9kP9KjFiuTlQNohPlk50VDs13zluO39ZMCNUp8wzR7T6KnAPoD5PlUE6nM2tVt8BmQj+/J1rKHWUsRyAliVlKLx5ortphjMT42WCUwzNDce3YOb6D+QJ+yu3apu8k2vmrYcnvTAMnh9y/LWE4ZRnd2ftgFWs7icbshQr+8pGBTMoLhY5EIXkcu/OOul7Ra2+qGbjS3uSF8IFQts x-ms-office365-filtering-correlation-id: bf48b7ae-1afd-469e-5c65-08d63418c735 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB4974; x-ms-traffictypediagnostic: VI1PR04MB4974: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:VI1PR04MB4974; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB4974; x-forefront-prvs: 08286A0BE2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39860400002)(376002)(136003)(396003)(199004)(189003)(476003)(6436002)(36756003)(6512007)(6486002)(71190400001)(446003)(186003)(71200400001)(2616005)(5640700003)(11346002)(54906003)(86362001)(2501003)(26005)(97736004)(14444005)(102836004)(256004)(6116002)(5250100002)(3846002)(316002)(99286004)(478600001)(4326008)(25786009)(386003)(486006)(1730700003)(55236004)(52116002)(14454004)(53936002)(7736002)(1076002)(6506007)(8936002)(2906002)(105586002)(8676002)(106356001)(50226002)(2900100001)(76176011)(2351001)(78486010)(81156014)(44832011)(66066001)(305945005)(68736007)(5660300001)(6916009)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4974; H:VI1PR04MB4688.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 9L/jgx14N653nDlA+Su1BLPxnU66o8/ZONOMff6zCzWgAeXzBLvS0esIuWxsXHKqsKu5tyit6lxmuM3mEAyfnf62XOMki16Bz/IHrU2aohWH+Jv8EvukhtDWhd5UqvblSHseG2DdQHSYYNnZzG4qQbNS4KL/+oPMlyu0at8f1q4frkk6zJdrb1XsI3j9I2n2z1Y+J7jJAXsG7PfckDuGLLOjoJheyxyKpdJ6BTe9WfmHwtQQGBXOsd8UWIy4MpElAj3Pl59rQCXUx2WkQiovdoALyXtTn+dDpZBjkLKFmoFEaf80uHaCg6iE3DY35RNVlBGfT09iPPKr8Xg1jtrntvP+UP/XTvasGI4DsSPOq2g= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf48b7ae-1afd-469e-5c65-08d63418c735 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2018 10:10:35.0449 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4974 Subject: [dpdk-dev] [PATCH v2 1/3] common/dpaax: reduce logging level 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, 17 Oct 2018 10:10:36 -0000 DPAAX is a library used by various NXP drivers. In case of non-NXP environment, this start spewing message about unavailability of necessary environment. This patch reduces the log level for certain messages as well as reduces overall log-level. As a library, these message are not necessarily relevant at higher log level, either. Signed-off-by: Shreyansh Jain --- drivers/common/dpaax/dpaax_iova_table.c | 35 +++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax= /dpaax_iova_table.c index 075053b1a..213f75dff 100644 --- a/drivers/common/dpaax/dpaax_iova_table.c +++ b/drivers/common/dpaax/dpaax_iova_table.c @@ -69,8 +69,8 @@ read_memory_node(unsigned int *count) =20 ret =3D glob(MEM_NODE_PATH_GLOB, 0, NULL, &result); if (ret !=3D 0) { - DPAAX_ERR("Unable to glob device-tree memory node: (%s)(%d)", - MEM_NODE_PATH_GLOB, ret); + DPAAX_DEBUG("Unable to glob device-tree memory node: (%s)(%d)", + MEM_NODE_PATH_GLOB, ret); goto out; } =20 @@ -78,8 +78,8 @@ read_memory_node(unsigned int *count) /* Either more than one memory@ node found, or none. * In either case, cannot work ahead. */ - DPAAX_ERR("Found (%zu) entries in device-tree. Not supported!", - result.gl_pathc); + DPAAX_DEBUG("Found (%zu) entries in device-tree. Not supported!", + result.gl_pathc); goto out; } =20 @@ -87,28 +87,29 @@ read_memory_node(unsigned int *count) result.gl_pathv[0]); fd =3D open(result.gl_pathv[0], O_RDONLY); if (fd < 0) { - DPAAX_ERR("Unable to open the device-tree node: (%s)(fd=3D%d)", - MEM_NODE_PATH_GLOB, fd); + DPAAX_DEBUG("Unable to open the device-tree node: (%s)(fd=3D%d)", + MEM_NODE_PATH_GLOB, fd); goto cleanup; } =20 /* Stat to get the file size */ ret =3D fstat(fd, &statbuf); if (ret !=3D 0) { - DPAAX_ERR("Unable to get device-tree memory node size."); + DPAAX_DEBUG("Unable to get device-tree memory node size."); goto cleanup; } =20 DPAAX_DEBUG("Size of device-tree mem node: %lu", statbuf.st_size); if (statbuf.st_size > MEM_NODE_FILE_LEN) { - DPAAX_WARN("More memory nodes available than assumed."); - DPAAX_WARN("System may not work properly!"); + DPAAX_DEBUG("More memory nodes available than assumed."); + DPAAX_DEBUG("System may not work properly!"); } =20 ret =3D read(fd, file_data, statbuf.st_size > MEM_NODE_FILE_LEN ? MEM_NODE_FILE_LEN : statbuf.st_size); if (ret <=3D 0) { - DPAAX_ERR("Unable to read device-tree memory node: (%d)", ret); + DPAAX_DEBUG("Unable to read device-tree memory node: (%d)", + ret); goto cleanup; } =20 @@ -117,15 +118,15 @@ read_memory_node(unsigned int *count) */ *count =3D (statbuf.st_size / 16); if ((*count) <=3D 0 || (statbuf.st_size % 16 !=3D 0)) { - DPAAX_ERR("Invalid memory node values or count. (size=3D%lu)", - statbuf.st_size); + DPAAX_DEBUG("Invalid memory node values or count. (size=3D%lu)", + statbuf.st_size); goto cleanup; } =20 /* each entry is of 16 bytes, and size/16 is total count of entries */ nodes =3D malloc(sizeof(struct reg_node) * (*count)); if (!nodes) { - DPAAX_ERR("Failure in allocating working memory."); + DPAAX_DEBUG("Failure in allocating working memory."); goto cleanup; } memset(nodes, 0, sizeof(struct reg_node) * (*count)); @@ -420,9 +421,9 @@ dpaax_memevent_cb(enum rte_mem_event type, const void *= addr, size_t len, ret =3D dpaax_iova_table_update(phys_addr, 0, map_len); =20 if (ret !=3D 0) { - DPAAX_ERR("PA-Table entry update failed. " - "Map=3D%d, addr=3D%p, len=3D%zu, err:(%d)", - type, va, map_len, ret); + DPAAX_DEBUG("PA-Table entry update failed. " + "Map=3D%d, addr=3D%p, len=3D%zu, err:(%d)", + type, va, map_len, ret); return; } =20 @@ -460,5 +461,5 @@ RTE_INIT(dpaax_log) { dpaax_logger =3D rte_log_register("pmd.common.dpaax"); if (dpaax_logger >=3D 0) - rte_log_set_level(dpaax_logger, RTE_LOG_NOTICE); + rte_log_set_level(dpaax_logger, RTE_LOG_ERR); } --=20 2.17.1