DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>
Cc: Ivan Malov <ivan.malov@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH 2/6] net/sfc: add support for driver-wide dynamic logging
Date: Tue, 6 Mar 2018 17:56:14 +0300	[thread overview]
Message-ID: <8b5e125d-b04a-b992-e99a-16412f8703d3@solarflare.com> (raw)
In-Reply-To: <df846bf1-3edf-5754-ffa7-0f75aa5bfdb3@solarflare.com>

On 03/06/2018 05:45 PM, Andrew Rybchenko wrote:
> On 03/05/2018 05:59 PM, Ferruh Yigit wrote:
>> On 1/25/2018 5:00 PM, Andrew Rybchenko wrote:
>>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>>
>>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
>> <...>
>>
>>> @@ -2082,3 +2084,14 @@ RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx,
>>>       SFC_KVARG_STATS_UPDATE_PERIOD_MS "=<long> "
>>>       SFC_KVARG_MCDI_LOGGING "=" SFC_KVARG_VALUES_BOOL " "
>>>       SFC_KVARG_DEBUG_INIT "=" SFC_KVARG_VALUES_BOOL);
>>> +
>>> +RTE_INIT(sfc_driver_register_logtype);
>>> +static void
>>> +sfc_driver_register_logtype(void)
>>> +{
>>> +    int ret;
>>> +
>>> +    ret = rte_log_register_type_and_pick_level(SFC_LOGTYPE_PREFIX 
>>> "driver",
>>> +                           RTE_LOG_NOTICE);
>> No benefit of using rte_log_register_type_and_pick_level() here, in 
>> this stage
>> "opt_loglevel_list" will be empty and this will be same as 
>> rte_log_register()
>
> That's true except "uniform approach is good". I.e. simply use
> rte_log_register_type_and_pick_level() everywhere to make it safe against
> code movements.
> In fact it was raised during internal review and we kept as you can 
> see it.
>
> Other option is to avoid usage of constructor here at all and move it 
> to probe.
> Yes, it will be tried many times, but there is no harm if it is 
> already registered.

In fact it could be really required if dynamic library is used and it is
pulled later using dlopen() - don't know if there are any restrictions in
DPDK which prevent it.

  reply	other threads:[~2018-03-06 14:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 17:00 [dpdk-dev] [PATCH 0/6] net/sfc: implement " Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 1/6] eal: register log type and pick level from EAL args Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 2/6] net/sfc: add support for driver-wide dynamic logging Andrew Rybchenko
2018-01-25 18:42   ` Stephen Hemminger
2018-01-26  6:51     ` Andrew Rybchenko
2018-03-05 14:59   ` Ferruh Yigit
2018-03-06 14:45     ` Andrew Rybchenko
2018-03-06 14:56       ` Andrew Rybchenko [this message]
2018-03-06 15:26         ` Ferruh Yigit
2018-01-25 17:00 ` [dpdk-dev] [PATCH 3/6] net/sfc: add support for per-port " Andrew Rybchenko
2018-03-15 15:45   ` Ferruh Yigit
2018-01-25 17:00 ` [dpdk-dev] [PATCH 4/6] net/sfc: prepare to merge init logs with main log type Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 5/6] net/sfc: remove dedicated init log parameter Andrew Rybchenko
2018-01-25 17:00 ` [dpdk-dev] [PATCH 6/6] net/sfc: add dynamic log level for MCDI messages Andrew Rybchenko
2018-01-25 21:38 ` [dpdk-dev] [PATCH 0/6] net/sfc: implement dynamic logging Thomas Monjalon
2018-01-26  5:59   ` Andrew Rybchenko
2018-01-26  7:44     ` Thomas Monjalon
2018-02-15 11:35 ` [dpdk-dev] [PATCH v2] eal: register log type and pick level from EAL args Andrew Rybchenko
2018-03-05 15:00 ` [dpdk-dev] [PATCH 0/6] net/sfc: implement dynamic logging Ferruh Yigit
2018-03-21 11:28 ` [dpdk-dev] [PATCH v3 " Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 1/6] eal: register log type and pick level from EAL args Andrew Rybchenko
2018-03-22 10:21     ` Ferruh Yigit
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 2/6] net/sfc: add support for driver-wide dynamic logging Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 3/6] net/sfc: add support for per-port " Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 4/6] net/sfc: prepare to merge init logs with main log type Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 5/6] net/sfc: remove dedicated init log parameter Andrew Rybchenko
2018-03-21 11:28   ` [dpdk-dev] [PATCH v3 6/6] net/sfc: add dynamic log level for MCDI messages Andrew Rybchenko
2018-03-22 10:22   ` [dpdk-dev] [PATCH v3 0/6] net/sfc: implement dynamic logging Ferruh Yigit

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=8b5e125d-b04a-b992-e99a-16412f8703d3@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.malov@oktetlabs.ru \
    /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).