From patchwork Mon Feb 12 21:49:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136604 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5D23443AFE; Mon, 12 Feb 2024 22:49:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8262840DFD; Mon, 12 Feb 2024 22:49:25 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 05DCE402C8 for ; Mon, 12 Feb 2024 22:49:22 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3A9C320B2001; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3A9C320B2001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=dbvZfOUiRqO4GoIl1UEnRCJXJD8kXwib94dh4drU/Eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9vzjt+SXVY9w83KpgqfbHqqmcFsBehxivttJvXzBnCiwNUEDS2PU8GX4lBwILSAH zntCSTSRkIK5/0cKOpKSbluLopZY0MnusYzPGHLrHfPpSg1OoYGL+/98BnjJ17GF3R CDLS3Gyex50vAFzyee+668xFCMPjWGJpg+UP1DgY= 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 , Tyler Retzlaff Subject: [PATCH 01/15] eal: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:03 -0800 Message-Id: <1707774557-16012-2-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/eal/common/eal_trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eal/common/eal_trace.h b/lib/eal/common/eal_trace.h index bd082a0..79487a0 100644 --- a/lib/eal/common/eal_trace.h +++ b/lib/eal/common/eal_trace.h @@ -16,11 +16,11 @@ #include "eal_private.h" #include "eal_thread.h" -#define trace_err(fmt, args...) \ - EAL_LOG(ERR, "%s():%u " fmt, __func__, __LINE__, ## args) +#define trace_err(fmt, ...) \ + EAL_LOG(ERR, "%s():%u " fmt, __func__, __LINE__, ## __VA_ARGS__) -#define trace_crit(fmt, args...) \ - EAL_LOG(CRIT, "%s():%u " fmt, __func__, __LINE__, ## args) +#define trace_crit(fmt, ...) \ + EAL_LOG(CRIT, "%s():%u " fmt, __func__, __LINE__, ## __VA_ARGS__) #define TRACE_CTF_MAGIC 0xC1FC1FC1 #define TRACE_MAX_ARGS 32 From patchwork Mon Feb 12 21:49:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136603 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AEB6743AFE; Mon, 12 Feb 2024 22:49:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DF3440E32; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 09BE940DD8 for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 486C320B2002; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 486C320B2002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=J6wdYGYPVLTxgunD1DseOLGcbrqCbjEusfo8KbTPfOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eNOUGl/OYMOanERnDe3WuX9ZZUZ0o6Xoq5dV7bs7G/bzqfHAQIqXDb+7tsqrmHPX9 KpojuuGMHnyZI0Du13NL9Qb3+5Idz11D/f0N0XGtJsQSAts4RJlxGRHbSna4S0ZWzy fzdIrrDYccZ+/xGVSaS6tmvwbM/VJaXEvrs15sfY= 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 , Tyler Retzlaff Subject: [PATCH 02/15] bpf: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:04 -0800 Message-Id: <1707774557-16012-3-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/bpf/bpf_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bpf/bpf_impl.h b/lib/bpf/bpf_impl.h index 1a3d97d..e4871bc 100644 --- a/lib/bpf/bpf_impl.h +++ b/lib/bpf/bpf_impl.h @@ -29,8 +29,8 @@ struct rte_bpf { extern int rte_bpf_logtype; #define RTE_LOGTYPE_BPF rte_bpf_logtype -#define RTE_BPF_LOG_LINE(lvl, fmt, args...) \ - RTE_LOG_LINE(lvl, BPF, fmt, ##args) +#define RTE_BPF_LOG_LINE(lvl, fmt, ...) \ + RTE_LOG_LINE(lvl, BPF, fmt, ## __VA_ARGS__) static inline size_t bpf_size(uint32_t bpf_op_sz) From patchwork Mon Feb 12 21:49:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136606 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA7B743AFE; Mon, 12 Feb 2024 22:49:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD7CA40E78; Mon, 12 Feb 2024 22:49:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4547E40DFD for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 565F320B2003; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 565F320B2003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=4174OtUBJCoQ3Fsocvrv1XKuKsmEDPDEWPwMU0X/uMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bKk4t8Wsi1bDxwd09CI/ajEV4pgxm0sqBjluYTF5nvXR2Bv4OZkVg9IWU9LSFjrLG L69Cnw+JLYJGxAu5d2xS8htct2E1VEd2BzSWSGq/WYLfoaCVZUGe7JenOZYoxXQChO H/5o/8uGSUO3/KYtK1Co3aeE3CcaiUVt1oCGTnyA= 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 , Tyler Retzlaff Subject: [PATCH 03/15] cfgfile: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:05 -0800 Message-Id: <1707774557-16012-4-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff Reviewed-by: Bruce Richardson --- lib/cfgfile/rte_cfgfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c index 6a5e4fd..e006508 100644 --- a/lib/cfgfile/rte_cfgfile.c +++ b/lib/cfgfile/rte_cfgfile.c @@ -31,8 +31,8 @@ struct rte_cfgfile { RTE_LOG_REGISTER_DEFAULT(cfgfile_logtype, INFO); #define RTE_LOGTYPE_CFGFILE cfgfile_logtype -#define CFG_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, CFGFILE, "%s(): " fmt, __func__, ## args) +#define CFG_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, CFGFILE, "%s(): " fmt, __func__, ## __VA_ARGS__) /* >8 End of setting up dynamic logging */ /** when we resize a file structure, how many extra entries From patchwork Mon Feb 12 21:49:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136605 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E44D143AFE; Mon, 12 Feb 2024 22:49:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A28D340E54; Mon, 12 Feb 2024 22:49:26 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4B58F40E03 for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6437820B2004; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6437820B2004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=dJJMXcqf0zJRknUtoy3Mh6JgLX8ljgAVXZ1fFxDG5mk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XtVoa7NiEApHIwjgb3XlCBF6SdDBgwCYIsTPjyv7rgp3BvIzvXBIl2XXtayGkcWz0 temYCd6EYfKXPSOFb0c1i3C5fhwvWvkKGJ2OzrM7VJxWB0CZC627sHPmLfieuB0qI5 Zpxyh22yvOQfJ8divlNwrJjigGx9hRFXqTYgKIkg= 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 , Tyler Retzlaff Subject: [PATCH 04/15] cmdline: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:06 -0800 Message-Id: <1707774557-16012-5-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Fix checkpatches warning about style while(0) -> while (0) Signed-off-by: Tyler Retzlaff Reviewed-by: Bruce Richardson --- lib/cmdline/cmdline_parse.c | 2 +- lib/cmdline/cmdline_parse_num.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cmdline/cmdline_parse.c b/lib/cmdline/cmdline_parse.c index b6d6dac..76a212d 100644 --- a/lib/cmdline/cmdline_parse.c +++ b/lib/cmdline/cmdline_parse.c @@ -16,7 +16,7 @@ #ifdef RTE_LIBRTE_CMDLINE_DEBUG #define debug_printf printf #else -#define debug_printf(args...) do {} while(0) +#define debug_printf(...) do {} while (0) #endif #define CMDLINE_BUFFER_SIZE 64 diff --git a/lib/cmdline/cmdline_parse_num.c b/lib/cmdline/cmdline_parse_num.c index 820af07..e849878 100644 --- a/lib/cmdline/cmdline_parse_num.c +++ b/lib/cmdline/cmdline_parse_num.c @@ -14,9 +14,9 @@ #include "cmdline_parse_num.h" #ifdef RTE_LIBRTE_CMDLINE_DEBUG -#define debug_printf(args...) printf(args) +#define debug_printf(...) printf(__VA_ARGS__) #else -#define debug_printf(args...) do {} while(0) +#define debug_printf(...) do {} while (0) #endif struct cmdline_token_ops cmdline_token_num_ops = { From patchwork Mon Feb 12 21:49:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136607 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 670E443AFE; Mon, 12 Feb 2024 22:49:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04D3440EAB; Mon, 12 Feb 2024 22:49:29 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6927B40DD8 for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 72AC420B2005; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 72AC420B2005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=/9qyjpaLRmm6UHNjD4HyemStnp6oP6XsHzJCz2tYnA8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RAyjPAE3PL41M2GapSYipUxyNYaewsKc+DLAbNC56S126IpPQBth8UhcpmJkDb7tB TN7+eDhQJM5mQbcx9582ZVr74g54RKWxHSgr/zi5l8K8JTPu0q3M/bFAiJp3VFsOdT xAG01qdioGt/bmSGMSy79bqnDDlXhsgoGFfdkKSE= 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 , Tyler Retzlaff Subject: [PATCH 05/15] ip_frag: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:07 -0800 Message-Id: <1707774557-16012-6-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Fix checkpatches warning about style while(0) -> while (0) Signed-off-by: Tyler Retzlaff --- lib/ip_frag/ip_frag_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h index c766154..8926dc6 100644 --- a/lib/ip_frag/ip_frag_common.h +++ b/lib/ip_frag/ip_frag_common.h @@ -26,9 +26,9 @@ RTE_LOG_LINE(level, IPFRAG, "" __VA_ARGS__) #ifdef RTE_LIBRTE_IP_FRAG_DEBUG -#define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, IPFRAG, fmt, ##args) +#define IP_FRAG_LOG(lvl, fmt, ...) RTE_LOG(lvl, IPFRAG, fmt, ## __VA_ARGS__) #else -#define IP_FRAG_LOG(lvl, fmt, args...) do {} while(0) +#define IP_FRAG_LOG(lvl, fmt, ...) do {} while (0) #endif /* IP_FRAG_DEBUG */ #define IPV4_KEYLEN 1 From patchwork Mon Feb 12 21:49:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136609 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6928943AFE; Mon, 12 Feb 2024 22:50:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D0DB40EDB; Mon, 12 Feb 2024 22:49:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DA66440DD8 for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8078920B2006; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8078920B2006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=KcJkE4L47y/C9/5gWNdKalrUmPmxp87aLVS9op+/El4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q3QSPzcMc7YTcNFrrR3d+5yKHy043VQ4tEhdu6eh9fLAdW4mEvYmDaDBjU/TyU24I NEsC42RmB86Y2cR9SdTt8rzzz/1n6pgz58SbUcRYjLl/vr5cocS34De4VnFet7ISdc qBhobG/v6xH1enaWs93tj2f7EfnZFSIUWgv3DRoI= 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 , Tyler Retzlaff Subject: [PATCH 06/15] compressdev: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:08 -0800 Message-Id: <1707774557-16012-7-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/compressdev/rte_compressdev_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compressdev/rte_compressdev_internal.h b/lib/compressdev/rte_compressdev_internal.h index 01b7764..6c90aa5 100644 --- a/lib/compressdev/rte_compressdev_internal.h +++ b/lib/compressdev/rte_compressdev_internal.h @@ -23,8 +23,8 @@ extern int compressdev_logtype; #define RTE_LOGTYPE_COMPRESSDEV compressdev_logtype -#define COMPRESSDEV_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, COMPRESSDEV, "%s(): " fmt, __func__, ## args) +#define COMPRESSDEV_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, COMPRESSDEV, "%s(): " fmt, __func__, ## __VA_ARGS__) /** * Dequeue processed packets from queue pair of a device. From patchwork Mon Feb 12 21:49:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136608 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6966943AFE; Mon, 12 Feb 2024 22:49:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 211C740ED3; Mon, 12 Feb 2024 22:49:30 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CB30F402C8 for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8DE5F20B2007; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8DE5F20B2007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=J5GlTu1UoM/KdkkQ/JmQX5hKqlhQOqOT+OPiUR7mBCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gpH/mE3gI/ocNT4bNlSN8r1pVsw6XrcVx6u3yswhadmAsB5A/NkVv2XodhEOkx7ED bVEZyItqOo8DTK98I0sRgfLQnOXkEMh2En0bvTQVD3PEi/oMZ350gurpzpEwpb6tiD Zrcfh8yv6Yf4d3P2YA+gRHT5GsYBMcWINDG6GtII= 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 , Tyler Retzlaff Subject: [PATCH 07/15] metrics: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:09 -0800 Message-Id: <1707774557-16012-8-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/metrics/rte_metrics_telemetry.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c index b8c9d75..0f26726 100644 --- a/lib/metrics/rte_metrics_telemetry.c +++ b/lib/metrics/rte_metrics_telemetry.c @@ -19,14 +19,14 @@ #define RTE_LOGTYPE_METRICS metrics_log_level /* Logging Macros */ -#define METRICS_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, METRICS, "%s(): "fmt, __func__, ## args) +#define METRICS_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, METRICS, "%s(): "fmt, __func__, ## __VA_ARGS__) -#define METRICS_LOG_ERR(fmt, args...) \ - METRICS_LOG(ERR, fmt, ## args) +#define METRICS_LOG_ERR(fmt, ...) \ + METRICS_LOG(ERR, fmt, ## __VA_ARGS__) -#define METRICS_LOG_WARN(fmt, args...) \ - METRICS_LOG(WARNING, fmt, ## args) +#define METRICS_LOG_WARN(fmt, ...) \ + METRICS_LOG(WARNING, fmt, ## __VA_ARGS__) static int32_t rte_metrics_tel_reg_port_ethdev_to_metrics(uint16_t port_id) From patchwork Mon Feb 12 21:49:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136615 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 773D643AFE; Mon, 12 Feb 2024 22:50:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07AE3410F6; Mon, 12 Feb 2024 22:49:38 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2F9C640E28 for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 9C35720B2008; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9C35720B2008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=SxNm492JTJM6o8yVPHW73J3PUUz6v3Hhd6xcl2b6GyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nwYkAj8bX9b8S/GYppsyr+7GwEDEfyStZRiMsMKK+xjKxNvv3vI9i/IkfCP7SmSjU cG/OxtTwHRVhrodeOd10eP4EVD3BvLtK0QLhGET2oXWyjh2rJRmFwhdyrl6fMrJsOO +b0UPNch8iBxRHaxI1kYTzD+Q4kBAI4Aizr1A+Gs= 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 , Tyler Retzlaff Subject: [PATCH 08/15] mldev: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:10 -0800 Message-Id: <1707774557-16012-9-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/mldev/rte_mldev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mldev/rte_mldev.h b/lib/mldev/rte_mldev.h index 5cf6f05..e3ec889 100644 --- a/lib/mldev/rte_mldev.h +++ b/lib/mldev/rte_mldev.h @@ -146,8 +146,8 @@ extern int rte_ml_dev_logtype; #define RTE_LOGTYPE_MLDEV rte_ml_dev_logtype -#define RTE_MLDEV_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, MLDEV, "%s(): " fmt, __func__, ##args) +#define RTE_MLDEV_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, MLDEV, "%s(): " fmt, __func__, ## __VA_ARGS__) #define RTE_ML_STR_MAX 128 /**< Maximum length of name string */ From patchwork Mon Feb 12 21:49:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136612 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F5F643AFE; Mon, 12 Feb 2024 22:50:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2E37410D3; Mon, 12 Feb 2024 22:49:34 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id EEB6D40DFD for ; Mon, 12 Feb 2024 22:49:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A997A20B2009; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A997A20B2009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=sD0YngNXUqgVsMqVy2QOFpMJ4pbKsiYM/mFht7IjH2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jf8A4N8RTMybiHLjOvcurmeBFATYh65c9udcFt5Sq78v2M3UW6cLMBQcHeR3PzSPh eS/wwQ1eDIDg/1e9SdJqLWoGgcKxIwB1JWozFk3uxv0loX9K/n3M8IuRdLVVTXe6Z4 /4+zUOtaoX2TDLnA+I2qBuur2zc7Q3RieApBgdew= 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 , Tyler Retzlaff Subject: [PATCH 09/15] net: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:11 -0800 Message-Id: <1707774557-16012-10-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/net/rte_net_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c index b401ea3..241155e 100644 --- a/lib/net/rte_net_crc.c +++ b/lib/net/rte_net_crc.c @@ -73,8 +73,8 @@ RTE_LOG_REGISTER_DEFAULT(libnet_logtype, INFO); #define RTE_LOGTYPE_NET libnet_logtype -#define NET_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, NET, "%s(): " fmt, __func__, ## args) +#define NET_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, NET, "%s(): " fmt, __func__, ## __VA_ARGS__) /* Scalar handling */ From patchwork Mon Feb 12 21:49:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136611 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64A3743AFE; Mon, 12 Feb 2024 22:50:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8717240F1A; Mon, 12 Feb 2024 22:49:33 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0E95B40E0F for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id B846020B200A; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B846020B200A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=Y8iTYdvwVAWbtKciwR/weRMoVSjSZAj1JcRWQc0bAvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pQyNqJGU85m/D7YnXw+H/8omams9LlU6NX+qgl82n0xB9iy2JjKT7ntc4PyMG5nZL 5DCkVRK+3G14bMS40wbUe9XI6z1lmf1BSlDpv0kT7jz5K2fiRxFfF+bQIJ9u6h46o/ xv34uyif8vlSdhLQfDEd3K349cj/GbzdE6Ib82aM= 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 , Tyler Retzlaff Subject: [PATCH 10/15] pdump: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:12 -0800 Message-Id: <1707774557-16012-11-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/pdump/rte_pdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c index f6160f9..7717b54 100644 --- a/lib/pdump/rte_pdump.c +++ b/lib/pdump/rte_pdump.c @@ -18,8 +18,8 @@ RTE_LOG_REGISTER_DEFAULT(pdump_logtype, NOTICE); #define RTE_LOGTYPE_PDUMP pdump_logtype -#define PDUMP_LOG_LINE(level, fmt, args...) \ - RTE_LOG_LINE(level, PDUMP, "%s(): " fmt, __func__, ## args) +#define PDUMP_LOG_LINE(level, fmt, ...) \ + RTE_LOG_LINE(level, PDUMP, "%s(): " fmt, __func__, ## __VA_ARGS__) /* Used for the multi-process communication */ #define PDUMP_MP "mp_pdump" From patchwork Mon Feb 12 21:49:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136610 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA66343AFE; Mon, 12 Feb 2024 22:50:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 720A540EE5; Mon, 12 Feb 2024 22:49:32 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0A6B940E03 for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C6B7320B200B; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C6B7320B200B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=Z7KXYE83tL/BTFgBl4+i6rihwMSWB/2ZZlmf9lmbLks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OI9rDM9XvZLQJKGks9Y/Fdw/7o+LTyLNeNB1vtrbL3pxbj7U8rw+4F61bPUEQ9mPO 5N9efYEpgee2JennIzwFIGNqpAVaMnWEGlCbyt6gf41LO1lkwRTFfagEEOCOEOFR0E qjMPCpeOaKRethPx0b0Fv2UlbkbOHhpJeJoM+EP0= 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 , Tyler Retzlaff Subject: [PATCH 11/15] power: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:13 -0800 Message-Id: <1707774557-16012-12-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/power/power_common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/power/power_common.h b/lib/power/power_common.h index 3096640..ba17e74 100644 --- a/lib/power/power_common.h +++ b/lib/power/power_common.h @@ -16,10 +16,10 @@ RTE_LOG_LINE(level, POWER, "" __VA_ARGS__) #ifdef RTE_LIBRTE_POWER_DEBUG -#define POWER_DEBUG_LOG(fmt, args...) \ - RTE_LOG_LINE(ERR, POWER, "%s: " fmt, __func__, ## args) +#define POWER_DEBUG_LOG(fmt, ...) \ + RTE_LOG_LINE(ERR, POWER, "%s: " fmt, __func__, ## __VA_ARGS__) #else -#define POWER_DEBUG_LOG(fmt, args...) +#define POWER_DEBUG_LOG(fmt, ...) #endif /* check if scaling driver matches one we want */ From patchwork Mon Feb 12 21:49:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136614 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E261543AFE; Mon, 12 Feb 2024 22:50:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5BE7410E8; Mon, 12 Feb 2024 22:49:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 10D4540E13 for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D62AD20B200C; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D62AD20B200C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=S8/6swJoNWfJgJC3M6AMUmF523e0cX7Sz2jJprtOMIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r3yUzavS5BXPQr+1ZMU4Erv7QUmshLZvhcKc7KCWuAseG34j3oexAVJB7JQTiU7Ib OesuFECcpfV+g05SmRmUqhuTDnVh3n7hlPvz8HBVN63rh3XjmYCgwGwFCrx8zohDnD bDsWCmofDZN7CobDzzDEYaAHr7/LZYad8dEcTDBY= 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 , Tyler Retzlaff Subject: [PATCH 12/15] rawdev: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:14 -0800 Message-Id: <1707774557-16012-13-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff Acked-by: Hemant Agrawal --- lib/rawdev/rte_rawdev_pmd.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/rawdev/rte_rawdev_pmd.h b/lib/rawdev/rte_rawdev_pmd.h index 7173282..d66f438 100644 --- a/lib/rawdev/rte_rawdev_pmd.h +++ b/lib/rawdev/rte_rawdev_pmd.h @@ -30,15 +30,15 @@ #define RTE_LOGTYPE_RAWDEV librawdev_logtype /* Logging Macros */ -#define RTE_RDEV_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, RAWDEV, "%s(): " fmt, __func__, ##args) - -#define RTE_RDEV_ERR(fmt, args...) \ - RTE_RDEV_LOG(ERR, fmt, ## args) -#define RTE_RDEV_DEBUG(fmt, args...) \ - RTE_RDEV_LOG(DEBUG, fmt, ## args) -#define RTE_RDEV_INFO(fmt, args...) \ - RTE_RDEV_LOG(INFO, fmt, ## args) +#define RTE_RDEV_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, RAWDEV, "%s(): " fmt, __func__, ## __VA_ARGS__) + +#define RTE_RDEV_ERR(fmt, ...) \ + RTE_RDEV_LOG(ERR, fmt, ## __VA_ARGS__) +#define RTE_RDEV_DEBUG(fmt, ...) \ + RTE_RDEV_LOG(DEBUG, fmt, ## __VA_ARGS__) +#define RTE_RDEV_INFO(fmt, ...) \ + RTE_RDEV_LOG(INFO, fmt, ## __VA_ARGS__) /* Macros to check for valid device */ From patchwork Mon Feb 12 21:49:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136613 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B07C43AFE; Mon, 12 Feb 2024 22:50:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8042410E3; Mon, 12 Feb 2024 22:49:35 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4C24440E54 for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E446F20B200D; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E446F20B200D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=ClSaUhf4lmWT7ckBPc9dfhDreaOuY91h0rENNVVVtSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vxi7s/wFxpa6iBHPJ2e+uZ+GdUKVAwThJopnVabrw0FQ1F0vaBWsUtBm+LwbwzMEn Qu/q1VMhiEAnbhIaZyFOgGSxqS9XqBfn82U0bxu49m0CG5l7AyF4jEtl3uPRFuBKfm LEzvjO2mnLAOC3MqQwA5ykBia8dB0GlzluWni54A= 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 , Tyler Retzlaff Subject: [PATCH 13/15] rcu: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:15 -0800 Message-Id: <1707774557-16012-14-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/rcu/rte_rcu_qsbr.c | 4 ++-- lib/rcu/rte_rcu_qsbr.h | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/rcu/rte_rcu_qsbr.c b/lib/rcu/rte_rcu_qsbr.c index bd0b83b..4aff573 100644 --- a/lib/rcu/rte_rcu_qsbr.c +++ b/lib/rcu/rte_rcu_qsbr.c @@ -19,8 +19,8 @@ #include "rte_rcu_qsbr.h" #include "rcu_qsbr_pvt.h" -#define RCU_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## args) +#define RCU_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## __VA_ARGS__) /* Get the memory size of QSBR variable */ size_t diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index 23c9f89..f55e53a 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -39,19 +39,19 @@ #define RTE_LOGTYPE_RCU rte_rcu_log_type #if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG -#define __RTE_RCU_DP_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## args) +#define __RTE_RCU_DP_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## __VA_ARGS__) #else -#define __RTE_RCU_DP_LOG(level, fmt, args...) +#define __RTE_RCU_DP_LOG(level, fmt, ...) #endif #if defined(RTE_LIBRTE_RCU_DEBUG) -#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, args...) do { \ +#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, ...) do { \ if (v->qsbr_cnt[thread_id].lock_cnt) \ - RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## args); \ + RTE_LOG_LINE(level, RCU, "%s(): " fmt, __func__, ## __VA_ARGS__); \ } while (0) #else -#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, args...) +#define __RTE_RCU_IS_LOCK_CNT_ZERO(v, thread_id, level, fmt, ...) #endif /* Registered thread IDs are stored as a bitmap of 64b element array. From patchwork Mon Feb 12 21:49:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136616 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8640E43AFE; Mon, 12 Feb 2024 22:50:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D23D410FD; Mon, 12 Feb 2024 22:49:39 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 34F43402C8 for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id F23D920B200E; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F23D920B200E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774562; bh=peeh8BYSabZ3M7G0Hn6UQfYSAwZH8c4EHqBKoWgkBaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kxm3d6y8SPf+SgpNG9vHjCuANZ8Ro3HWZqYxRtdVeccwRz5ZIEvNiMQW+5CeNnnaE fV60HFAXfA6x3oriGyUTpVSFDPAhAYxXy6cf+gBt44WdPHepV5uMV4omqSOV6/o/mp R1wh5PO/+6okEfNK4/NTIV4cuPomSybGXfjUXaRo= 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 , Tyler Retzlaff Subject: [PATCH 14/15] stack: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:16 -0800 Message-Id: <1707774557-16012-15-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/stack/stack_pvt.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/stack/stack_pvt.h b/lib/stack/stack_pvt.h index 2dce42a..f38808b 100644 --- a/lib/stack/stack_pvt.h +++ b/lib/stack/stack_pvt.h @@ -10,16 +10,16 @@ extern int stack_logtype; #define RTE_LOGTYPE_STACK stack_logtype -#define STACK_LOG(level, fmt, args...) \ - RTE_LOG_LINE(level, STACK, "%s(): "fmt, __func__, ##args) +#define STACK_LOG(level, fmt, ...) \ + RTE_LOG_LINE(level, STACK, "%s(): "fmt, __func__, ## __VA_ARGS__) -#define STACK_LOG_ERR(fmt, args...) \ - STACK_LOG(ERR, fmt, ## args) +#define STACK_LOG_ERR(fmt, ...) \ + STACK_LOG(ERR, fmt, ## __VA_ARGS__) -#define STACK_LOG_WARN(fmt, args...) \ - STACK_LOG(WARNING, fmt, ## args) +#define STACK_LOG_WARN(fmt, ...) \ + STACK_LOG(WARNING, fmt, ## __VA_ARGS__) -#define STACK_LOG_INFO(fmt, args...) \ - STACK_LOG(INFO, fmt, ## args) +#define STACK_LOG_INFO(fmt, ...) \ + STACK_LOG(INFO, fmt, ## __VA_ARGS__) #endif /* _STACK_PVT_H_ */ From patchwork Mon Feb 12 21:49:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 136617 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B1C0B43AFE; Mon, 12 Feb 2024 22:50:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5057841140; Mon, 12 Feb 2024 22:49:40 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 448F440E36 for ; Mon, 12 Feb 2024 22:49:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0B90920B200F; Mon, 12 Feb 2024 13:49:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0B90920B200F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707774563; bh=KKaB/DL9OZoncT9X5DBVsRHKm3WAFuyserzgF20yKXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i1l6rZcrp6IKd1ixChj8EUszWwVrSoUICs9pP39/LNHUTow6XSob9UzdSjdsZENoE z1ds/FTXOLpiFN6+i8kg+8NbK0NF05jMALFT4pg6f0jYdRCywDsYFw5RgcqpuWCp77 uATmAoQAt8PL8HPXj7pAASjhpzV7CBomdl4qlPlw= 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 , Tyler Retzlaff Subject: [PATCH 15/15] vhost: use GCC and MSVC common VA ARGS extension Date: Mon, 12 Feb 2024 13:49:17 -0800 Message-Id: <1707774557-16012-16-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 Use ... and forward with __VA_ARGS__ instead of args... and args. Neither mechanism is conformant with the standard but the former works with both GCC and MSVC. Signed-off-by: Tyler Retzlaff --- lib/vhost/vhost.h | 8 ++++---- lib/vhost/vhost_crypto.c | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h index 0b13374..b539d6c 100644 --- a/lib/vhost/vhost.h +++ b/lib/vhost/vhost.h @@ -677,11 +677,11 @@ void __vhost_log_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq, extern int vhost_data_log_level; #define RTE_LOGTYPE_VHOST_DATA vhost_data_log_level -#define VHOST_CONFIG_LOG(prefix, level, fmt, args...) \ - RTE_LOG_LINE(level, VHOST_CONFIG, "(%s) " fmt, prefix, ##args) +#define VHOST_CONFIG_LOG(prefix, level, fmt, ...) \ + RTE_LOG_LINE(level, VHOST_CONFIG, "(%s) " fmt, prefix, ## __VA_ARGS__) -#define VHOST_DATA_LOG(prefix, level, fmt, args...) \ - RTE_LOG_DP_LINE(level, VHOST_DATA, "(%s) " fmt, prefix, ##args) +#define VHOST_DATA_LOG(prefix, level, fmt, ...) \ + RTE_LOG_DP_LINE(level, VHOST_DATA, "(%s) " fmt, prefix, ## __VA_ARGS__) #ifdef RTE_LIBRTE_VHOST_DEBUG #define VHOST_MAX_PRINT_BUFF 6072 diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c index 3704fbb..86983c1 100644 --- a/lib/vhost/vhost_crypto.c +++ b/lib/vhost/vhost_crypto.c @@ -20,19 +20,19 @@ RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); #define RTE_LOGTYPE_VHOST_CRYPTO vhost_crypto_logtype -#define VC_LOG_ERR(fmt, args...) \ +#define VC_LOG_ERR(fmt, ...) \ RTE_LOG_LINE(ERR, VHOST_CRYPTO, "%s() line %u: " fmt, \ - __func__, __LINE__, ## args) -#define VC_LOG_INFO(fmt, args...) \ + __func__, __LINE__, ## __VA_ARGS__) +#define VC_LOG_INFO(fmt, ...) \ RTE_LOG_LINE(INFO, VHOST_CRYPTO, "%s() line %u: " fmt, \ - __func__, __LINE__, ## args) + __func__, __LINE__, ## __VA_ARGS__) #ifdef RTE_LIBRTE_VHOST_DEBUG -#define VC_LOG_DBG(fmt, args...) \ +#define VC_LOG_DBG(fmt, ...) \ RTE_LOG_LINE(DEBUG, VHOST_CRYPTO, "%s() line %u: " fmt, \ - __func__, __LINE__, ## args) + __func__, __LINE__, ## __VA_ARGS__) #else -#define VC_LOG_DBG(fmt, args...) +#define VC_LOG_DBG(fmt, ...) #endif #define VIRTIO_CRYPTO_FEATURES ((1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \