]> git.baikalelectronics.ru Git - kernel.git/commit
tun: fallback if skb_alloc() fails on big packets
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 15 Aug 2008 22:15:10 +0000 (15:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Aug 2008 02:52:31 +0000 (19:52 -0700)
commit685bcff728c65c712fe31b386ad03d59687ac05c
treef8c104a73ae5558e104a07e254a9eafd7839269d
parent32395dda2339e04718f59685209d6d9247873986
tun: fallback if skb_alloc() fails on big packets

skb_alloc produces linear packets (using kmalloc()).  That can fail,
so should we fall back to making paged skbs.

My original version of this patch always allocate paged skbs for big
packets.  But that made performance drop from 8.4 seconds to 8.8
seconds on 1G lguest->Host TCP xmit.  So now we only do that as a
fallback.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Max Krasnyansky <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c