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 C239243746; Tue, 19 Dec 2023 16:45:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 591CF42DED; Tue, 19 Dec 2023 16:45:27 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 047E7402E0 for ; Tue, 19 Dec 2023 16:45:26 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 3095A3200AB7; Tue, 19 Dec 2023 10:45:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 19 Dec 2023 10:45:24 -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=fm2; t=1703000723; x=1703087123; bh=LoNaUiDAD23dScrtl94qvrxou6n8SWszEXxX4kRUhzM=; b= YerXj5VRXg43s7du+LelKnOYHB8XXbsXDctfFcS5TB6HrYih6TjT6mvPFlKZsesj QJCysom90NA4/HwgY7Y6+7RX51ZQJrNdZ6KnlvGL9cE5wphAXc8iuQgD4C12XdKu 4vtahn8UPLd8crrFnnEL2nfXJl1nmVlbWF77VnOycx/QTIjfb63OeOlgbDpjWz5b +KgIntas55n1I9KkiCFoLkH1ylwxQPTKvbiyVErX+DHy09CMKyhKA6ZAD/zCsfsl HMTv8poR8UnGfcdPZvyiymnx09f20k4/ytAbgu0Y7/MV2tVJrIInWDuUu3ggiHzm QwDscIXaWGqjNE7R8+skFA== 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=fm2; t=1703000723; x= 1703087123; bh=LoNaUiDAD23dScrtl94qvrxou6n8SWszEXxX4kRUhzM=; b=N LRYoBLabKUfKIAAdACXQjlnRZ7yz+1ZSTe9feiQ022lMw7TW396Ltn7H480pSHSH +jsKcS1+0pEgGg9YDYSi5GCVPmpF/TTXGEW7chFV2Pi+M1Ai0CcwRvRH3P7AKE23 IU9ua0Kd1eg+cPSueYpF5gkopbvp1+U3RxjcatuUEoYTE3Z3Pm6G2UmYG51NEr6j GHgHUowOm9AOcq3jwen+CDPNxR7OqF+5FC3KRe/oviePVAHF1pGNNpNyVCn9K3xh kYBbyurfUT+7yBrkQpEUZh2FK2mJGk8Zyxtl0h7iPF/EppztrgjZCM7oXtb0be/B MdonWDLj2OvH5VgsyuGng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddutddgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Dec 2023 10:45:21 -0500 (EST) From: Thomas Monjalon To: David Marchand Cc: dev@dpdk.org, ferruh.yigit@amd.com, bruce.richardson@intel.com, stephen@networkplumber.org, mb@smartsharesystems.com, Chengwen Feng Subject: Re: [PATCH v4 11/14] log: add a per line log helper Date: Tue, 19 Dec 2023 16:45:19 +0100 Message-ID: <3969116.88bMQJbFj6@thomas> In-Reply-To: <20231218143805.1500121-12-david.marchand@redhat.com> References: <20231117131824.1977792-1-david.marchand@redhat.com> <20231218143805.1500121-1-david.marchand@redhat.com> <20231218143805.1500121-12-david.marchand@redhat.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 18/12/2023 15:38, David Marchand: > +#ifdef RTE_TOOLCHAIN_GCC > +#define RTE_LOG_CHECK_NO_NEWLINE(fmt) \ > + static_assert(!__builtin_strchr(fmt, '\n'), \ > + "This log format string contains a \\n") > +#else > +#define RTE_LOG_CHECK_NO_NEWLINE(...) > +#endif No support in clang? > +#define RTE_LOG_LINE(l, t, ...) do { \ > + RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(__VA_ARGS__ ,)); \ > + RTE_LOG(l, t, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \ > + RTE_FMT_TAIL(__VA_ARGS__ ,))); \ > +} while (0) > + > +#define RTE_LOG_DP_LINE(l, t, ...) do { \ > + RTE_LOG_CHECK_NO_NEWLINE(RTE_FMT_HEAD(__VA_ARGS__ ,)); \ > + RTE_LOG_DP(l, t, RTE_FMT(RTE_FMT_HEAD(__VA_ARGS__ ,) "\n", \ > + RTE_FMT_TAIL(__VA_ARGS__ ,))); \ > +} while (0) I don't think we need a space between __VA_ARGS__ and the comma.