DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: dev@dpdk.org, "Thomas Monjalon" <thomas@monjalon.net>,
	"Nicolas Chautru" <nicolas.chautru@intel.com>,
	"Gagandeep Singh" <g.singh@nxp.com>,
	"Hemant Agrawal" <hemant.agrawal@nxp.com>,
	"Parav Pandit" <parav@nvidia.com>,
	"Xueming Li" <xuemingl@nvidia.com>,
	"Nipun Gupta" <nipun.gupta@amd.com>,
	"Nikhil Agarwal" <nikhil.agarwal@amd.com>,
	"Sachin Saxena" <sachin.saxena@nxp.com>,
	"Rosen Xu" <rosen.xu@intel.com>,
	"Tomasz Duszynski" <tduszynski@marvell.com>,
	"Chengwen Feng" <fengchengwen@huawei.com>,
	"Long Li" <longli@microsoft.com>, "Wei Hu" <weh@microsoft.com>,
	"Nithin Dabilpuram" <ndabilpuram@marvell.com>,
	"Kiran Kumar K" <kirankumark@marvell.com>,
	"Sunil Kumar Kori" <skori@marvell.com>,
	"Satha Rao" <skoteshwar@marvell.com>,
	"Harman Kalra" <hkalra@marvell.com>,
	"Anoob Joseph" <anoobj@marvell.com>,
	"Jingjing Wu" <jingjing.wu@intel.com>,
	"Chaoyong He" <chaoyong.he@corigine.com>,
	"Nagadheeraj Rottela" <rnagadheeraj@marvell.com>,
	"Srikanth Jampala" <jsrikanth@marvell.com>,
	"Kai Ji" <kai.ji@intel.com>, "Lee Daly" <lee.daly@intel.com>,
	"Pablo de Lara" <pablo.de.lara.guarch@intel.com>,
	"Fan Zhang" <fanzhang.oss@gmail.com>,
	"Ashish Gupta" <ashish.gupta@marvell.com>,
	"Zhangfei Gao" <zhangfei.gao@linaro.org>,
	"Sunila Sahu" <ssahu@marvell.com>,
	"Jack Bond-Preston" <jack.bond-preston@foss.arm.com>,
	"Ajit Khaparde" <ajit.khaparde@broadcom.com>,
	"Raveendra Padasalagi" <raveendra.padasalagi@broadcom.com>,
	"Vikas Gupta" <vikas.gupta@broadcom.com>,
	"Michael Shamis" <michaelsh@marvell.com>,
	"Liron Himi" <lironh@marvell.com>,
	"Jay Zhou" <jianjay.zhou@huawei.com>,
	"Bruce Richardson" <bruce.richardson@intel.com>,
	"Kevin Laatz" <kevin.laatz@intel.com>,
	"Conor Walsh" <conor.walsh@intel.com>,
	"Gowrishankar Muthukrishnan" <gmuthukrishn@marvell.com>,
	"Vidya Sagar Velumuri" <vvelumuri@marvell.com>,
	"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>,
	"Jerin Jacob" <jerinj@marvell.com>,
	"Pavan Nikhilesh" <pbhagavatula@marvell.com>,
	"Liang Ma" <liangma@liangbit.com>,
	"Peter Mccarthy" <peter.mccarthy@intel.com>,
	"Harry van Haaren" <harry.van.haaren@intel.com>,
	"Elena Agostini" <eagostini@nvidia.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	"Ciara Loftus" <ciara.loftus@intel.com>,
	"Maryam Tahhan" <mtahhan@redhat.com>,
	"Igor Russkikh" <irusskikh@marvell.com>,
	"Steven Webster" <steven.webster@windriver.com>,
	"Matt Peters" <matt.peters@windriver.com>,
	"Selwin Sebastian" <selwin.sebastian@amd.com>,
	"Julien Aube" <julien_dpdk@jaube.fr>,
	"Somnath Kotur" <somnath.kotur@broadcom.com>,
	"Wathsala Vithanage" <wathsala.vithanage@arm.com>,
	"Konstantin Ananyev" <konstantin.v.ananyev@yandex.ru>,
	"Shai Brandes" <shaibran@amazon.com>,
	"Evgeny Schemeilin" <evgenys@amazon.com>,
	"Ron Beider" <rbeider@amazon.com>,
	"Amit Bernstein" <amitbern@amazon.com>,
	"Wajeeh Atrash" <atrwajee@amazon.com>,
	"Apeksha Gupta" <apeksha.gupta@nxp.com>,
	"John Daley" <johndale@cisco.com>,
	"Hyong Youb Kim" <hyonkim@cisco.com>,
	"Gaetan Rivet" <grive@u256.net>,
	"Jeroen de Borst" <jeroendb@google.com>,
	"Rushil Gupta" <rushilg@google.com>,
	"Joshua Washington" <joshwash@google.com>,
	"Ziyang Xuan" <xuanziyang2@huawei.com>,
	"Xiaoyun Wang" <cloud.wangxiaoyun@huawei.com>,
	"Jie Hai" <haijie1@huawei.com>,
	"Yisen Zhuang" <yisen.zhuang@huawei.com>,
	"Jakub Grajciar" <jgrajcia@cisco.com>,
	"Matan Azrad" <matan@nvidia.com>,
	"Viacheslav Ovsiienko" <viacheslavo@nvidia.com>,
	"Zyta Szpak" <zr@semihalf.com>,
	"Martin Spinler" <spinler@cesnet.cz>,
	"Jiawen Wu" <jiawenwu@trustnetic.com>,
	"Tetsuya Mukawa" <mtetsuyah@gmail.com>,
	"Vamsi Attunuru" <vattunuru@marvell.com>,
	"Cristian Dumitrescu" <cristian.dumitrescu@intel.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	"Maciej Czekaj" <mczekaj@marvell.com>,
	"Jian Wang" <jianwang@trustnetic.com>,
	"Maxime Coquelin" <maxime.coquelin@redhat.com>,
	"Chenbo Xia" <chenbox@nvidia.com>,
	"Jochen Behrens" <jochen.behrens@broadcom.com>,
	"Jakub Palider" <jpalider@marvell.com>
Subject: Re: [PATCH 11/11] drivers: use per line logging in helpers
Date: Mon, 9 Sep 2024 08:55:39 +0200	[thread overview]
Message-ID: <CAJFAV8zZNA_MmbVy162zpQJEdXOk9t6NoC41CojLcPAh_UH05g@mail.gmail.com> (raw)
In-Reply-To: <28656e64-5684-452b-8df8-f60d7ce44e02@oktetlabs.ru>

On Sun, Sep 8, 2024 at 10:55 AM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
>
> On 9/7/24 17:54, David Marchand wrote:
> > Use RTE_LOG_LINE in existing macros that append a \n.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> [snip]
>
> > diff --git a/drivers/common/sfc_efx/sfc_efx_log.h b/drivers/common/sfc_efx/sfc_efx_log.h
> > index 1519ebdc17..b41ef3490b 100644
> > --- a/drivers/common/sfc_efx/sfc_efx_log.h
> > +++ b/drivers/common/sfc_efx/sfc_efx_log.h
> > @@ -12,11 +12,10 @@
> >
> >   /** Generic driver log type */
> >   extern int sfc_efx_logtype;
> > +#define RTE_LOGTYPE_SFC_EFX sfc_efx_logtype
> >
> >   /** Log message, add a prefix and a line break */
> >   #define SFC_EFX_LOG(level, ...) \
> > -     rte_log(RTE_LOG_ ## level, sfc_efx_logtype,                     \
> > -             RTE_FMT("sfc_efx: " RTE_FMT_HEAD(__VA_ARGS__ ,) "\n",   \
>
> Is "sfc_efx: " prefix dropped intentionally? Or should
> RTE_LOG_LINE_PREFIX be used?

By moving to the RTE_LOG macro (and friends), a prefix is
automatically appended via the log type.
#define RTE_LOG(l, t, ...)                                      \
         rte_log(RTE_LOG_ ## l,                                 \
                 RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__)

So here, the logs prefix is not dropped, but changed from sfc_efx: to SFC_EFX:

It is possible to keep it unchanged by defining RTE_LOGTYPE_sfc_efx is
you want to stick to it.


-- 
David Marchand


  reply	other threads:[~2024-09-09  6:55 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 14:54 [PATCH 00/11] Use RTE_LOG_LINE in drivers David Marchand
2024-09-07 14:54 ` [PATCH 01/11] devtools: fix forbidden token check with multiple files David Marchand
2024-09-07 14:54 ` [PATCH 02/11] devtools: report all warnings in forbidden token check David Marchand
2024-09-07 14:54 ` [PATCH 03/11] net/dpaa: remove broken debug macros David Marchand
2024-09-07 14:54 ` [PATCH 04/11] net/sfc: fix driver logtype token David Marchand
2024-09-08  8:35   ` Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 05/11] drivers: reuse default logtype for SFC drivers David Marchand
2024-09-08  8:44   ` Andrew Rybchenko
2024-09-07 14:54 ` [PATCH 06/11] drivers: move log wrappers to Intel base drivers David Marchand
2024-09-07 14:54 ` [PATCH 07/11] net/txgbe: move wrapper to base driver David Marchand
2024-09-09  6:18   ` Jiawen Wu
2024-09-09  6:50     ` David Marchand
2024-09-09  7:23       ` Jiawen Wu
2024-09-07 14:54 ` [PATCH 08/11] drivers: replace logging helpers David Marchand
2024-09-07 14:54 ` [PATCH 09/11] drivers: remove redundant newline from logs David Marchand
2024-09-09  1:09   ` fengchengwen
2024-09-07 14:54 ` [PATCH 10/11] drivers: split multilines log messages David Marchand
2024-09-07 14:54 ` [PATCH 11/11] drivers: use per line logging in helpers David Marchand
2024-09-08  8:55   ` Andrew Rybchenko
2024-09-09  6:55     ` David Marchand [this message]
2024-09-09  7:23       ` Andrew Rybchenko
2024-09-09  1:19   ` fengchengwen
2024-09-10 10:56   ` David Marchand
2024-09-12  8:26 ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-12  8:26   ` [PATCH v2 01/14] devtools: fix forbidden token check with multiple files David Marchand
2024-09-12 13:54     ` Thomas Monjalon
2024-09-12  8:26   ` [PATCH v2 02/14] devtools: report all warnings in forbidden token check David Marchand
2024-09-12 14:10     ` Thomas Monjalon
2024-09-12  8:26   ` [PATCH v2 03/14] net/dpaa: remove broken debug macros David Marchand
2024-10-01 10:18     ` Thomas Monjalon
2024-10-01 12:08       ` David Marchand
2024-10-01 13:00         ` Hemant Agrawal
2024-09-12  8:26   ` [PATCH v2 04/14] net/sfc: fix driver logtype token David Marchand
2024-09-12  8:26   ` [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers David Marchand
2024-09-12  8:26   ` [PATCH v2 06/14] drivers: move log wrappers to Intel base drivers David Marchand
2024-09-12  8:26   ` [PATCH v2 07/14] net/txgbe: move wrapper to base driver David Marchand
2024-09-12  8:26   ` [PATCH v2 08/14] event/dlb2: fix base driver logs David Marchand
2024-09-12  8:26   ` [PATCH v2 09/14] event/dsw: use a dynamic logtype David Marchand
2024-09-12  8:26   ` [PATCH v2 10/14] drivers: replace logging helpers David Marchand
2024-09-12  8:26   ` [PATCH v2 11/14] drivers: remove redundant newline from logs David Marchand
2024-09-12  8:26   ` [PATCH v2 12/14] drivers: split multilines log messages David Marchand
2024-09-12  8:26   ` [PATCH v2 13/14] net/octeon_ep: avoid warning on uninitialized variable David Marchand
2024-09-12  8:26   ` [PATCH v2 14/14] drivers: use per line logging in helpers David Marchand
2024-10-01 12:10     ` Thomas Monjalon
2024-09-16  9:32   ` [PATCH v2 00/14] Use RTE_LOG_LINE in drivers David Marchand
2024-09-16 15:13   ` Patrick Robb
2024-10-04 13:04   ` 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=CAJFAV8zZNA_MmbVy162zpQJEdXOk9t6NoC41CojLcPAh_UH05g@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=amitbern@amazon.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=anoobj@marvell.com \
    --cc=apeksha.gupta@nxp.com \
    --cc=ashish.gupta@marvell.com \
    --cc=atrwajee@amazon.com \
    --cc=bruce.richardson@intel.com \
    --cc=chaoyong.he@corigine.com \
    --cc=chenbox@nvidia.com \
    --cc=ciara.loftus@intel.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=conor.walsh@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=eagostini@nvidia.com \
    --cc=evgenys@amazon.com \
    --cc=fanzhang.oss@gmail.com \
    --cc=fengchengwen@huawei.com \
    --cc=g.singh@nxp.com \
    --cc=gmuthukrishn@marvell.com \
    --cc=grive@u256.net \
    --cc=haijie1@huawei.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=hkalra@marvell.com \
    --cc=hyonkim@cisco.com \
    --cc=irusskikh@marvell.com \
    --cc=jack.bond-preston@foss.arm.com \
    --cc=jerinj@marvell.com \
    --cc=jeroendb@google.com \
    --cc=jgrajcia@cisco.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=jianwang@trustnetic.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=jingjing.wu@intel.com \
    --cc=jochen.behrens@broadcom.com \
    --cc=johndale@cisco.com \
    --cc=joshwash@google.com \
    --cc=jpalider@marvell.com \
    --cc=jsrikanth@marvell.com \
    --cc=julien_dpdk@jaube.fr \
    --cc=kai.ji@intel.com \
    --cc=kevin.laatz@intel.com \
    --cc=kirankumark@marvell.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=lee.daly@intel.com \
    --cc=liangma@liangbit.com \
    --cc=linville@tuxdriver.com \
    --cc=lironh@marvell.com \
    --cc=longli@microsoft.com \
    --cc=matan@nvidia.com \
    --cc=matt.peters@windriver.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mczekaj@marvell.com \
    --cc=michaelsh@marvell.com \
    --cc=mtahhan@redhat.com \
    --cc=mtetsuyah@gmail.com \
    --cc=ndabilpuram@marvell.com \
    --cc=nicolas.chautru@intel.com \
    --cc=nikhil.agarwal@amd.com \
    --cc=nipun.gupta@amd.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=parav@nvidia.com \
    --cc=pbhagavatula@marvell.com \
    --cc=peter.mccarthy@intel.com \
    --cc=raveendra.padasalagi@broadcom.com \
    --cc=rbeider@amazon.com \
    --cc=rnagadheeraj@marvell.com \
    --cc=rosen.xu@intel.com \
    --cc=rushilg@google.com \
    --cc=sachin.saxena@nxp.com \
    --cc=selwin.sebastian@amd.com \
    --cc=shaibran@amazon.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=spinler@cesnet.cz \
    --cc=ssahu@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=steven.webster@windriver.com \
    --cc=tduszynski@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=vattunuru@marvell.com \
    --cc=viacheslavo@nvidia.com \
    --cc=vikas.gupta@broadcom.com \
    --cc=vvelumuri@marvell.com \
    --cc=wathsala.vithanage@arm.com \
    --cc=weh@microsoft.com \
    --cc=xuanziyang2@huawei.com \
    --cc=xuemingl@nvidia.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhangfei.gao@linaro.org \
    --cc=zr@semihalf.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).