DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Ashish Gupta <ashish.gupta@marvell.com>,
	Chenbo Xia <chenbox@nvidia.com>,
	Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
	David Hunt <david.hunt@intel.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Jasvinder Singh <jasvinder.singh@intel.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Reshma Pattan <reshma.pattan@intel.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Sivaprasad Tummala <sivaprasad.tummala@amd.com>,
	Srikanth Yalavarthi <syalavarthi@marvell.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Sunil Kumar Kori <skori@marvell.com>,
	bruce.richardson@intel.com, mb@smartsharesystems.com,
	thomas@monjalon.net,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH v5 00/22] stop using variadic argument pack extension
Date: Thu, 29 Feb 2024 13:31:43 -0800	[thread overview]
Message-ID: <1709242325-17218-1-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com>

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.

v5:
  * add missing newline escape and comma in rte_windows.h
    macro.

v4:
  * remove unintended addition of prefix to bpf log helper.
  * use RTE_LOG_LINE_PREFIX in other places using RTE_FMT_HEAD
    and RTE_FMT_TAIL.
  * add a checkpatch check to prevent reintroduction of ##args.

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 (22):
  log: add a per line log helper with parameterized prefix
  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
  bpf: stop using variadic argument pack extension
  cryptodev: stop using variadic argument pack extension
  eventdev: stop using variadic argument pack extension
  graph: stop using variadic argument pack extension
  member: stop using variadic argument pack extension
  node: stop using variadic argument pack extension
  devtools: forbid use argument variadic pack extension

 devtools/checkpatches.sh                   |  8 +++
 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/cryptodev/rte_cryptodev.h              | 15 ++---
 lib/eal/common/eal_trace.h                 |  8 +--
 lib/eal/windows/include/rte_windows.h      |  5 +-
 lib/eventdev/eventdev_pmd.h                | 10 ++-
 lib/eventdev/rte_event_timer_adapter.c     |  5 +-
 lib/graph/graph_private.h                  |  5 +-
 lib/ip_frag/ip_frag_common.h               |  4 +-
 lib/log/rte_log.h                          | 97 ++++++++++++++++++++++++++++++
 lib/member/member.h                        |  5 +-
 lib/metrics/rte_metrics_telemetry.c        | 12 ++--
 lib/mldev/rte_mldev.h                      |  4 +-
 lib/net/rte_net_crc.c                      |  4 +-
 lib/node/node_private.h                    |  6 +-
 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 ++++---
 27 files changed, 196 insertions(+), 99 deletions(-)

-- 
1.8.3.1


  parent reply	other threads:[~2024-02-29 21:32 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 21:49 [PATCH 00/15] use GCC/MSVC compatible __VA_ARGS__ Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 01/15] eal: use GCC and MSVC common VA ARGS extension Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 02/15] bpf: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 03/15] cfgfile: " Tyler Retzlaff
2024-02-13  9:03   ` Bruce Richardson
2024-02-12 21:49 ` [PATCH 04/15] cmdline: " Tyler Retzlaff
2024-02-13  9:04   ` Bruce Richardson
2024-02-12 21:49 ` [PATCH 05/15] ip_frag: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 06/15] compressdev: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 07/15] metrics: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 08/15] mldev: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 09/15] net: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 10/15] pdump: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 11/15] power: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 12/15] rawdev: " Tyler Retzlaff
2024-02-13 12:46   ` Hemant Agrawal
2024-02-12 21:49 ` [PATCH 13/15] rcu: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 14/15] stack: " Tyler Retzlaff
2024-02-12 21:49 ` [PATCH 15/15] vhost: " Tyler Retzlaff
2024-02-13  9:00 ` [PATCH 00/15] use GCC/MSVC compatible __VA_ARGS__ Bruce Richardson
2024-02-13  9:09 ` Morten Brørup
2024-02-18 13:38 ` Thomas Monjalon
2024-02-22 23:46 ` [PATCH v2 00/17] stop using variadic argument pack extension Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 01/17] log: add a per line log helper with parameterized prefix Tyler Retzlaff
2024-02-26 18:04     ` Thomas Monjalon
2024-02-22 23:46   ` [PATCH v2 02/17] bpf: stop using variadic argument pack extension Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 03/17] cfgfile: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 04/17] cmdline: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 05/17] compressdev: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 06/17] metrics: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 07/17] mldev: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 08/17] net: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 09/17] pdump: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 10/17] power: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 11/17] rawdev: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 12/17] rcu: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 13/17] stack: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 14/17] eal: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 15/17] vhost: " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 16/17] " Tyler Retzlaff
2024-02-22 23:46   ` [PATCH v2 17/17] ip_frag: " Tyler Retzlaff
2024-02-23  8:10   ` [PATCH v2 00/17] " Morten Brørup
2024-02-26 20:19 ` [PATCH v3 00/16] " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 01/16] log: add a per line log helper with parameterized prefix Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 02/16] bpf: stop using variadic argument pack extension Tyler Retzlaff
2024-02-27  9:48     ` Konstantin Ananyev
2024-02-28 13:16     ` David Marchand
2024-02-28 13:34       ` Konstantin Ananyev
2024-02-28 17:24         ` Tyler Retzlaff
2024-02-28 17:27           ` Konstantin Ananyev
2024-02-28 17:29             ` Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 03/16] cfgfile: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 04/16] cmdline: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 05/16] compressdev: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 06/16] metrics: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 07/16] mldev: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 08/16] net: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 09/16] pdump: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 10/16] power: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 11/16] rawdev: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 12/16] rcu: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 13/16] stack: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 14/16] eal: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 15/16] vhost: " Tyler Retzlaff
2024-02-26 20:19   ` [PATCH v3 16/16] ip_frag: " Tyler Retzlaff
2024-02-27  9:48     ` Konstantin Ananyev
2024-02-26 20:54   ` [PATCH v3 00/16] " Stephen Hemminger
2024-02-27 18:14     ` Tyler Retzlaff
2024-02-28 11:45       ` David Marchand
2024-02-28 17:27         ` Tyler Retzlaff
2024-02-28 17:29   ` David Marchand
2024-02-28 17:59     ` Tyler Retzlaff
2024-02-29  8:06       ` David Marchand
2024-02-29 19:53 ` [PATCH v4 00/22] " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 01/22] log: add a per line log helper with parameterized prefix Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 02/22] cfgfile: stop using variadic argument pack extension Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 03/22] cmdline: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 04/22] compressdev: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 05/22] metrics: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 06/22] mldev: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 07/22] net: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 08/22] pdump: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 09/22] power: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 10/22] rawdev: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 11/22] rcu: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 12/22] stack: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 13/22] eal: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 14/22] vhost: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 15/22] ip_frag: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 16/22] bpf: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 17/22] cryptodev: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 18/22] eventdev: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 19/22] graph: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 20/22] member: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 21/22] node: " Tyler Retzlaff
2024-02-29 19:53   ` [PATCH v4 22/22] devtools: forbid use argument variadic " Tyler Retzlaff
2024-02-29 21:31 ` Tyler Retzlaff [this message]
2024-02-29 21:31   ` [PATCH v5 01/22] log: add a per line log helper with parameterized prefix Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 02/22] cfgfile: stop using variadic argument pack extension Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 03/22] cmdline: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 04/22] compressdev: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 05/22] metrics: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 06/22] mldev: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 07/22] net: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 08/22] pdump: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 09/22] power: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 10/22] rawdev: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 11/22] rcu: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 12/22] stack: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 13/22] eal: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 14/22] vhost: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 15/22] ip_frag: " Tyler Retzlaff
2024-02-29 21:31   ` [PATCH v5 16/22] bpf: " Tyler Retzlaff
2024-02-29 21:32   ` [PATCH v5 17/22] cryptodev: " Tyler Retzlaff
2024-02-29 21:32   ` [PATCH v5 18/22] eventdev: " Tyler Retzlaff
2024-02-29 21:32   ` [PATCH v5 19/22] graph: " Tyler Retzlaff
2024-02-29 21:32   ` [PATCH v5 20/22] member: " Tyler Retzlaff
2024-02-29 21:32   ` [PATCH v5 21/22] node: " Tyler Retzlaff
2024-02-29 21:32   ` [PATCH v5 22/22] devtools: forbid use argument variadic " Tyler Retzlaff
2024-03-01 12:43   ` [PATCH v5 00/22] stop using variadic argument " David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1709242325-17218-1-git-send-email-roretzla@linux.microsoft.com \
    --to=roretzla@linux.microsoft.com \
    --cc=anatoly.burakov@intel.com \
    --cc=ashish.gupta@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jasvinder.singh@intel.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=maxime.coquelin@redhat.com \
    --cc=mb@smartsharesystems.com \
    --cc=reshma.pattan@intel.com \
    --cc=sachin.saxena@nxp.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=skori@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=syalavarthi@marvell.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).