From: Ben Greear <greearb@candelatech•com>
To: Ben Greear <greearb@candelatech•com>
Cc: netdev@vger•kernel.org
Subject: Re: [net-next] net: Provide details on watchdog timeout.
Date: Mon, 09 Aug 2010 12:59:48 -0700 [thread overview]
Message-ID: <4C605E34.5060106@candelatech.com> (raw)
In-Reply-To: <1281383954-23765-1-git-send-email-greearb@candelatech.com>
On 08/09/2010 12:59 PM, Ben Greear wrote:
> This keeps the WARN_ON but will also log normal kernel messages
> after the WARN_ON logic has happened once.
This is compile-tested only, by the way.
Thanks,
Ben
>
> Signed-off-by: Ben Greear<greearb@candelatech•com>
> ---
> :100644 100644 2aeb3a4... 66e6154... M net/sched/sch_generic.c
> net/sched/sch_generic.c | 23 ++++++++++++++++++++---
> 1 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 2aeb3a4..66e6154 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -253,9 +253,26 @@ static void dev_watchdog(unsigned long arg)
> }
>
> if (some_queue_timedout) {
> - char drivername[64];
> - WARN_ONCE(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): transmit queue %u timed out\n",
> - dev->name, netdev_drivername(dev, drivername, 64), i);
> + static bool do_once = true;
> + if (do_once || net_ratelimit()) {
> + char drivername[64];
> + if (unlikely(do_once)) {
> + WARN(1, KERN_INFO "NETDEV WATCHDOG: %s (%s): "
> + "transmit queue %u timed out"
> + " trans-start: %lu jiffies: %lu\n",
> + dev->name,
> + netdev_drivername(dev, drivername, 64),
> + i, trans_start, jiffies);
> + do_once = false;
> + }
> + else
> + printk(KERN_INFO "NETDEV WATCHDOG: %s (%s): "
> + "transmit queue %u timed out"
> + " trans-start: %lu jiffies: %lu\n",
> + dev->name,
> + netdev_drivername(dev, drivername, 64),
> + i, trans_start, jiffies);
> + }
> dev->netdev_ops->ndo_tx_timeout(dev);
> }
> if (!mod_timer(&dev->watchdog_timer,
--
Ben Greear <greearb@candelatech•com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2010-08-09 19:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 19:59 [net-next] net: Provide details on watchdog timeout Ben Greear
2010-08-09 19:59 ` Ben Greear [this message]
2010-08-09 20:10 ` David Miller
2010-08-09 20:12 ` Ben Greear
-- strict thread matches above, loose matches on Subject: below --
2010-08-09 19:16 Ben Greear
2010-08-09 19:28 ` Stephen Hemminger
2010-08-09 20:08 ` David Miller
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=4C605E34.5060106@candelatech.com \
--to=greearb@candelatech$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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