[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20131102.010642.1846904926665537525.davem@davemloft.net>
Date: Sat, 02 Nov 2013 01:06:42 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: bhutchings@...arflare.com
Cc: xiyou.wangcong@...il.com, mchan@...adcom.com,
tdmackey@...leanhaiku.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bnx2: Use dev_kfree_skb_any() in bnx2_tx_int()
From: Ben Hutchings <bhutchings@...arflare.com>
Date: Fri, 1 Nov 2013 23:34:50 +0000
> As you've said, the ndo_start_xmit and NAPI poll operations are intended
> to be called in softirq context, so everything that interlocks with them
> will use spin_lock_bh(). Calling them from hardirq context obviously
> opens the possibility of a deadlock. How do you expect anyone to solve
> that?
That's not what I said.
I did not say that it must be invoked in softirq context.
I said that it MUST LOOK like it is being invoked in softirq
context as far as the ->poll() code paths can tell.
But yes, that's hard.
The thing is, ->poll() is atomic. You never will have poll calls
recurse into eachother. This is why we strongly encourage all driver
authors to make their ->poll() implementations lockless.
And, wouldn't you know it, tg3 is a driver that does this
properly.
Therefore, there are no netpoll no locking problems, because the poll
implementation takes no locks and therefore doesn't care.
That's why tg3 doesn't have any of these netpoll issues.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists