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

From: Eric Dumazet <[email-masked]>
Date: Sat, 29 Mar 2008 09:18:03 +0100

David Miller a écrit :
> From: Eric Dumazet <[email-masked]>
> 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? :-)
> 
> 

Yes, I do agree, mixing 'network' and 'mainline' in the same patch is garanted 
to be problematic.

We shall wait for 32 cpus machines before thinking about that :)

BTW, can loopback_xmit() be called on an interrupt stack ?