From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id 6885EC400 for ; Fri, 13 Nov 2015 20:14:34 +0100 (CET) Received: by mail.mhcomputing.net (Postfix, from userid 1000) id E04A71A8; Fri, 13 Nov 2015 14:14:33 -0500 (EST) Date: Fri, 13 Nov 2015 14:14:33 -0500 From: Matthew Hall To: "Ananyev, Konstantin" Message-ID: <20151113191433.GE25051@mhcomputing.net> References: <1447397258-27233-1-git-send-email-mhall@mhcomputing.net> <1447397258-27233-3-git-send-email-mhall@mhcomputing.net> <20151113114402.GB15612@bricha3-MOBL3> <2601191342CEEE43887BDE71AB97725836AC8840@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB97725836AC8840@irsmsx105.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 2/6] rte_log.h: add detailed log levels RTE_LOG{FINE, FINER, FINEST} X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 19:14:34 -0000 On Fri, Nov 13, 2015 at 11:48:41AM +0000, Ananyev, Konstantin wrote: > Actually another question: are existing 8 levels not enough? > Konstantin Depends who you ask. I was modeling it based upon the following: https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html The reason I added a previously-merged patch for a new function rte_get_log_level() and all these extra levels is that it allows me to do crazy stuff like this: if (rte_get_log_level() >= RTE_LOG_FINEST) { rte_hexdump(stderr, "header_bytes", packet->header.bytes, packet->header.header_size); } It is extremely valuable to have levels which go below INFO, so you can make detailed trace code compiled directly into your app. Which can be readily enabled or disabled by setting the log_level. WAY easier to debug the early green-field code in your app when it crashes somehow. Obviously the first thing you guys will say is... "BUT THAT RUNS WAY TOO SLOW!!!!!" and you might be right if you are processing 100 gbits/sec. But I am using DPDK for security not for SDN switching or core routing. And my patch will not introduce any performance change for the guys doing the other stuff either. So if this patch is not accepted in some form, I'd be stuck with my DPDK fork just for this feature, and the pre-existing patches I sent to Bruce & Co. regarding rte_lpm and rte_lpm6 expansion and so on. Matthew.