From patchwork Wed Apr 12 03:12:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenzhuo Lu X-Patchwork-Id: 23583 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id DFB792A6C; Wed, 12 Apr 2017 05:12:24 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 71DAD108D for ; Wed, 12 Apr 2017 05:12:23 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 11 Apr 2017 20:12:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.37,188,1488873600"; d="scan'208"; a="1118432969" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 11 Apr 2017 20:12:21 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 11 Apr 2017 20:12:21 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 11 Apr 2017 20:12:21 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002; Wed, 12 Apr 2017 11:12:19 +0800 From: "Lu, Wenzhuo" To: "Zhang, Helin" , "Richardson, Bruce" CC: Olivier Matz , "dev@dpdk.org" , "Wu, Jingjing" , "Yigit, Ferruh" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: disable init and driver logs by default Thread-Index: AQHSruKmRItniME+sUWShdizDJJZrKG34omAgAC/1oCACHRjIA== Date: Wed, 12 Apr 2017 03:12:18 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B597D61@shsmsx102.ccr.corp.intel.com> References: <20170406141655.15097-1-olivier.matz@6wind.com> <20170406143642.GA9928@bricha3-MOBL3.ger.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: disable init and driver logs by default 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, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang, Helin > Sent: Friday, April 7, 2017 10:03 AM > To: Richardson, Bruce > Cc: Olivier Matz; dev@dpdk.org; Wu, Jingjing; Yigit, Ferruh > Subject: Re: [dpdk-dev] [PATCH] net/i40e: disable init and driver logs by > default > > > > > -----Original Message----- > > From: Richardson, Bruce > > Sent: Thursday, April 6, 2017 10:37 PM > > To: Zhang, Helin > > Cc: Olivier Matz; dev@dpdk.org; Wu, Jingjing; Yigit, Ferruh > > Subject: Re: [PATCH] net/i40e: disable init and driver logs by default > > > > On Thu, Apr 06, 2017 at 03:31:23PM +0100, Zhang, Helin wrote: > > > > > > > > > -----Original Message----- > > > From: Olivier Matz [mailto:olivier.matz@6wind.com] > > > Sent: Thursday, April 6, 2017 10:17 PM > > > To: dev@dpdk.org > > > Cc: Zhang, Helin ; Wu, Jingjing > > > ; Richardson, Bruce > > > ; Yigit, Ferruh > > > Subject: [PATCH] net/i40e: disable init and driver logs by default > > > > > > Since "net/i40e: use dynamic log type for control logs", the i40e > > > driver is > > more verbose by default, which could result in testpmd being flooded > > by log messages in some conditions: > > > > > > Checking link statuses... > > > i40e_dev_handle_aq_msg(): Request 2561 is not supported yet > > > i40e_dev_handle_aq_msg(): Request 2561 is not supported yet > > > i40e_dev_handle_aq_msg(): Request 2561 is not supported yet > > > i40e_dev_handle_aq_msg(): Request 2561 is not supported yet > > > Port 0 Link Up - speed 40000 Mbps - full-duplex > > > Port 1 Link Up - speed 40000 Mbps - full-duplex > > > Done > > > testpmd> i40e_dev_handle_aq_msg(): Request 4097 is not supported > yet > > > i40e_dev_handle_aq_msg(): Request 4097 is not supported yet > > > i40e_dev_handle_aq_msg(): Request 4097 is not supported yet > > > > > > Fix this by disabling the dynamic logs by default. It is still > > > possible to enable > > them at runtime. > > > > > > Fixes: c143e5a3d9e1 ("net/i40e: use dynamic log type for control > > > logs") > > > > > > Signed-off-by: Olivier Matz > > > Acked-by: Helin Zhang > > > --- > > > drivers/net/i40e/i40e_ethdev.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > > b/drivers/net/i40e/i40e_ethdev.c index cb8bf2b49..86f5669f0 100644 > > > --- a/drivers/net/i40e/i40e_ethdev.c > > > +++ b/drivers/net/i40e/i40e_ethdev.c > > > @@ -12456,8 +12456,8 @@ i40e_init_log(void) { > > > i40e_logtype_init = rte_log_register("pmd.i40e.init"); > > > if (i40e_logtype_init >= 0) > > > - rte_log_set_level(i40e_logtype_init, RTE_LOG_NOTICE); > > > + rte_log_set_level(i40e_logtype_init, RTE_LOG_EMERG); > > > i40e_logtype_driver = rte_log_register("pmd.i40e.driver"); > > > if (i40e_logtype_driver >= 0) > > > - rte_log_set_level(i40e_logtype_driver, RTE_LOG_NOTICE); > > > + rte_log_set_level(i40e_logtype_driver, RTE_LOG_EMERG); > > > } > > > -- > > > > Hi Helin, > > > > Is this the correct fix? IMHO, if this is a problem, then we should > > surely not be hiding and ignoring the error. If it's not a problem, > > then the log level should be reduced to a lower level, e.g. INFO or NOTICE. > > > > Alternatively, this code could be modified to only print an error once > > for each unsupported request type. > > > > Ideally both solutions should be used, I think. I'm not sure I like > > setting the default log level to just show EMERG messages. > > > > Regards, > > /Bruce > Bruce, this is not a fix for the issue, which is under investigation by > developers now. > > For the by default log level, any guideline for that? > I was OK with that changes, but not sure if there is any better choices. To my opinion, it's not appropriate to say something not supported is an error. How about fix this problem like, diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 6927fde..91df587 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5794,7 +5794,7 @@ struct i40e_vsi * } break; default: - PMD_DRV_LOG(ERR, "Request %u is not supported yet", + PMD_DRV_LOG(DEBUG, "Request %u is not supported yet", opcode); break; }