lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ddfa9e1-c7a2-7a62-a2ba-eb2c93a3a2fa@gmail.com>
Date:   Thu, 16 Mar 2023 15:59:49 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Stephen Hemminger <stephen@...workplumber.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
        pabeni@...hat.com, jesse.brandeburg@...el.com,
        anthony.l.nguyen@...el.com, corbet@....net,
        linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next] docs: networking: document NAPI

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@...nel.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@...nel.org>
>>> ---
>>> CC: jesse.brandeburg@...el.com
>>> CC: anthony.l.nguyen@...el.com
>>> CC: corbet@....net
>>> CC: linux-doc@...r.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ