net: fs_enet: Add NAPI TX
authorLEROY Christophe <christophe.leroy@c-s.fr>
Tue, 7 Oct 2014 13:05:02 +0000 (15:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Oct 2014 20:01:41 +0000 (16:01 -0400)
commitd43a396af0f54740c4f491a066d249b7d7467593
tree5a49f7bcc87106c58aab068841c7e869db659126
parent583d4a6885cfa75a3d189f6bb69b5c545e961c75
net: fs_enet: Add NAPI TX

When using a MPC8xx as a router, 'perf' shows a significant time spent in
fs_enet_interrupt() and fs_enet_start_xmit().
'perf annotate' shows that the time spent in fs_enet_start_xmit is indeed spent
between spin_unlock_irqrestore() and the following instruction, hence in
interrupt handling. This is due to the TX complete interrupt that fires after
each transmitted packet.
This patch modifies the handling of TX complete to use NAPI.
With this patch, my NAT router offers a throughput improved by 21%

Original performance:

[root@localhost tmp]# scp toto pgs:/tmp
toto                                          100%  256MB   2.8MB/s   01:31

Performance with the patch:

[root@localhost tmp]# scp toto pgs:/tmp
toto                                          100%  256MB   3.4MB/s   01:16

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
drivers/net/ethernet/freescale/fs_enet/fs_enet.h
drivers/net/ethernet/freescale/fs_enet/mac-fcc.c
drivers/net/ethernet/freescale/fs_enet/mac-fec.c
drivers/net/ethernet/freescale/fs_enet/mac-scc.c