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 4B97FA0A0E; Tue, 11 May 2021 15:21:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35DD140697; Tue, 11 May 2021 15:21:26 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 1F81A4003E for ; Tue, 11 May 2021 15:21:25 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id BFF437BA; Tue, 11 May 2021 09:21:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 11 May 2021 09:21:24 -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= WqEy7mmymAcr9u/aXtkEZLHZ/7VNoWNfTN1P9gw7pRY=; b=TTaN/NzDsBkfzNMP P24t3ICsgYPmWDi7bXpdrGbTD6Y+yZa0NWtZeE28JNVqHrUMKPCKux+vODdMLr5x pQVy66E+x+iWrtwUKhJdCoFkrflTWeTARr0M7AZgLPhAgULOG3k+BawVZLJ0+JrG klxlVidtzYcNhD69PrBJQVcc9Pe3Sh03G++YjtJKHBXvPe1+Qessk15fHsgsLONI RfzL8TPfEbM3rHQRYLKVRWT5UzIJfr0ulxKdu5GNtCBAZiOH0b+TPh3m20IfTEmQ sZQ20SrH6QgE+U+XU6ruramvDYegS84vCaa8TD5Z6JTBMfOKjhdJV/ifgd9t/Q9e F+x2LQ== 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=WqEy7mmymAcr9u/aXtkEZLHZ/7VNoWNfTN1P9gw7p RY=; b=gc4eyoRpJqtKFMDaIfGjCKt0m29FyFAdsG/Sg7+DnyMbaCVN7pCrm3yHz JGD++1OExC71TZeY2aXzjnuty1N1qPCFDWw6PC6fbGLYvVd/ZMp3pWFnd5FOEk5J eMItR9uD49JIYuy8tMrBbILcLapdCimW4pZdsw4NZTHystIIqISlUEUq21VHPqFo j7zwXLwhl/GxNaf0z564KaprHs6iV4exdCHjOXDu9LpvLY75WSDxEPc8prMyGVnm 1NSg3AF1C6dOOARF9HrvnFE1ZAbz0ZokHCzpcv2/HlQkbZWhKHUXC1jQ8i0RmPeS lVHbGBABAViCGKPTV0QCPO1K0WB4g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehtddgieegucetufdoteggodetrfdotf 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; Tue, 11 May 2021 09:21:22 -0400 (EDT) From: Thomas Monjalon To: David Marchand Cc: dev@dpdk.org, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@intel.com, Bruce Richardson Date: Tue, 11 May 2021 15:21:20 +0200 Message-ID: <5939059.kBYEBI766i@thomas> In-Reply-To: References: <20210409124334.24479-1-david.marchand@redhat.com> <20210511123810.1458374-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] log: register with standardized names 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" 11/05/2021 14:52, Bruce Richardson: > On Tue, May 11, 2021 at 02:38:10PM +0200, Thomas Monjalon wrote: > > From: David Marchand > > > > Let's try to enforce the convention where most drivers use a pmd. logtype > > with their class reflected in it, and libraries use a lib. logtype. > > > > Introduce two new macros: > > - RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is > > used in a component. It is associated to the default name provided > > by the build system, > > - RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used, > > and then the passed name is appended to the default name, > > > > RTE_LOG_REGISTER is left untouched for existing external users > > and for components that do not comply with the convention. > > > > There is a new Meson variable log_prefix to adapt the default name > > for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes. > > > > Note: achieved with below commands + reverted change on net/bonding + > > edits on crypto/virtio, compress/mlx5, regex/mlx5 > > > > $ git grep -l RTE_LOG_REGISTER drivers/ | > > while read file; do > > pattern=${file##drivers/}; > > class=${pattern%%/*}; > > pattern=${pattern#$class/}; > > drv=${pattern%%/*}; > > case "$class" in > > baseband) pattern=pmd.bb.$drv;; > > bus) pattern=bus.$drv;; > > mempool) pattern=mempool.$drv;; > > *) pattern=pmd.$class.$drv;; > > esac > > sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; > > sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; > > done > > > > $ git grep -l RTE_LOG_REGISTER lib/ | > > while read file; do > > pattern=${file##lib/}; > > pattern=lib.${pattern%%/*}; > > sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file; > > sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file; > > done > > > > Signed-off-by: David Marchand > > Signed-off-by: Thomas Monjalon > > --- > > From meson build viewpoint, > Acked-by: Bruce Richardson Applied, thanks