]> git.baikalelectronics.ru Git - kernel.git/commit
netdev:bfin_mac: reclaim and free tx skb as soon as possible after transfer
authorSonic Zhang <sonic.zhang@analog.com>
Fri, 11 Jun 2010 09:44:31 +0000 (17:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jun 2010 22:04:10 +0000 (15:04 -0700)
commit964d5c6a1295b8a86b4457e051a5f01059ff68fc
treec05b3e27f61b3644cd3514d4bbf7443d7588803a
parentf1b89e6668dc3b9e1d185970a262eb44c15cf79e
netdev:bfin_mac: reclaim and free tx skb as soon as possible after transfer

SKBs hold onto resources that can't be held indefinitely, such as TCP
socket references and netfilter conntrack state.  So if a packet is left
in TX ring for a long time, there might be a TCP socket that cannot be
closed and freed up.

Current blackfin EMAC driver always reclaim and free used tx skbs in future
transfers. The problem is that future transfer may not come as soon as
possible. This patch start a timer after transfer to reclaim and free skb.
There is nearly no performance drop with this patch.

TX interrupt is not enabled because of a strange behavior of the Blackfin EMAC.
If EMAC TX transfer control is turned on, endless TX interrupts are triggered
no matter if TX DMA is enabled or not. Since DMA walks down the ring automatically,
TX transfer control can't be turned off in the middle. The only way is to disable
TX interrupt completely.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bfin_mac.c
drivers/net/bfin_mac.h