From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F1E39A04F2; Mon, 8 Jun 2020 22:25:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B6C62BC7; Mon, 8 Jun 2020 22:25:29 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 4547D2BBD for ; Mon, 8 Jun 2020 22:25:27 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5DBB45C009F; Mon, 8 Jun 2020 16:25:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 08 Jun 2020 16:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= LAxIx/mhxX0D+uAfdzrN7l142h6pRuaBa0bjHHlBIxw=; b=TEgKXdCBGenM3Lli JM5Usfv0T70l9y4En4jwe3BdwO3CToiosznHlBd9rt4J1jdIoz5klRqkD8b+1H18 Gv6fNOkyqgjJ317hkybytZj+WxoWfniRcvvQP0BopMu/sFSOHjJki4joaoacdner noUjpOO4exphUENnq2R+qPTOAGJSPRzuWMI7sjflVgtWITI1OddqzHJZfKeR8T3F DybqPIsF/taCK1JeQyKHEZCl5D9Oa0Vj94937WTlrPZxp/69xa4Q7mAgEhDEdle1 VerPlkOULlw9cR7e4eqkPk8tbJP51UEzFyJ40/2Ki3iIgm60fTTzhExlQ3obJQkE XscDPA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=LAxIx/mhxX0D+uAfdzrN7l142h6pRuaBa0bjHHlBI xw=; b=HA7NFgT87FbTtetU3z6+uc1a9y4uugqwHXNoxlYyLVTEEzV8hzGD2i+zy YrfyGKYSvA/WRQ51ZBV4iqCkEzIh/jZ1UMkGrUmC+6y8yaDW1HailbdorsQXtRBr nnWLCFDe4QVn+ctxLjaBkdbxktmSUeDQQ/9st4dQ8AT2aBVeGHy6oyR28cpAYH6n ltF9cXubJdCsA/sbFQCXb8FgAwCFgydoobzBCbTUqPFD4HFSiJfGeB+jPCn8Dond 4dNQmuBnPViM8NFtHkHTkYwMNTNXMuXgbWau3cEPYY7+qzE9faWCoqkjwdzfh50V exDMpDBGYKLiF36JU8gsnuBW9mn6Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudehvddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 31C033280063; Mon, 8 Jun 2020 16:25:25 -0400 (EDT) From: Thomas Monjalon To: Jerin Kollanukkaran Cc: Olivier Matz , "david.marchand@redhat.com" , dpdk-dev , arybchenko@solarflare.com Date: Mon, 08 Jun 2020 22:25:23 +0200 Message-ID: <2698909.XInfi7kW1d@thomas> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] rte_log simplification using constructor scheme 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 27/05/2020 18:05, Jerin Kollanukkaran: > +#define RTE_LOG_REGISTER(type, name, level) \ > +int type; \ > +RTE_INIT(__##type) \ > +{ \ > + type = rte_log_register(RTE_STR(name)); \ > + if (type >= 0) \ > + rte_log_set_level(type, RTE_LOG_##level); \ > +} We should consider using rte_log_register_type_and_pick_level() which works for drivers loaded later in the init sequence. I feel rte_log_register() could be deprecated. The other question around log level is about the default level. Do we want to allow having different default log levels per log type?