From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B05EA0A0A; Tue, 23 Mar 2021 19:43:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD7C540683; Tue, 23 Mar 2021 19:43:33 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id AC6DE4014D for ; Tue, 23 Mar 2021 19:43:31 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 9A3781096; Tue, 23 Mar 2021 14:43:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 23 Mar 2021 14:43:30 -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=fm3; bh= m9U5vwRmn0Sc2pX/0n/hGNQzz/m4r3NW5jaL0cuO3wM=; b=aAxD1ZN2fdfKJkZU 6nOyaWUwR4496sYjmljo3nTrlr4AAH34ZOpgaDn0qnBTEcmExE4LuEDsIHLZkmpj mr3owA7ZN6teKBiLHfwKSEW93dktMK0GmQgRWo8vbo7tkyw/zuF59nebARt6iTgH rlSfcB475/rAf2iHDJLm2lVjDomcGK9QVy16VEBNKqf+8UOAjlINH/5PYHrddgFZ kNfWuFgVzmT49wbrpGsI6GY0pcsBY9VvGMwQjP8c20ukI9nWUeBWL+38UZVKz3nN INAULeM+V94LX52/kUE8TjPhgud+emGTxXlCXAkxpD956tU7mesVltO3M67JJtoB pkD73w== 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=fm2; bh=m9U5vwRmn0Sc2pX/0n/hGNQzz/m4r3NW5jaL0cuO3 wM=; b=vcQVG5ClQHGVMomVHWS+uYRYRmc5YSw2A80VVVxrwG3p1LZNibWjx4D4W HGnokADMdHLSUtnxehQqcYHAiVWzFhOhqTz+oLSSVOMxf+hojrSq63YJK0Akmk8L VYUz1XPXHLGFOQg4ZxMRH1w95iTrLd+kEjv/7RSRwEWmSRVDLC2UKucBTp1Htdy9 ByFz7nqfj9LjDuDCAGMzpfUqT3gn193lGa/1JMsHW3dIPzLY8IpcxqW6fuK2ufqk 0RKoY4gXR89WgP7yDoaX4j9QJP2pi8ucwCmfECgZC/JINTeI4sVdleP2ejWaInTh moWv/quapGFcVXxJ8ZFceN25DzuQw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegiedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth 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 0F7EE240356; Tue, 23 Mar 2021 14:43:28 -0400 (EDT) From: Thomas Monjalon To: David Marchand Cc: dev , Andrew Rybchenko Date: Tue, 23 Mar 2021 19:43:27 +0100 Message-ID: <5444410.DN1dmMcrS1@thomas> In-Reply-To: References: <20210310140107.2730088-1-thomas@monjalon.net> <20210310140107.2730088-2-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 1/3] log: choose EAL log type on registration failure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 23/03/2021 19:22, David Marchand: > On Wed, Mar 10, 2021 at 3:01 PM Thomas Monjalon wrote: > > > > In the unlikely case where something goes wrong > > while registering a log type, > > the fallback is to use the log type 0, assigned to EAL. > > > > Signed-off-by: Thomas Monjalon [...] > > { \ > > type = rte_log_register_type_and_pick_level(RTE_STR(name), \ > > RTE_LOG_##level); \ > > + type = RTE_MAX(0, type); \ > > } > > Hard to read and to grep, can we use explicit logtype? > > if (type < 0) > type = RTE_LOGTYPE_EAL; Yes I agree it is better because we can grep the explicit name.