Re: [PATCH] bnx2: Use dev_kfree_skb_any() in bnx2_tx_int()
From: David Miller
Date: Sat Nov 02 2013 - 01:07:23 EST
From: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
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'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
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 linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/