From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0043.outbound.protection.outlook.com [104.47.36.43]) by dpdk.org (Postfix) with ESMTP id 9EB371B2F3 for ; Thu, 16 Nov 2017 11:33:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GDtvkQn6vEyozqYbJzkCKhGruepDUUAf21IVQIGLn+E=; b=URWPsE6GAeJYiQtMFCV+M975zj5lBF41FITtim2PiWoH4lZkM08asNT/PJjJMRFycaEd/r8D3dW2Hv6itzl4GcsFlFFWEaZby+6WORi744uX6fIlC7xbrmevawLw8FEZ7vWoN4FxeiTp2ZnjvX+i1CWkipFuSSoo1G7wVWHTwSA= Received: from localhost.localdomain (103.16.71.47) by CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Thu, 16 Nov 2017 10:33:37 +0000 From: Pavan Nikhilesh To: olivier.matz@6wind.com, thomas@monjalon.net Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 16 Nov 2017 16:01:44 +0530 Message-Id: <20171116103144.4197-2-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171116103144.4197-1-pbhagavatula@caviumnetworks.com> References: <20171116103144.4197-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR01CA0087.apcprd01.prod.exchangelabs.com (10.170.138.141) To CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4893d774-8d62-4c5f-d231-08d52cdd80c0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258); SRVR:CY4PR07MB3463; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 3:AJIX1t7FdR4Q2cSv8xkzGA+NjPPc2thYnoYzzGbkBG0vNRukm5OWbCSJzKYduz6X+fPoBDCFp9KGIU2tPccvWnk6zfu6Xwpq5YBBNH/GtPvBesOp5B1m4mDcvq+Wl1tgojrBjTFhRgdL30bENzQOGJ/Q8aqfDEVBQgTlAnUTMvsIcwdmy06co7UZoSzJTmUQdDYCyzBOJ9XBIHzm+aNMHr+OBuWyw0w484psoz4tyUrxpk8q3AfwofKOKZ7TQEZs; 25:gyxqA+AXGCzn7lkOHuBHILy4OT8xD2csQWlfzMzjBSL2TxvD4nxmLl+zDggk2A0kS8fHX/ZPm976f8R3OQ/pED6Cc2qt6frDKTl3d6VCxQHevVd1SyUWNbEIsrc3k5U2mv3lU7EwX9k7733/ZjuUFLf4Pm5SO9kXt+H1kaUTZWEDqpzTl8qo5g0kDSPJZKovYpHRLmG8Vu2t4kADvUxlHmzUFGRxqrUrG3uXrY5FmMM/4apY9XICWybQpofRNmNMr5uAnjkq7fUONNA7nXOQT9ysI00tO83H0TKon+wduiS53jMpYJJ8ceDtmSdQP3t0EdU+8TegvIQPJ1qryu5j2DiLcev7z3Odqdgyl6Pypig=; 31:w8QMsPMC0Cbbl57saLh6iVRREHTHlrKhFFGPWrYoavcQjX/44fEEDAHd1/kYrfB6CgiecG6nM05cjsLPKRNF9Ix2/fVHDNuKBPKRadjIJ1odShOytlzSyPofuE/mm8JK5aeU9lcVcZ9AlgFglUr1tSd9CyjoxupTB8hB2bjXApM1dVMYsEYc0X3KFt2vTe3BPWh9Iz0ISW0X4pVFi6T/DXgXpSbXRgdAcmdjVEUJZfg= X-MS-TrafficTypeDiagnostic: CY4PR07MB3463: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 20:xoWq0rQTCrO/hW+mIWNbbTDAnU2oHrYIK4bfVkVPhdci9Hoowo8CzH+PzAvtr9Cr0Np0K1Da0aty22erZ07pe54qQ4u5obcHE6YkqavuJXRSHcfMUiausmAjOR65MzzAmJDEWGnfm0zzEtM5nAgDKZss8rXeGVlO3aUaUexw2tKlC4pRyaUeAfHd2L53ZynQXUYGz9qJDldm1rFiHD/fzdkqEjPPCJpuMJe9Jf8gqsuv5eLOo4S70FpPUt/ubv5rBzo+8zeOlCnOJvsARCpsAqCugNd/xGnuXvERm/2RThTwaH5cekr3HrYAQNC5KMzZ9kDrGTSptYZ2c5xFirXRpiQJamhQzg0lgqnfCoo/UpE3dVy6r3Sq3w6nGWld0trUri3+SvkYE6ads7YdXD8Mya6MrwyhyHHuxEjmAQH8o/ygLedrRNcBPpcxl6x7gE82Mjv17PVyFmg2uT5stmh3Cpz2MQa8eFoqTrSJ0zvSz5cw9IB/tFXw3uvyFbpNO1cb9OV5bBZhB+PgcnDYUUNLRcB1YkNI0a1PAVvZmejDCZt/n8DXKqaiQR8ag0BfnvzwH0utqW8c7ZzNO37wy5qbyr9fsM47Fa7leQmBfeJipf4=; 4:d9n0+wrdap9CZBURti/2Ll/Te0DmQs3Kvx/UBmINwQFu7MOd+EEBWOjcbUc5hZ6VxP0d4tQh/neh3r/Gq7RXx8xidtfKycDNfPQz5SfCwaahwfBv515jY7rxwRWORDYnHS6EDf+dKesydlE//veN1bcv+7fnWlONFI/cztr6ZOMuj+xpriXOeTrM5Xr2Ql4WVqTO3gVm2L2RXZzBwV9DZdILvOjNGs+BiR5qDn+iejOZW5vXyNJiy1i7vIWvrappp70OpXAqiRzmTR3zgX06nw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3231022)(3002001)(93006095)(10201501046)(100000703101)(100105400095)(6041248)(20161123562025)(20161123558100)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3463; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3463; X-Forefront-PRVS: 0493852DA9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(199003)(189002)(105586002)(50466002)(47776003)(6666003)(189998001)(5003940100001)(2906002)(7736002)(305945005)(16526018)(25786009)(316002)(16586007)(97736004)(8936002)(68736007)(478600001)(42882006)(2950100002)(72206003)(66066001)(5660300001)(1076002)(3846002)(6116002)(107886003)(53936002)(36756003)(6486002)(50226002)(4326008)(106356001)(6506006)(48376002)(101416001)(33646002)(81166006)(8676002)(81156014)(6512007)(50986999)(76176999)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3463; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3463; 23:gBX5vDtMIDXRcun6QydgI6VgpEYCb6+dzopYSHbnG?= =?us-ascii?Q?/zcI4ZFDOqnljTm4zRF0CELw0DtMuCUtJCCc+45YK75LpjjB7S43VmNv2H3e?= =?us-ascii?Q?vBoKjLnLd9HEA6IUf5X0SIzL9CPf1QXM9rn72cwClpKDdgbF/WjCCd1lZayG?= =?us-ascii?Q?XxRoxvntxRm5CYjnwqCB4jZUqqWKp3+xIHEVdECoWPdxVmz83issQwecPpz6?= =?us-ascii?Q?3UJY/aIzwz4NYC23yb4NJ72X+V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?Q?fWYcWzvQMtRIZnj6Y+3mq/rWkLmDSpt?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 6:g6kkcVQRvxwgmHmiIcVXoj75XgoBxBilgDc35EJ1kQQQBQyNaerj+8nw+4mhn+3YwxQst9Pl4GG5O9Gc0VREOtkBOEf5p9RyFARNu9n1s0D5Yqa2GHbaIcXXCIP4RQRRpYa2oXxe760WjMNC+CZyDimt18gzLqHHcFax1EH0LKa2Hi66xOn45iTmBw48op9JF/n5p8pywAzOyZ0CbNqL8U4oQM6JwQ6E2NjgVabvxTPyu/He2xON3uFL7Q8agAySqEpYe82UwbG1t8gOqQQtydQdaO71yOVF3qYxEJ0LK5n4KETIMY9sR12FZE5v/L4OyUbimZl6jEXHLVDkbyj+j5kswqwGlQbAYxoa9p1esW8=; 5:hyk8gHX67pQcNs56If4rKC9AfdKzEBjPhOUEwQvnsVOFmXSk08NBMfxfV1rWL1WDQg80L3zjRu6AdawPYd27/Os+Kr92FHn7LPobP/YYTb1XS454nrGUeXE5I8ApJ/Zc+Nw7125w0mcolyrNTdstiCJ0x9JRw03eG9ZN0ZSf+2w=; 24:mAqr+6DS7wpa8xP+vqiVVXf2cB4MBbmiApniOJJM7cLjDg4hVTc6bMqKmO64GP/degeMHILNPuzDxOWEwwwQISJhBKZtsSWOsYlwiZph1+o=; 7:Tp0xU0I9B4TLjLuuRLoRoAGtlB9RkMXgMlYgJ6l4ugr74bqgOAkexz/gnUu0DzaAKtpwscsbILeAsXtQPjjudeaM/47LU+pzz/e8BuFUYA6cPXiUjUL90gZnxwOq8J11EcFYyQpClHI3iCWIIpDTudsLVvV+XA4pyd/JG/Swlz1KCUp545P/Iy3LPwVxXJ28M1YRfAikVop+8O7A+cO2m45gpjkKfc5sXTzxd1wfxFfLvGiuRnKBXB80KsEjQWvC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2017 10:33:37.8245 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4893d774-8d62-4c5f-d231-08d52cdd80c0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3463 Subject: [dpdk-dev] [PATCH 2/2] eal: fix dynamic logs failing to print 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: Thu, 16 Nov 2017 10:33:42 -0000 Dynamic logs fail to print if the global log level is less than dynamic loglevel. Example if the global log level is set to INFO and dynamic log level for a specific module is set to DEBUG then the log fails to print. Check modules log level before checking the global log level. Fixes: c1b5fa94a46f ("eal: support dynamic log types") Signed-off-by: Pavan Nikhilesh --- lib/librte_eal/common/eal_common_log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 061e96ef9..e31099d1a 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -336,12 +336,12 @@ rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) } } - if (level > rte_logs.level) - return 0; if (logtype >= rte_logs.dynamic_types_len) return -1; - if (level > rte_logs.dynamic_types[logtype].loglevel) + if (level > rte_logs.dynamic_types[logtype].loglevel && + level > rte_logs.level) { return 0; + } /* save loglevel and logtype in a global per-lcore variable */ RTE_PER_LCORE(log_cur_msg).loglevel = level; -- 2.14.1