Thread (35 messages) 35 messages, 9 authors, 2008-04-21

Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()

From: David Miller <davem@davemloft.net>
Date: 2008-03-29 01:36:52

From: Eric Dumazet <redacted>
Date: Sun, 23 Mar 2008 19:48:29 +0100
[PATCH] loopback: calls netif_receive_skb() instead of netif_rx()
Hmmm...

+static int enough_stack_space(void)
+{
+#ifdef CONFIG_STACK_GROWSUP
+	return 0;
+#else
+	unsigned long free = (unsigned long)&free -
+			     (unsigned long)end_of_stack(current);
+	return free >= THREAD_SIZE/3 ;
+#endif
+}
+

This will always fail when we are on an interrupt stack,
I think you'd want it to succeed in such a case.

Can you agree that, at least to a point, this is getting a bit
convoluted and perhaps adding more complexity than this optimization
deserves? :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help