Thread (35 messages) 35 messages, 7 authors, 2006-07-08

Re: [PATCH 1/3] Rough VJ Channel Implementation - vj_core.patch

From: "David S. Miller" <davem@davemloft.net>
Date: 2006-05-16 05:17:06

From: Kelly Daly <redacted>
Date: Tue, 16 May 2006 11:02:29 +1000
+/* handles default chan buffers that nobody else wants */
+static int default_netchannel_thread(void *unused)
+{
+	wait_queue_t wait;
+	struct netchannel_buftrailer *bp;
+	struct sk_buff *skbp;
+
+	wait.private = current;
+	wait.func = default_wake_function;;
+	INIT_LIST_HEAD(&wait.task_list);
+
+	add_wait_queue(&default_netchannel_wq, &wait);
+	set_current_state(TASK_UNINTERRUPTIBLE);
+	while (!kthread_should_stop()) {
+		bp = __netchannel_dequeue(&default_netchannel);
+		skbp = skb_netchan_graft(bp, GFP_ATOMIC);
+		netif_receive_skb(skbp);
+	}
+	remove_wait_queue(&default_netchannel_wq, &wait);
+	__set_current_state(TASK_RUNNING);
+	return 0;
+}
+
When does this thread ever go to sleep?  Seems like it will loop
forever and not block when the default_netchannel queue is empty.
:-)
+	unsigned long dlen = np->netchan_buf_len - np->netchan_buf_offset;
Probably deserves a "netchan_buf_len(bp)" inline in linux/netchannel.h
quoted hunk ↗ jump to hunk
diff -urp davem_orig/net/ipv4/inet_hashtables.c kelly/net/ipv4/inet_hashtables.c
--- davem_orig/net/ipv4/inet_hashtables.c	2006-04-27 00:08:33.000000000 +1000
+++ kelly/net/ipv4/inet_hashtables.c	2006-05-05 12:45:44.000000000 +1000
The hash table bits look good, just as they did last time :-)
So I'll put this part into my vj-2.6 tree now, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help