DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <huwei013@chinasoftinc.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <xavier.huwei@huawei.com>
Subject: Re: [dpdk-dev] [PATCH 08/11] net/hns3: change the log level to INFO
Date: Mon, 7 Sep 2020 20:28:01 +0800
Message-ID: <bc56b00d-ebc0-3ed4-8bd5-5150b11f0178@chinasoftinc.com> (raw)
In-Reply-To: <08689091-37ab-9868-1ac9-5b8e8092ff73@intel.com>

Hi, Ferruh Yigit

On 2020/9/7 20:10, Ferruh Yigit wrote:
> On 9/7/2020 12:34 PM, Wei Hu (Xavier) wrote:
>> Hi,Ferruh Yigit
>>
>> On 2020/9/4 18:34, Ferruh Yigit wrote:
>>> On 8/25/2020 12:53 PM, Wei Hu (Xavier) wrote:
>>>> From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
>>>>
>>>> This patch changes the log level from NOTICE to INFO.
>>>>
>>>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>>>> ---
>>>>    drivers/net/hns3/hns3_ethdev.c | 4 ++--
>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
>>>> index fca035d4f..3827d3277 100644
>>>> --- a/drivers/net/hns3/hns3_ethdev.c
>>>> +++ b/drivers/net/hns3/hns3_ethdev.c
>>>> @@ -5744,5 +5744,5 @@ static struct rte_pci_driver rte_hns3_pmd = {
>>>>    RTE_PMD_REGISTER_PCI(net_hns3, rte_hns3_pmd);
>>>>    RTE_PMD_REGISTER_PCI_TABLE(net_hns3, pci_id_hns3_map);
>>>>    RTE_PMD_REGISTER_KMOD_DEP(net_hns3, "* igb_uio | vfio-pci");
>>>> -RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, NOTICE);
>>>> -RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, NOTICE);
>>>> +RTE_LOG_REGISTER(hns3_logtype_init, pmd.net.hns3.init, INFO);
>>>> +RTE_LOG_REGISTER(hns3_logtype_driver, pmd.net.hns3.driver, INFO);
>>>>
>>> Why making the PMD more verbose by default? You can update the log level
>>> dynamically when need to be more verbose.
>>>
>>> Common approach is to set default PMD log level is to 'NOTICE', I think this is
>>> good to make applications more usable.
>> Currently hns3 PMD driver invokes the private macro named hns3_info in
>> several places, we found that these information wouldn't never be logged.
>>       hns3_info -> rte_log(RTE_LOG_INFO, hns3_logtype_dirver,...)
>>
>> To display the related log information, we need to execute the following
>> code in the application, right? Is there any other way?
>> extern int hns3_logtype_driver;
>> rte_log_set_level(hns3_logtype_driver, RTE_LOG_INFO);
>>
> Hi Xavier,
>
> This is mainly it. Setting log level to something ">= 'RTE_LOG_INFO'" using
> 'rte_log_set_level()' will display INFO level logs.
>
> There are some variant functions too, 'rte_log_set_level_pattern()' &
> 'rte_log_set_level_regexp()', these let use change log level of multiple
> components, like "pmd.net.*"
>
> Another way is provide the log level to application via eal command
> "--log-level=<type-match>:<int>", like "--log-level=*:debug". This arg is
> wrapper to above APIs.
>
> Or if you are using testpmd, can change the log level via command "set log"
> dynamically, like "set log pmd.net.hns3*".
> Applications can do something similar to change log levels on demand based on
> their need, so components doesn't need to be verbose by default.
>
Thanks for your detail description.

Regards

Xavier


  reply	other threads:[~2020-09-07 12:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 11:52 [dpdk-dev] [PATCH 00/11] updates for hns3 PMD driver Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 01/11] net/hns3: get device capability from firmware Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 02/11] net/hns3: get dev specifications " Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 03/11] net/hns3: compatibility issues about Rx interrupts Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 04/11] net/hns3: compatibility issues about Tx padding short frame Wei Hu (Xavier)
2020-08-25 11:52 ` [dpdk-dev] [PATCH 05/11] net/hns3: add more hardware error types Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit
2020-08-25 11:53 ` [dpdk-dev] [PATCH 06/11] net/hns3: support a maximun 256 FDIR counter Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 07/11] net/hns3: replace private macro with RTE MAX Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 08/11] net/hns3: change the log level to INFO Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit
2020-09-07 11:34     ` Wei Hu (Xavier)
2020-09-07 12:10       ` Ferruh Yigit
2020-09-07 12:28         ` Wei Hu (Xavier) [this message]
2020-08-25 11:53 ` [dpdk-dev] [PATCH 09/11] net/hns3: fix default MAC addr from firmware Wei Hu (Xavier)
2020-08-25 11:53 ` [dpdk-dev] [PATCH 10/11] net/hns3: fix Rx/Tx queue offload capability Wei Hu (Xavier)
2020-09-04 10:34   ` Ferruh Yigit
2020-09-08 11:48     ` Wei Hu (Xavier)
2020-09-08 12:28   ` [dpdk-dev] [PATCH v2] " Wei Hu (Xavier)
2020-09-15 13:35     ` Ferruh Yigit
2020-08-25 11:53 ` [dpdk-dev] [PATCH 11/11] net/hns3: fix some incomplete command structures Wei Hu (Xavier)
2020-09-03  1:04 ` [dpdk-dev] [PATCH 00/11] updates for hns3 PMD driver Wei Hu (Xavier)
2020-09-04 10:34   ` 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=bc56b00d-ebc0-3ed4-8bd5-5150b11f0178@chinasoftinc.com \
    --to=huwei013@chinasoftinc.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=xavier.huwei@huawei.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git