From: Florian Fainelli <f.fainelli@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, jesse.brandeburg@intel.com,
anthony.l.nguyen@intel.com, corbet@lwn.net,
linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next] docs: networking: document NAPI
Date: Thu, 16 Mar 2023 15:59:49 -0700 [thread overview]
Message-ID: <7ddfa9e1-c7a2-7a62-a2ba-eb2c93a3a2fa@gmail.com> (raw)
In-Reply-To: <20230315161142.48de9d98@kernel.org>
On 3/15/23 16:11, Jakub Kicinski wrote:
> On Wed, 15 Mar 2023 15:52:02 -0700 Stephen Hemminger wrote:
>> On Wed, 15 Mar 2023 15:30:44 -0700
>> Jakub Kicinski <kuba@kernel.org> wrote:
>>
>>> Add basic documentation about NAPI. We can stop linking to the ancient
>>> doc on the LF wiki.
>>>
>>> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>>> ---
>>> CC: jesse.brandeburg@intel.com
>>> CC: anthony.l.nguyen@intel.com
>>> CC: corbet@lwn.net
>>> CC: linux-doc@vger.kernel.org
>>
>> The one thing missing, is how to handle level vs edge triggered interrupts.
>> For level triggered interrupts, the re-enable is inherently not racy.
>> I.e re-enabling interrupt when packet is present will cause an interrupt.
>> But for devices with edge triggered interrupts, it is often necessary to
>> poll and manually schedule again. Older documentation referred to this
>> as the "rotten packet" problem.
>>
>> Maybe this is no longer a problem for drivers?
>> Or maybe all new hardware uses PCI MSI and is level triggered?
>
> It's still a problem depending on the exact design of the interrupt
> controller in the chip / tradeoffs the SW wants to make.
> I haven't actually read the LF doc, because I wasn't sure about the
> licenses (sigh). The rotten packet problem does not come up in reviews
> very often, so it wasn't front of mind. I'm not sure I'd be able to
> concisely describe it, actually :S There are many races and conditions
> which can lead to it.
True, though I would put a word in or two about level vs. edge triggered
anyway, if nothing else, explain essentially what Stephen just provided
ought to be a good starting point for driver writers to consider the
possible issue.
--
Florian
next prev parent reply other threads:[~2023-03-16 23:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 22:30 [PATCH net-next] docs: networking: document NAPI Jakub Kicinski
2023-03-15 22:46 ` Stephen Hemminger
2023-03-15 22:52 ` Stephen Hemminger
2023-03-15 23:11 ` Jakub Kicinski
2023-03-16 1:36 ` Stephen Hemminger
2023-03-16 22:59 ` Florian Fainelli [this message]
2023-03-16 23:07 ` Jakub Kicinski
2023-03-16 23:18 ` Florian Fainelli
2023-03-15 23:12 ` Tony Nguyen
2023-03-15 23:17 ` Jakub Kicinski
2023-03-15 23:19 ` Jakub Kicinski
2023-03-16 0:20 ` Tony Nguyen
2023-03-16 21:27 ` Tony Nguyen
2023-03-16 1:38 ` Stephen Hemminger
2023-03-16 2:58 ` Jakub Kicinski
2023-03-16 12:03 ` Francois Romieu
2023-03-23 0:44 ` Jamal Hadi Salim
2023-03-16 9:50 ` Bagas Sanjaya
2023-03-16 10:29 ` Toke Høiland-Jørgensen
2023-03-16 21:35 ` Jakub Kicinski
2023-03-16 23:16 ` Florian Fainelli
2023-03-21 0:02 ` Jakub Kicinski
2023-03-21 0:48 ` Stephen Hemminger
2023-03-21 1:19 ` Jakub Kicinski
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=7ddfa9e1-c7a2-7a62-a2ba-eb2c93a3a2fa@gmail.com \
--to=f.fainelli@gmail.com \
--cc=anthony.l.nguyen@intel.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stephen@networkplumber.org \
/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;
as well as URLs for NNTP newsgroup(s).