]> bbs.cooldavid.org Git - net-next-2.6.git/commit
netpoll: Add netpoll_tx_running
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jun 2010 16:12:49 +0000 (16:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jun 2010 17:58:40 +0000 (10:58 -0700)
commitc18370f5b2949d9cca519355f33690b75e1e7c8b
tree8e3a2e741bacf9121d2f2b4351d3e8efb640c818
parent8fdd95ec162a8fbac7f41d6f54f90402fe3e8cb1
netpoll: Add netpoll_tx_running

This patch adds the helper netpoll_tx_running for use within
ndo_start_xmit.  It returns non-zero if ndo_start_xmit is being
invoked by netpoll, and zero otherwise.

This is currently implemented by simply looking at the hardirq
count.  This is because for all non-netpoll uses of ndo_start_xmit,
IRQs must be enabled while netpoll always disables IRQs before
calling ndo_start_xmit.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netpoll.h