DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: Andrew Rybchenko <arybchenko@solarflare.com>,
	 Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	dev <dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>,
	 Olivier Matz <olivier.matz@6wind.com>
Subject: Re: [dpdk-dev] [PATCH 01/13] eal/log: introduce log register macro
Date: Tue, 30 Jun 2020 20:12:52 +0530	[thread overview]
Message-ID: <CALBAE1PK2GKk3gjHMh_NhytYci6U1H1CKK_Vpe+42KCp52BTUg@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8yLEusRy+bzotXhZJHT4kvZek4Wx0mOVfhqoPEpHXU_KQ@mail.gmail.com>

On Tue, Jun 30, 2020 at 7:09 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Jun 26, 2020 at 2:38 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> > > Or no declaration in macro and leave code as it is.
> >
> > I dont see anything wrong with that. Do you have technical rationale
> > for the above rule?
>
> Avoid global symbols when unneeded.
> Global symbols can be hidden with shared build, but that's not the
> case with static build.
>
> This is why we try to maintain a namespace for DPDK api.
>
> For logtypes, a lot of those are already global and nobody complained
> about them (lucky ?).
>
> With this patch, the static ones, that we would convert to global
> symbols, are the following:
> drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c:static int
> fpga_5gnr_fec_logtype;
> drivers/baseband/fpga_lte_fec/fpga_lte_fec.c:static int fpga_lte_fec_logtype;
> drivers/baseband/null/bbdev_null.c:static int bbdev_null_logtype;
> drivers/baseband/turbo_sw/bbdev_turbo_software.c:static int
> bbdev_turbo_sw_logtype;
> drivers/net/af_packet/rte_eth_af_packet.c:static int af_packet_logtype;
> drivers/net/af_xdp/rte_eth_af_xdp.c:static int af_xdp_logtype;
> drivers/net/kni/rte_eth_kni.c:static int eth_kni_logtype;
> drivers/net/null/rte_eth_null.c:static int eth_null_logtype;
> drivers/net/pcap/rte_eth_pcap.c:static int eth_pcap_logtype;
> drivers/net/ring/rte_eth_ring.c:static int eth_ring_logtype;
> drivers/net/softnic/rte_eth_softnic.c:static int pmd_softnic_logtype;
> drivers/net/vdev_netvsc/vdev_netvsc.c:static int vdev_netvsc_logtype;
> drivers/net/vhost/rte_eth_vhost.c:static int vhost_logtype;
> drivers/vdpa/ifc/ifcvf_vdpa.c:static int ifcvf_vdpa_logtype;
> lib/librte_bbdev/rte_bbdev.c:static int bbdev_logtype;
> lib/librte_cfgfile/rte_cfgfile.c:static int cfgfile_logtype;
> lib/librte_eventdev/rte_event_timer_adapter.c:static int evtim_logtype;
> lib/librte_eventdev/rte_event_timer_adapter.c:static int evtim_buffer_logtype;
> lib/librte_eventdev/rte_event_timer_adapter.c:static int evtim_svc_logtype;
> lib/librte_pdump/rte_pdump.c:static int pdump_logtype;
>
> All of them follow some kind of convention of finishing with _logtype.
> Is this enough and we won't trigger link issues in existing applications?
> Probably not possible to tell.
>
> There was a similar discussion with Gaetan in the pci bus code, and so
> far we are still in this status quo for global symbols.
>
> So ok, let's go with this embedded global symbol.

OK.

> If we hit an issue with static linking, we will need a tree-wide cleanup.
>
>
> > > > > - Having components set log levels at init time in the macro is a bug to me.
> > > > > This has been worked around with
> > > > > rte_log_register/rte_log_register_and_pick_level but the initial
> > > > > problem is that rte_log_set_level* should only be called by the user.
> > > >
> > > > I agree with the below stuff, That's is not introduced by this patch.
> > > > It is already there.
> > > > Be it macro or no macro code.
> > > >
> > > > I think this patch helps to change to new scheme as it takes care of
> > > > changing the
> > > > registration part to commonplace so that we can set to the same level
> > > > in the future if
> > > > everyone agrees to it
> > >
> > > We will still expose this macro meaning that we will have an API breakage later.
> > > So if we go with introducing this, let's make it good from the start.
> >
> > But Is everyone OK with removing the "level" from the register before
> > we think about
> > breaking the API later?. I see PMD uses multiple levels in the same
> > PMD for different
> > purposes.
>
> It is an API fix to me, as there should be no place for "level" interpretation.
>
>
> Just a note, a v2 would be necessary for the
> rte_log_register_type_and_pick_level use in any case.

I will send v2 with rte_log_register_type_and_pick_level change and
rebase to ToT.

>
> --
> David Marchand
>

  reply	other threads:[~2020-06-30 14:43 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17  6:30 [dpdk-dev] [PATCH 00/13] rte_log registration usage improvement jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 01/13] eal/log: introduce log register macro jerinj
2020-06-17 10:00   ` Thomas Monjalon
2020-06-17 10:26     ` Andrew Rybchenko
2020-06-24 13:08       ` Jerin Jacob
2020-06-17 10:02   ` David Marchand
2020-06-17 10:21     ` Andrew Rybchenko
2020-06-24 13:11       ` Jerin Jacob
2020-06-24 15:26         ` Andrew Rybchenko
2020-06-24 15:32           ` Jerin Jacob
2020-06-24 15:43             ` Andrew Rybchenko
2020-06-24 18:10               ` Jerin Jacob
2020-06-26 11:16                 ` Jerin Jacob
2020-06-26 11:42                   ` David Marchand
2020-06-26 12:06                     ` Jerin Jacob
2020-06-26 12:13                       ` David Marchand
2020-06-26 12:16                       ` David Marchand
2020-06-26 12:37                         ` Jerin Jacob
2020-06-29 13:39                           ` Jerin Jacob
2020-06-30 13:39                           ` David Marchand
2020-06-30 14:42                             ` Jerin Jacob [this message]
2020-06-21  9:30   ` Sachin Saxena (OSS)
2020-06-17  6:30 ` [dpdk-dev] [PATCH 02/13] lib: use " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 03/13] drivers/vdpa: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 04/13] drivers/raw: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 05/13] drivers/net: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 06/13] drivers/mempool: " jerinj
2020-06-21  9:46   ` Sachin Saxena (OSS)
2020-06-17  6:30 ` [dpdk-dev] [PATCH 07/13] drivers/event: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 08/13] drivers/crypto: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 09/13] drivers/compress: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 10/13] drivers/common: " jerinj
2020-06-21  9:48   ` Sachin Saxena (OSS)
2020-06-17  6:30 ` [dpdk-dev] [PATCH 11/13] drivers/bus: " jerinj
2020-06-21  9:52   ` Sachin Saxena (OSS)
2020-06-17  6:30 ` [dpdk-dev] [PATCH 12/13] drivers/baseband: " jerinj
2020-06-17  6:30 ` [dpdk-dev] [PATCH 13/13] app/test: " jerinj
2020-06-25 16:18 ` [dpdk-dev] [PATCH 00/13] rte_log registration usage improvement Dybkowski, AdamX
2020-06-25 16:20   ` Dybkowski, AdamX
2020-07-01  3:58 ` [dpdk-dev] [PATCH v2 " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 01/13] eal/log: introduce log register macro jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 02/13] lib: use " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 03/13] drivers/vdpa: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 04/13] drivers/raw: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 05/13] drivers/net: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 06/13] drivers/mempool: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 07/13] drivers/event: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 08/13] drivers/crypto: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 09/13] drivers/compress: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 10/13] drivers/common: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 11/13] drivers/bus: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 12/13] drivers/baseband: " jerinj
2020-07-01  3:58   ` [dpdk-dev] [PATCH v2 13/13] app/test: " jerinj
2020-07-01  6:48   ` [dpdk-dev] [PATCH v3 00/13] rte_log registration usage improvement jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 01/13] eal/log: introduce log register macro jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 02/13] lib: use " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 03/13] drivers/vdpa: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 04/13] drivers/raw: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 05/13] drivers/net: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 06/13] drivers/mempool: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 07/13] drivers/event: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 08/13] drivers/crypto: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 09/13] drivers/compress: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 10/13] drivers/common: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 11/13] drivers/bus: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 12/13] drivers/baseband: " jerinj
2020-07-01  6:48     ` [dpdk-dev] [PATCH v3 13/13] app/test: " jerinj
2020-07-01 10:44     ` [dpdk-dev] [PATCH v4 00/13] rte_log registration usage improvement jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 01/13] eal/log: introduce log register macro jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 02/13] lib: use " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 03/13] drivers/vdpa: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 04/13] drivers/raw: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 05/13] drivers/net: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 06/13] drivers/mempool: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 07/13] drivers/event: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 08/13] drivers/crypto: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 09/13] drivers/compress: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 10/13] drivers/common: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 11/13] drivers/bus: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 12/13] drivers/baseband: " jerinj
2020-07-01 10:44       ` [dpdk-dev] [PATCH v4 13/13] app/test: " jerinj
2020-07-01 12:33       ` [dpdk-dev] [PATCH v5 00/13] rte_log registration usage improvement jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 01/13] eal/log: introduce log register macro jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 02/13] lib: use " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 03/13] drivers/vdpa: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 04/13] drivers/raw: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 05/13] drivers/net: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 06/13] drivers/mempool: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 07/13] drivers/event: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 08/13] drivers/crypto: " jerinj
2020-07-02 17:59           ` Akhil Goyal
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 09/13] drivers/compress: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 10/13] drivers/common: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 11/13] drivers/bus: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 12/13] drivers/baseband: " jerinj
2020-07-01 12:33         ` [dpdk-dev] [PATCH v5 13/13] app/test: " jerinj
2020-07-03 13:55         ` [dpdk-dev] [PATCH v5 00/13] rte_log registration usage improvement David Marchand
2020-07-06  9:31           ` Jerin Jacob

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=CALBAE1PK2GKk3gjHMh_NhytYci6U1H1CKK_Vpe+42KCp52BTUg@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=arybchenko@solarflare.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=olivier.matz@6wind.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).