Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11575539ybi; Thu, 25 Jul 2019 19:34:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsVMRqcXDoypxXvr5BzpXlqQ24KoWCXxo2gBhGD4KqhNEZoWCdOeXo69jGKV7Gxfwn8WxP X-Received: by 2002:a63:3805:: with SMTP id f5mr55887142pga.272.1564108482953; Thu, 25 Jul 2019 19:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564108482; cv=none; d=google.com; s=arc-20160816; b=qiRmL34JiRGkuoaVs0gg061lqEYROfgXTyfbopwcKhUt9das046zakQ49qg7sxVc8Z O6QgTe/ROKUKK2MmT2oHADwsLNIlx/02kf0CvJJLfaTcbPPek+d8TkGI5kRr/uCO360N HSOrXb86Ei65QEPnQETARwK2WZrMoLBm+Rb4Ckl6s6NnesOZC0IKuc375c0pIgfbtIy4 xUOuzDl2dl3skY0o2xiN9c9dXF/p+fdO/i5LNLDKs7uECR6F4noLh3VWl6Phw1uxgs6z 3ctEjhucC4iFGfKIZ1wp69Zt1DJtAyD7zyqoFbCYIhbnebxdwORVA70iwQ0Bp1KzG2rV QprA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=D1oDgAhD9UGHiZN4eHHR23UayQDTpJMYgTqVUePj2FQ=; b=FxQOfd4c2O2eFMKKObH8zW+b4/M1FJufADHOUULHxM3JZCQHJ6MmrjjarqmdChjcu8 vrHXQyCWXpojIGXqfmnNHpPSNBl7Kyognbbh8FRKMXwgRMfMBcw+DUUpzmMNsFsVfeih YHZTr39259l4ou+LgEX4JRraN1JE9CoD1iCJaG1etQaSglcZzSJgoJKvAOaL89aGLGHp AO2KK2MOMfRcLQzSTM3xS5oh2b8+zuM3ElufOAlVemO/GrxkY/EHls1k5yOSIBvk8dVV gNgUybQShk78FYvlBTA/sQ0BhfgfDS2+r6h0+9UeOaKMM+o84vRCG6CR97MUuVEdZgvT fDQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u38si18839694pgn.79.2019.07.25.19.34.27; Thu, 25 Jul 2019 19:34:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726023AbfGZCdz (ORCPT + 99 others); Thu, 25 Jul 2019 22:33:55 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2489 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725854AbfGZCdy (ORCPT ); Thu, 25 Jul 2019 22:33:54 -0400 Received: from DGGEMM404-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id B16413CB14A95963F1CF; Fri, 26 Jul 2019 10:33:52 +0800 (CST) Received: from dggeme760-chm.china.huawei.com (10.3.19.106) by DGGEMM404-HUB.china.huawei.com (10.3.20.212) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 26 Jul 2019 10:33:52 +0800 Received: from [127.0.0.1] (10.57.37.248) by dggeme760-chm.china.huawei.com (10.3.19.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 26 Jul 2019 10:33:52 +0800 Subject: Re: [PATCH net-next 07/11] net: hns3: adds debug messages to identify eth down cause To: Jakub Kicinski , Saeed Mahameed CC: "tanhuazhong@huawei.com" , "davem@davemloft.net" , "lipeng321@huawei.com" , "yisen.zhuang@huawei.com" , "salil.mehta@huawei.com" , "linuxarm@huawei.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <1563938327-9865-1-git-send-email-tanhuazhong@huawei.com> <1563938327-9865-8-git-send-email-tanhuazhong@huawei.com> <30483e38-5e4a-0111-f431-4742ceb1aa62@huawei.com> <75a02bbe5b3b0f2755cd901a8830d4a3026f9383.camel@mellanox.com> <20190725182846.253ae93f@cakuba.netronome.com> From: liuyonglong Message-ID: Date: Fri, 26 Jul 2019 10:33:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190725182846.253ae93f@cakuba.netronome.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.37.248] X-ClientProxiedBy: dggeme713-chm.china.huawei.com (10.1.199.109) To dggeme760-chm.china.huawei.com (10.3.19.106) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) > > . >