[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190725182846.253ae93f@cakuba.netronome.com>
Date: Thu, 25 Jul 2019 18:28:46 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Saeed Mahameed <saeedm@...lanox.com>
Cc: "tanhuazhong@...wei.com" <tanhuazhong@...wei.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"liuyonglong@...wei.com" <liuyonglong@...wei.com>,
"lipeng321@...wei.com" <lipeng321@...wei.com>,
"yisen.zhuang@...wei.com" <yisen.zhuang@...wei.com>,
"salil.mehta@...wei.com" <salil.mehta@...wei.com>,
"linuxarm@...wei.com" <linuxarm@...wei.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 07/11] net: hns3: adds debug messages to
identify eth down cause
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 :)
Powered by blists - more mailing lists