From: Saeed Mahameed <saeedm@mellanox.com>
To: "tanhuazhong@huawei.com" <tanhuazhong@huawei.com>,
"davem@davemloft.net" <davem@davemloft.net>
Cc: "lipeng321@huawei.com" <lipeng321@huawei.com>,
"yisen.zhuang@huawei.com" <yisen.zhuang@huawei.com>,
"salil.mehta@huawei.com" <salil.mehta@huawei.com>,
"linuxarm@huawei.com" <linuxarm@huawei.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"liuyonglong@huawei.com" <liuyonglong@huawei.com>
Subject: Re: [PATCH V2 net-next 07/11] net: hns3: adds debug messages to identify eth down cause
Date: Fri, 26 Jul 2019 22:00:46 +0000 [thread overview]
Message-ID: <a32ca755bfd69046cf89aeacbf67fd16313de768.camel@mellanox.com> (raw)
In-Reply-To: <1564111502-15504-8-git-send-email-tanhuazhong@huawei.com>
On Fri, 2019-07-26 at 11:24 +0800, Huazhong Tan wrote:
> From: Yonglong Liu <liuyonglong@huawei.com>
>
> Some times just see the eth interface have been down/up via
> dmesg, but can not know why the eth down. So adds some debug
> messages to identify the cause for this.
>
> Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
> Signed-off-by: Peng Li <lipeng321@huawei.com>
> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
> ---
> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 24
> ++++++++++++++++++++
> drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 26
> ++++++++++++++++++++++
> .../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 14 ++++++++++++
> 3 files changed, 64 insertions(+)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> index 4d58c53..2e30cfa 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> @@ -459,6 +459,10 @@ static int hns3_nic_net_open(struct net_device
> *netdev)
> h->ae_algo->ops->set_timer_task(priv->ae_handle, true);
>
> hns3_config_xps(priv);
> +
> + if (netif_msg_drv(h))
> + netdev_info(netdev, "net open\n");
> +
to make sure this is only intended for debug, and to avoid repetition.
#define hns3_dbg(__dev, format, args...) \
({ \
if (netif_msg_drv(h)) \
netdev_info(h->netdev, format, ##args); \
})
#endif
next prev parent reply other threads:[~2019-07-26 22:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-26 3:24 [PATCH V2 net-next 00/11] net: hns3: some code optimizations & bugfixes & features Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 01/11] net: hns3: add reset checking before set channels Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 02/11] net: hns3: add a check for get_reset_level Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 03/11] net: hns3: remove upgrade reset level when reset fail Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 04/11] net: hns3: fix mis-counting IRQ vector numbers issue Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 05/11] net: hns3: change GFP flag during lock period Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 06/11] net: hns3: modify firmware version display format Huazhong Tan
2019-07-26 3:24 ` [PATCH V2 net-next 07/11] net: hns3: adds debug messages to identify eth down cause Huazhong Tan
2019-07-26 22:00 ` Saeed Mahameed [this message]
2019-07-26 22:18 ` Joe Perches
2019-07-27 2:28 ` liuyonglong
2019-07-27 3:14 ` Joe Perches
2019-07-26 3:24 ` [PATCH V2 net-next 08/11] net: hns3: make hclge_service use delayed workqueue Huazhong Tan
2019-07-26 3:25 ` [PATCH V2 net-next 09/11] net: hns3: add interrupt affinity support for misc interrupt Huazhong Tan
2019-07-26 3:25 ` [PATCH V2 net-next 10/11] net: hns3: Add support for using order 1 pages with a 4K buffer Huazhong Tan
2019-07-26 3:25 ` [PATCH V2 net-next 11/11] net: hns3: use dev_info() instead of pr_info() Huazhong Tan
2019-07-26 4:00 ` [PATCH V2 net-next 00/11] net: hns3: some code optimizations & bugfixes & features tanhuazhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a32ca755bfd69046cf89aeacbf67fd16313de768.camel@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=tanhuazhong@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox