]> git.baikalelectronics.ru Git - kernel.git/commit
[NET]: Implement SKB fast cloning.
authorDavid S. Miller <davem@davemloft.net>
Wed, 17 Aug 2005 21:57:30 +0000 (14:57 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 29 Aug 2005 23:01:54 +0000 (16:01 -0700)
commit933b7fffdfc6bfde25e8b4673ea8b4e055f31d0f
tree0bfc57e73f0bf9f7bb9d5c8ce7d3d5afe550f94e
parent9de29ea220300760bff9e5261ec487505e7df951
[NET]: Implement SKB fast cloning.

Protocols that make extensive use of SKB cloning,
for example TCP, eat at least 2 allocations per
packet sent as a result.

To cut the kmalloc() count in half, we implement
a pre-allocation scheme wherein we allocate
2 sk_buff objects in advance, then use a simple
reference count to free up the memory at the
correct time.

Based upon an initial patch by Thomas Graf and
suggestions from Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
include/net/sock.h
net/core/skbuff.c
net/ipv4/tcp_output.c