Re: [PATCH net-next 07/11] net: hns3: adds debug messages to identify eth down cause

From: liuyonglong
Date: Thu Jul 25 2019 - 22:33:58 EST

As Saeed said, we will use netif_msg_drv() which is default off, this
can be easily open with ethtool.
Thanks for your reply!

On 2019/7/26 9:28, Jakub Kicinski wrote:
> On Thu, 25 Jul 2019 21:59:08 +0000, Saeed Mahameed wrote:
>> I couldn't find any rules regarding what to put in kernel log, Maybe
>> someone can share ?. but i vaguely remember that the recommendation
>> for device drivers is to put nothing, only error/warning messages.
> FWIW my understanding is also that only error/warning messages should
> be printed. IOW things which should "never happen".
> There are some historical exceptions. Probe logs for instance may be
> useful, because its not trivial to get to the device if probe fails.
> Another one is ethtool flashing, if it takes time we used to print into
> logs some message like "please wait patiently". But since Jiri added
> the progress messages in devlink that's no longer necessary.
> For the messages which are basically printing the name of the function
> or name of the function and their args - we have ftrace.
> That's my $0.02 :)
> .