From: David Miller <davem@davemloft.net>
To: bhutchings@solarflare.com
Cc: xiyou.wangcong@gmail.com, mchan@broadcom.com,
tdmackey@booleanhaiku.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bnx2: Use dev_kfree_skb_any() in bnx2_tx_int()
Date: Sat, 02 Nov 2013 01:06:42 -0400 (EDT) [thread overview]
Message-ID: <20131102.010642.1846904926665537525.davem@davemloft.net> (raw)
In-Reply-To: <1383348890.1737.40.camel@bwh-desktop.uk.level5networks.com>
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.
prev parent reply other threads:[~2013-11-02 5:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 22:16 David Mackey
2013-10-30 2:42 ` David Miller
2013-10-30 3:50 ` Cong Wang
2013-10-30 6:40 ` David Miller
2013-10-30 19:23 ` Cong Wang
2013-10-30 21:32 ` David Miller
2013-10-30 22:01 ` Cong Wang
2013-10-31 4:26 ` David Miller
[not found] ` <CAM_iQpXPrEj619=PRaKN4PxgOoEB96U0mLFS65AzXOezSWvhxQ@mail.gmail.com>
2013-11-01 22:01 ` David Miller
2013-11-01 23:34 ` Ben Hutchings
2013-11-02 5:06 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131102.010642.1846904926665537525.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bhutchings@solarflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=tdmackey@booleanhaiku.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®