Subject: Re: [PATCH 2/2] tun: fallback if skb_alloc() fails on big packets

From: Rusty Russell <[email-masked]>
Date: Wed, 13 Aug 2008 13:24:55 +1000

On Tuesday 12 August 2008 20:14:09 Herbert Xu wrote:
> On Tue, Aug 12, 2008 at 04:25:53PM +1000, Rusty Russell wrote:
> > skb_alloc produces linear packets (using kmalloc()).  That can fail,
> > so should we fall back to making paged skbs.
>
> I'm not sure that this is really a good idea.  If anything then
> tries to expand the head of this skb, they may fail and be forced
> to drop the packet.

Yes, but it's no worse than now.  virtio_net keeps a cache of allocated pages, 
but that's more code; and if I'm going to generalize that I really should 
create a shrinker callback, which produces locking issues.

So I decided this was probably enough for this merge window.
Rusty.