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 67CBA43BF1; Mon, 26 Feb 2024 19:04:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53687402B2; Mon, 26 Feb 2024 19:04:17 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 7803B40144 for ; Mon, 26 Feb 2024 19:04:16 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 66CD65C0087; Mon, 26 Feb 2024 13:04:13 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 26 Feb 2024 13:04:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1708970653; x=1709057053; bh=MkFArphsqiPKIELjyyzJmwfJivoTtQ0yVPaOVk6goyk=; b= OLbuuqjJ5VqgTfXEpJ9L43gGdmRyRwuacCLrxg5NhzHFasdACU0AFSRtflE+CXYO 1BPqi7TlhpbrZ2xPbRwwtW+QiZOkEwc9ebSWd18x8CqRkGjx1IfA+pV9EiSKtOz8 rFOByInZ+v5j5Eb4UWG21NLp2AAduuJvdDDaTY8fGxR/0T7dsPPczFk4iWW6ZWnu gkNJXO2I9qdOSwoBzalP7wdweVgodEnonJZQPB2RtRykSFFUXntnj7CyJfIcHG8k s4yVQ98AJVk2ORLCfS8zeNq8wZ6/UEPDCrk3drbw1twy2V3TS1fJyGdV3Tp+vvog SwQIFbw1xWcB4UFxjlSSpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708970653; x= 1709057053; bh=MkFArphsqiPKIELjyyzJmwfJivoTtQ0yVPaOVk6goyk=; b=C q661i2X42+3WyJF7RYoKppqnnq4JJDC9hWAPnrRF/LCeZqrcx1Ju0wFsHpG8LbEA lS0u5S9rFpxvEmo2AoFCvXP2UTmwEZBYqDLOrHBLL2KhRD7Ke/Oz+AMzzK0Tge4A H1zWxc6mlqHSC+iTsUte2+YmmyYGUcc9URhIxF5tYqgs7ESg5f1TFboSsy+mQFLz jjvweJgTASgkWk1cLtZMtsYNMtDHjg/EbeSeSAWvZT8KtXdFOX/jdPz7DaDe+zAn dXB+iIf7c5V0V5KYFIqgyImfJ3AqqM34mAI5Az84jIC8WJRrF5M97ZeLa9nM9gDd IYLPMpd8Zypl/OL33Kv+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgedvgddutdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Feb 2024 13:04:09 -0500 (EST) From: Thomas Monjalon To: Tyler Retzlaff Cc: dev@dpdk.org, Anatoly Burakov , Ashish Gupta , Chenbo Xia , Cristian Dumitrescu , David Hunt , Fan Zhang , Hemant Agrawal , Honnappa Nagarahalli , Jasvinder Singh , Jerin Jacob , Konstantin Ananyev , Maxime Coquelin , Reshma Pattan , Sachin Saxena , Sivaprasad Tummala , Srikanth Yalavarthi , Stephen Hemminger , Sunil Kumar Kori , bruce.richardson@intel.com, mb@smartsharesystems.com, david.marchand@redhat.com Subject: Re: [PATCH v2 01/17] log: add a per line log helper with parameterized prefix Date: Mon, 26 Feb 2024 19:04:07 +0100 Message-ID: <2225654.72vocr9iq0@thomas> In-Reply-To: <1708645606-7514-2-git-send-email-roretzla@linux.microsoft.com> References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> <1708645606-7514-1-git-send-email-roretzla@linux.microsoft.com> <1708645606-7514-2-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 23/02/2024 00:46, Tyler Retzlaff: > Providing a custom prefix when logging is common for components. Lift > ISO C99 compliant helper macros from mlx5_common.h and provide > RTE_LOG_LINE_PREFIX macro that can expand similar to RTE_LOG_LINE with > a custom prefix and argument list. [...] > > +#define _RTE_LOG_COMMA , I'm not sure about the underscore at the beginning. Anyway it is exported in the API. By the way it should have a Doxygen comment. > + > +#define RTE_LOG_LINE_PREFIX(l, t, prefix, args, ...) do { \ > + RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(prefix __VA_ARGS__ ,)); \ > + RTE_LOG(l, t, RTE_FMT(prefix RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \ > + args _RTE_LOG_COMMA RTE_FMT_TAIL(__VA_ARGS__ ,))); \ > +} while (0) > + > +#define RTE_LOG_DP_LINE_PREFIX(l, t, prefix, args, ...) do { \ > + RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(prefix __VA_ARGS__ ,)); \ > + RTE_LOG_DP(l, t, RTE_FMT(prefix RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \ > + args _RTE_LOG_COMMA RTE_FMT_TAIL(__VA_ARGS__ ,))); \ > +} while (0) Please could you add a Doxygen comment for each RTE_LOG_LINE variations, including previous ones? Would be nice to have an idea of the output what DP is doing.