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 CE65843BF6; Mon, 26 Feb 2024 21:19:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DE3B402CC; Mon, 26 Feb 2024 21:19:50 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C107A402C8 for ; Mon, 26 Feb 2024 21:19:48 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DF0FA20B74C0; Mon, 26 Feb 2024 12:19:47 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DF0FA20B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708978787; bh=tW9WivWRcOOowKEpmog9AzqE/xXIaKTtQRaikEx1RUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RdDu919qVcM8n8/e6hjCJDTmrDrZaL5lz0Ci3hxY+uhpMtq6E/TyzFA5arapSnGjC bDhcklBnD19nfQ6yDHT0DObuGEZ3FNQZQ4CiBSuwUs54HWBceyXafWVLUqVKT3pmTq /zEUw6yBHjXkAKhTERuuSV5fBL3Ki+/4YWuiGlXY= From: Tyler Retzlaff To: dev@dpdk.org Cc: 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, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v3 00/16] stop using variadic argument pack extension Date: Mon, 26 Feb 2024 12:19:30 -0800 Message-Id: <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> 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 RTE_LOG_LINE cannot be augmented with a prefix format and arguments without the user of RTE_LOG_LINE using the args... and ## args compiler extension to conditionally remove trailing comma when the macro receives only a single argument. Provide a new/similar macro RTE_LOG_LINE_PREFIX that accepts the prefix format and arguments as separate parameters allowing them to be expanded at the correct locations inside of RTE_FMT() allowing the rest of the non-prefix format string and arguments to be collapsed to the argument pack which can be directly forwarded with __VA_ARGS__ avoiding the need for conditional comma removal. I've done my best to manually check expansions (preprocessed) and compiled printf of the logs to validate correct output. note: due to drastic change in series i have not carried any series acks forward. v3: * remove leading _ from RTE_LOG_COMMA the macro is not internal * add doxygen comment for existing RTE_LOG{,DP}_LINE function-like macros, based on RTE_LOG{,DP} comments. * add doxygen comment for new RTE_LOG{,DP}_LINE_PREFIX function-like macros, based on RTE_LOG{,DP} comments. * merge 2 vhost patches into a single patch (mistake in previous submission) v2: * revamp entire series to be ISO C99 compliant, stop using variadic argument pack extension. Tyler Retzlaff (16): log: add a per line log helper with parameterized prefix bpf: stop using variadic argument pack extension cfgfile: stop using variadic argument pack extension cmdline: stop using variadic argument pack extension compressdev: stop using variadic argument pack extension metrics: stop using variadic argument pack extension mldev: stop using variadic argument pack extension net: stop using variadic argument pack extension pdump: stop using variadic argument pack extension power: stop using variadic argument pack extension rawdev: stop using variadic argument pack extension rcu: stop using variadic argument pack extension stack: stop using variadic argument pack extension eal: stop using variadic argument pack extension vhost: stop using variadic argument pack extension ip_frag: stop using variadic argument pack extension lib/bpf/bpf_impl.h | 4 +- lib/cfgfile/rte_cfgfile.c | 5 +- lib/cmdline/cmdline_parse.c | 2 +- lib/cmdline/cmdline_parse_num.c | 4 +- lib/compressdev/rte_compressdev_internal.h | 4 +- lib/eal/common/eal_trace.h | 8 +-- lib/ip_frag/ip_frag_common.h | 4 +- lib/log/rte_log.h | 97 ++++++++++++++++++++++++++++++ lib/metrics/rte_metrics_telemetry.c | 12 ++-- lib/mldev/rte_mldev.h | 4 +- lib/net/rte_net_crc.c | 4 +- lib/pdump/rte_pdump.c | 4 +- lib/power/power_common.h | 6 +- lib/rawdev/rte_rawdev_pmd.h | 17 +++--- lib/rcu/rte_rcu_qsbr.c | 4 +- lib/rcu/rte_rcu_qsbr.h | 12 ++-- lib/stack/stack_pvt.h | 16 ++--- lib/vhost/vhost.h | 8 +-- lib/vhost/vhost_crypto.c | 21 ++++--- 19 files changed, 168 insertions(+), 68 deletions(-) -- 1.8.3.1