From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2AFAFA04B5; Mon, 7 Sep 2020 13:35:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 858F41C0D2; Mon, 7 Sep 2020 13:35:05 +0200 (CEST) Received: from mail.chinasoftinc.com (unknown [114.113.233.8]) by dpdk.org (Postfix) with ESMTP id E063B1BE85 for ; Mon, 7 Sep 2020 13:35:02 +0200 (CEST) Received: from [192.168.1.199] (139.159.243.11) by INCCAS002.ito.icss (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 19:35:00 +0800 To: Ferruh Yigit , "Wei Hu (Xavier)" , CC: References: <20200825115305.58490-1-huwei013@chinasoftinc.com> <20200825115305.58490-9-huwei013@chinasoftinc.com> From: "Wei Hu (Xavier)" Message-ID: <35059247-3bfb-67c6-85fa-1b77a07d37aa@chinasoftinc.com> Date: Mon, 7 Sep 2020 19:34:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [139.159.243.11] Subject: Re: [dpdk-dev] [PATCH 08/11] net/hns3: change the log level to INFO X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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)" >> >> This patch changes the log level from NOTICE to INFO. >> >> Signed-off-by: Wei Hu (Xavier) >> --- >> 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); Thanks, Xavier >