netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drop_monitor: fix trace_napi_poll_hit()
@ 2009-08-27 10:40 Xiao Guangrong
  2009-08-27 10:56 ` [PATCH 3/3] tracing/events: convert NAPI's tracepoint and fix DEFINE_TRACE_FN Xiao Guangrong
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xiao Guangrong @ 2009-08-27 10:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Steven Rostedt, Frederic Weisbecker, Neil Horman, David Miller,
	Wei Yongjun, LKML, Netdev

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

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] 4+ messages in thread

end of thread, other threads:[~2009-08-31  4:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-27 10:40 [PATCH 1/3] drop_monitor: fix trace_napi_poll_hit() Xiao Guangrong
2009-08-27 10:56 ` [PATCH 3/3] tracing/events: convert NAPI's tracepoint and fix DEFINE_TRACE_FN Xiao Guangrong
2009-08-27 12:46 ` [PATCH 1/3] drop_monitor: fix trace_napi_poll_hit() Neil Horman
2009-08-31  4:57 ` 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).