]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: mvneta: convert to build_skb()
authorwilly tarreau <w@1wt.eu>
Thu, 16 Jan 2014 07:20:16 +0000 (08:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 23:15:43 +0000 (15:15 -0800)
commit8ec2cd48fe0d08f4c5370e925f083a68e4593ec8
treefb166c803b9a2a1855cd31bd7cc224d2481f43f9
parent34e4179df65d72d83e71860b099d71e0f3aa1210
net: mvneta: convert to build_skb()

Make use of build_skb() to allocate frags on the RX path. When frag size
is lower than a page size, we can use netdev_alloc_frag(), and we fall back
to kmalloc() for larger sizes. The frag size is stored into the mvneta_port
struct. The alloc/free functions check the frag size to decide what alloc/
free method to use. MTU changes are safe because the MTU change function
stops the device and clears the queues before applying the change.

With this patch, I observed a reproducible 2% performance improvement on
HTTP-based benchmarks, and 5% on small packet RX rate.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c