DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	 Chengwen Feng <fengchengwen@huawei.com>,
	Kevin Laatz <kevin.laatz@intel.com>,
	 Bruce Richardson <bruce.richardson@intel.com>,
	Elena Agostini <eagostini@nvidia.com>,
	 Jerin Jacob <jerinj@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	 Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Zhirun Yan <zhirun.yan@intel.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	Ciara Power <ciara.power@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbox@nvidia.com>,
	 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH] lib: remove duplicate prefix in logs
Date: Thu, 25 Jan 2024 09:13:41 +0100	[thread overview]
Message-ID: <CAJFAV8yF7uMFJMuNM1dPmTTs=tcC3a-UV039OMa4Hgn0hvGPjg@mail.gmail.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F18F@smartserver.smartshare.dk>

On Wed, Jan 24, 2024 at 1:17 PM Morten Brørup <mb@smartsharesystems.com> wrote:
> > diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
> > index 5953a77bd6..dbaa14f262 100644
> > --- a/lib/dmadev/rte_dmadev.c
> > +++ b/lib/dmadev/rte_dmadev.c
> > @@ -35,8 +35,7 @@ RTE_LOG_REGISTER_DEFAULT(rte_dma_logtype, INFO);
> >  #define RTE_LOGTYPE_DMA rte_dma_logtype
> >
> >  #define RTE_DMA_LOG(level, ...) \
> > -     RTE_LOG_LINE(level, DMA, RTE_FMT("dma: " RTE_FMT_HEAD(__VA_ARGS__
> > ,), \
> > -             RTE_FMT_TAIL(__VA_ARGS__ ,)))
> > +     RTE_LOG_LINE(level, DMA, "" __VA_ARGS__)
> >
> >  int
> >  rte_dma_dev_max(size_t dev_max)
> > diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c
> > index de8291151f..1c2011b856 100644
> > --- a/lib/gpudev/gpudev.c
> > +++ b/lib/gpudev/gpudev.c
> > @@ -20,8 +20,7 @@ RTE_LOG_REGISTER_DEFAULT(gpu_logtype, NOTICE);
> >  #define RTE_LOGTYPE_GPUDEV gpu_logtype
> >
> >  #define GPU_LOG(level, ...) \
> > -     RTE_LOG_LINE(level, GPUDEV, RTE_FMT("gpu: "
> > RTE_FMT_HEAD(__VA_ARGS__ ,), \
> > -             RTE_FMT_TAIL(__VA_ARGS__ ,)))
> > +     RTE_LOG_LINE(level, GPUDEV, "" __VA_ARGS__)
>
> Suggestion:
> GPUDEV -> GPU, like DMA, not DMADEV.

I had not checked before, but for consistency, I would go the other way around.

$ for dir in lib/*dev; do git grep RTE_LOG_LINE $dir; done
lib/bbdev/rte_bbdev.c:  RTE_LOG_LINE(level, BBDEV, "" __VA_ARGS__)
lib/compressdev/rte_compressdev_internal.h:     RTE_LOG_LINE(level,
COMPRESSDEV, "%s(): " fmt, __func__, ## args)
lib/cryptodev/rte_cryptodev.h:  RTE_LOG_LINE(ERR, CRYPTODEV, \
lib/cryptodev/rte_cryptodev.h:  RTE_LOG_LINE(INFO, CRYPTODEV, "" __VA_ARGS__)
lib/cryptodev/rte_cryptodev.h:  RTE_LOG_LINE(DEBUG, CRYPTODEV, \
lib/cryptodev/rte_cryptodev.h:  RTE_LOG_LINE(DEBUG, CRYPTODEV, \
lib/dmadev/rte_dmadev.c:        RTE_LOG_LINE(level, DMA, "" __VA_ARGS__)
lib/ethdev/rte_ethdev.h:        RTE_LOG_LINE(level, ETHDEV, "" __VA_ARGS__)
lib/eventdev/eventdev_pmd.h:    RTE_LOG_LINE(ERR, EVENTDEV, \
lib/eventdev/eventdev_pmd.h:    RTE_LOG_LINE(DEBUG, EVENTDEV, \
lib/eventdev/rte_event_timer_adapter.c: RTE_LOG_LINE(level, logtype, \
lib/gpudev/gpudev.c:    RTE_LOG_LINE(level, GPUDEV, "" __VA_ARGS__)
lib/mldev/rte_mldev.h:  RTE_LOG_LINE(level, MLDEV, "%s(): " fmt,
__func__, ##args)
lib/rawdev/rte_rawdev_pmd.h:    RTE_LOG_LINE(level, RAWDEV, "%s(): "
fmt, __func__, ##args)
lib/regexdev/rte_regexdev.h:    RTE_LOG_LINE(level, REGEXDEV, "" __VA_ARGS__)


-- 
David Marchand


  reply	other threads:[~2024-01-25  8:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 12:04 David Marchand
2024-01-24 12:17 ` Morten Brørup
2024-01-25  8:13   ` David Marchand [this message]
2024-01-25  8:53     ` Morten Brørup
2024-01-24 13:26 ` Bruce Richardson
2024-01-24 13:28   ` Bruce Richardson
2024-01-24 14:39 ` Power, Ciara
2024-01-25  3:06 ` fengchengwen
2024-01-25 12:55 ` [PATCH v2] " David Marchand
2024-02-01  8:53   ` 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='CAJFAV8yF7uMFJMuNM1dPmTTs=tcC3a-UV039OMa4Hgn0hvGPjg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=eagostini@nvidia.com \
    --cc=fengchengwen@huawei.com \
    --cc=jerinj@marvell.com \
    --cc=kevin.laatz@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mb@smartsharesystems.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=zhirun.yan@intel.com \
    /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).