netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net:  Ensure tx watchdog failures always print.
Date: Tue, 14 Jun 2011 10:25:13 -0700	[thread overview]
Message-ID: <4DF79979.2070309@candelatech.com> (raw)
In-Reply-To: <1308071667.4870.17.camel@edumazet-laptop>

On 06/14/2011 10:14 AM, Eric Dumazet wrote:
> Le mardi 14 juin 2011 à 09:50 -0700, greearb@candelatech.com a écrit :
>> From: Ben Greear<greearb@candelatech.com>
>>
>> These are too important to not have some log message
>> generated.  But, keep the logic that only prints
>> a single stack dump.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>> :100644 100644 90939ba... fce5558... M	net/sched/sch_generic.c
>>   net/sched/sch_generic.c |   16 ++++++++++++++--
>>   1 files changed, 14 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
>> index 90939ba..fce5558 100644
>> --- a/net/sched/sch_generic.c
>> +++ b/net/sched/sch_generic.c
>> @@ -252,8 +252,20 @@ 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;
>> +				printk(KERN_INFO "NETDEV WATCHDOG: %s (%s):"
>> +				       " transmit queue %u timed out,"
>> +				       " trans_start: %lu, wd-timeout: %i"
>> +				       " jiffies: %lu tx-queues: %i\n",
>> +				       dev->name,
>> +				       netdev_drivername(dev, drivername, 64),
>> +				       i,
>> +				       trans_start, dev->watchdog_timeo,
>> +				       jiffies, dev->num_tx_queues);
>> +				if (do_once) {
>> +					do_once = false;
>> +					WARN_ON(1);
>
> You could use WARN_ON_ONCE(1) here

Er, right..don't know what I was thinking.

Will re-send.

Thanks,
Ben

>
>> +				}
>>   				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


  reply	other threads:[~2011-06-14 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 16:50 [PATCH] net: Ensure tx watchdog failures always print greearb
2011-06-14 17:14 ` Eric Dumazet
2011-06-14 17:25   ` Ben Greear [this message]
2011-06-14 17:34     ` David Miller
2011-06-14 17:33 ` David Miller
2011-06-14 17:41   ` Ben Greear

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=4DF79979.2070309@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).