net: Ensure tx watchdog failures always print.
Subsystems (3)
PATCH 1/1 net: Ensure tx watchdog failures always print.
From: Ben Greear <[email protected]>
These are too important to not have some log message generated. But, keep the logic that only prints a single stack dump.
---
:100644 100644 90939ba... fce5558... M net/sched/sch_generic.c
net/sched/sch_generic.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)
net/sched/sch_generic.c +14 -2
@@ -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 ); + } dev->netdev_ops->ndo_tx_timeout (dev); } if (!mod_timer(&dev->watchdog_timer,
Signature · 1 line
1.7.3.4
Quoted 25 lines · Le mardi 14 juin 2011 à 09:50 -0700, [email protected] a écrit :
From: Ben Greear <[email protected]>
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 <[email protected]>---
:100644 100644 90939ba... fce5558... Mnet/sched/sch_generic.cnet/sched/sch_generic.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)net/sched/sch_generic.c +3
-2@@ -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,"
net/sched/sch_generic.c static void dev_watchdog(unsigned long arg) · line 267
Quoted 10 lines
net/sched/sch_generic.c +10
-0+" 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
Quoted 4 lines
net/sched/sch_generic.c +1
-0+ } dev->netdev_ops->ndo_tx_timeout (dev); } if (!mod_timer(&dev->watchdog_timer,
Quoted 30 lines · Eric Dumazet
Quoted 29 lines · Le mardi 14 juin 2011 à 09:50 -0700, [email protected] a écrit :
From: Ben Greear<[email protected]>
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<[email protected]>---
:100644 100644 90939ba... fce5558... Mnet/sched/sch_generic.cnet/sched/sch_generic.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-)net/sched/sch_generic.c +7
-2@@ -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),
Quoted 8 lines
net/sched/sch_generic.c static void dev_watchdog(unsigned long arg) · line 267
Quoted 6 lines
net/sched/sch_generic.c +6
-0+ 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
Quoted 6 lines
Quoted 5 lines
net/sched/sch_generic.c +1
-0+ } dev->netdev_ops->ndo_tx_timeout (dev); } if (!mod_timer(&dev->watchdog_timer,
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com
David Miller
maintainerFrom: [email protected]
Date: Tue, 14 Jun 2011 09:50:13 -0700
Quoted 7 lines
From: Ben Greear <[email protected]>
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 <[email protected]>
We specifically made this print out only once, and yes all of it.
Because it spams people's logs to the point that the message is not useful and only scrolls out other more important messages.
I'm not applying this, sorry.
David Miller
maintainerFrom: Ben Greear <[email protected]>
Date: Tue, 14 Jun 2011 10:25:13 -0700
Quoted 1 line
Will re-send.
Please, don't bother, see my other reply.
Quoted 11 lines · David Miller
From: [email protected]
Date: Tue, 14 Jun 2011 09:50:13 -0700Quoted 7 lines
From: Ben Greear<[email protected]>
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<[email protected]>
Quoted 8 lines
We specifically made this print out only once, and yes all of it.
Because it spams people's logs to the point that the message is not useful and only scrolls out other more important messages.
I'm not applying this, sorry.
Is it really legit for a driver to spam this message? I hit this due to bugs in my code that sent pkts to the wrong driver queue, but aside from that, we rarely if ever see the message print.
Thanks,
Ben
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com