]> 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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 12:13:53 +0000 (14:13 +0200)
commitdbdd0da3f80f628c25b8b592814a849e90dcebc8
tree6d0cdd28b16a1acb9ca21f6b6b9cfb7232c525d3
parente63a44010451b777374f4e651abe7307b8cab90b
net: mvneta: increase the 64-bit rx/tx stats out of the hot path

commit dc4277dd41a80fd5f29a90412ea04bc3ba54fbf1 upstream.

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: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/marvell/mvneta.c