]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mvneta: increase the 64-bit rx/tx stats out of the hot path
authorwilly tarreau <w@1wt.eu>
Thu, 16 Jan 2014 07:20:07 +0000 (08:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 06:06:14 +0000 (22:06 -0800)
commitfbfbed33a5effba7dc6f33e3ed598f9bd31b0cdf
tree5c8915f5fcac98615729d9cde97284595bc20101
parentf7152716d66f5c24327b6a664a4feb4fbd46fc6c
net: mvneta: increase the 64-bit rx/tx stats out of the hot path

[ Upstream commit dc4277dd41a80fd5f29a90412ea04bc3ba54fbf1 ]

Better count packets and bytes in the stack and on 32 bit then
accumulate them at the end for once. This saves two memory writes
and two memory barriers per packet. The incoming packet rate was
increased by 4.7% on the Openblocks AX3 thanks to this.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reviewed-by: Eric Dumazet <edumazet@google.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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvneta.c