]> Pileus Git - ~andy/linux/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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 23:15:41 +0000 (15:15 -0800)
commitdc4277dd41a80fd5f29a90412ea04bc3ba54fbf1
tree9b21715c23657d4cd3cc6ae1af4bd827c0625647
parenta81ab36bf52d0ca3a32251a923be1dbced726141
net: mvneta: increase the 64-bit rx/tx stats out of the hot path

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>
drivers/net/ethernet/marvell/mvneta.c