> -----Original Message----- > From: Olivier MATZ [mailto:olivier.m...@6wind.com] > Sent: Thursday, April 6, 2017 11:17 PM > To: Richardson, Bruce > Cc: Zhang, Helin; dev@dpdk.org; Wu, Jingjing; Yigit, Ferruh > Subject: Re: [PATCH] net/i40e: disable init and driver logs by default > > On Thu, 6 Apr 2017 15:36:43 +0100, Bruce Richardson > <bruce.richard...@intel.com> wrote: > > On Thu, Apr 06, 2017 at 03:31:23PM +0100, Zhang, Helin wrote: > > > > > > > > > -----Original Message----- > > > From: Olivier Matz [mailto:olivier.m...@6wind.com] > > > Sent: Thursday, April 6, 2017 10:17 PM > > > To: dev@dpdk.org > > > Cc: Zhang, Helin <helin.zh...@intel.com>; Wu, Jingjing > > > <jingjing...@intel.com>; Richardson, Bruce > > > <bruce.richard...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com> > > > 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 <olivier.m...@6wind.com> > > > Acked-by: Helin Zhang <helin.zh...@intel.com> > > > --- > > > 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. > > Yes, now that these logs are not stripped at compilation, we should do an > effort to have the proper default log value (notice, warning, error?), and > have > the proper log level on each log, depending on its criticality and maybe its > frequency (maybe we'll want to rate limit the logs in the future). > > This is a more global discussion, which is not especially related to i40e > (the only > part of code that currently use dynamic logs). > > Olivier The issue is being analyzed now, definitely we will track that with a conclusion of a fix or not an issue. So it will not be missed. Thanks for your reminder! For the patch itself, I am OK with that changes.
Regards, Helin