From: Jiri Pirko <jiri@resnulli.us>
To: Jijie Shao <shaojijie@huawei.com>
Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, shenjian15@huawei.com,
wangjie125@huawei.com, liuyonglong@huawei.com, lanhao@huawei.com,
wangpeiyang1@huawei.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V4 net-next 4/4] net: hns3: support dump pfc frame statistics in tx timeout log
Date: Tue, 9 Jan 2024 10:00:46 +0100 [thread overview]
Message-ID: <ZZ0LPlVUqkJrDr-x@nanopsycho> (raw)
In-Reply-To: <00e5d6e2-168c-4887-8b6d-8498ebaafe6d@huawei.com>
Tue, Jan 09, 2024 at 09:19:48AM CET, shaojijie@huawei.com wrote:
>
>on 2024/1/5 17:55, Jiri Pirko wrote:
>> > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
>> > @@ -2871,8 +2871,10 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
>> > struct hns3_mac_stats mac_stats;
>> >
>> > h->ae_algo->ops->get_mac_stats(h, &mac_stats);
>> > - netdev_info(ndev, "tx_pause_cnt: %llu, rx_pause_cnt: %llu\n",
>> > - mac_stats.tx_pause_cnt, mac_stats.rx_pause_cnt);
>> > + netdev_info(ndev,
>> > + "tx_pause_cnt: %llu, rx_pause_cnt: %llu, tx_pfc_cnt: %llu, rx_pfc_cnt: %llu\n",
>> > + mac_stats.tx_pause_cnt, mac_stats.rx_pause_cnt,
>> > + mac_stats.tx_pfc_cnt, mac_stats.rx_pfc_cnt);
>> Don't we have a better way to expose this? I mean, whenever there is a
>> patch that extends the amount of text written in dmesg, it smells.
>> We should rather reduce it.
>>
>In fact, we include this part of the statistics in the ethtool -S statistics.
>However, if tx timeout occurs,the driver performs a reset attempt to recover
>it. And the statistics are cleared after the reset. Therefore, pfc statistics
>are added to tx timeout log to determine the timeout cause.
Does not sound correct at all. You are basically forcing user to check
the dmesg to understand the behaviour of stats he gets from ethtool. You
can expose "reset"/"recover" counter through ethtool to expose this fact
rather than dmesg print. Please don't add dmesg print.
>
>
next prev parent reply other threads:[~2024-01-09 9:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 1:01 [PATCH V4 net-next 0/4] There are some features for the HNS3 ethernet driver Jijie Shao
2024-01-05 1:01 ` [PATCH V4 net-next 1/4] net: hns3: add command queue trace for hns3 Jijie Shao
2024-01-05 9:52 ` Jiri Pirko
2024-01-09 8:19 ` Jijie Shao
2024-01-05 1:01 ` [PATCH V4 net-next 2/4] net: hns3: move constants from hclge_debugfs.h to hclge_debugfs.c Jijie Shao
2024-01-05 1:01 ` [PATCH V4 net-next 3/4] net: hns3: dump more reg info based on ras mod Jijie Shao
2024-01-05 1:01 ` [PATCH V4 net-next 4/4] net: hns3: support dump pfc frame statistics in tx timeout log Jijie Shao
2024-01-05 9:55 ` Jiri Pirko
2024-01-09 8:19 ` Jijie Shao
2024-01-09 9:00 ` Jiri Pirko [this message]
2024-01-05 9:50 ` [PATCH V4 net-next 0/4] There are some features for the HNS3 ethernet driver Jiri Pirko
2024-01-09 8:20 ` Jijie Shao
-- strict thread matches above, loose matches on Subject: below --
2023-12-19 1:35 Jijie Shao
2023-12-19 1:35 ` [PATCH V4 net-next 4/4] net: hns3: support dump pfc frame statistics in tx timeout log Jijie Shao
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=ZZ0LPlVUqkJrDr-x@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=lanhao@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shaojijie@huawei.com \
--cc=shenjian15@huawei.com \
--cc=wangjie125@huawei.com \
--cc=wangpeiyang1@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