netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH resend] drop_monitor: fix trace_napi_poll_hit()
@ 2009-08-31  6:10 Xiao Guangrong
  2009-08-31  6:31 ` Eric Dumazet
  2009-09-02  1:20 ` [PATCH resend] drop_monitor: fix trace_napi_poll_hit() David Miller
  0 siblings, 2 replies; 10+ messages in thread
From: Xiao Guangrong @ 2009-08-31  6:10 UTC (permalink / raw)
  To: David Miller; +Cc: Neil Horman, Wei Yongjun, Netdev, LKML

The net_dev of backlog napi is NULL, like below:

__get_cpu_var(softnet_data).backlog.dev == NULL

So, we should check it in napi tracepoint's probe function

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 net/core/drop_monitor.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
index 9d66fa9..d311202 100644
--- a/net/core/drop_monitor.c
+++ b/net/core/drop_monitor.c
@@ -182,7 +182,8 @@ static void trace_napi_poll_hit(struct napi_struct *napi)
 	/*
 	 * Ratelimit our check time to dm_hw_check_delta jiffies
 	 */
-	if (!time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
+	if (!napi->dev ||
+	    !time_after(jiffies, napi->dev->last_rx + dm_hw_check_delta))
 		return;
 
 	rcu_read_lock();
-- 
1.6.1.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-03  6:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-31  6:10 [PATCH resend] drop_monitor: fix trace_napi_poll_hit() Xiao Guangrong
2009-08-31  6:31 ` Eric Dumazet
2009-08-31 11:12   ` Neil Horman
2009-08-31 11:47     ` David Miller
2009-08-31 13:33     ` Eric Dumazet
2009-08-31 15:42       ` Neil Horman
2009-08-31 16:34       ` [PATCH net-next-2.6] drivers: Kill now superfluous ->last_rx stores Eric Dumazet
2009-08-31 17:37         ` Neil Horman
2009-09-03  6:09         ` David Miller
2009-09-02  1:20 ` [PATCH resend] drop_monitor: fix trace_napi_poll_hit() David Miller

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).