[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080328.183652.99818676.davem@davemloft.net>
Date: Fri, 28 Mar 2008 18:36:52 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: netdev@...r.kernel.org
Subject: Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of
netif_rx()
From: Eric Dumazet <dada1@...mosbay.com>
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? :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists