Messages in this thread | | | Date | Sat, 02 Nov 2013 01:06:42 -0400 (EDT) | Subject | Re: [PATCH] bnx2: Use dev_kfree_skb_any() in bnx2_tx_int() | From | David Miller <> |
| |
From: Ben Hutchings <bhutchings@solarflare.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.
| |