From: Jarek Poplawski <jarkao2@gmail.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>,
auke-jan.h.kok@intel.com, gallatin@myri.com,
joonwpark81@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jgarzik@pobox.com,
jesse.brandeburg@intel.com
Subject: Re: [RFC] net: napi fix
Date: Thu, 13 Dec 2007 22:55:06 +0100 [thread overview]
Message-ID: <4761AA3A.1000605@gmail.com> (raw)
In-Reply-To: <476198F9.4020004@linux-foundation.org>
Stephen Hemminger wrote, On 12/13/2007 09:41 PM:
> David Miller wrote:
>> From: Jarek Poplawski <jarkao2@gmail.com>
>> Date: Thu, 13 Dec 2007 21:16:12 +0100
>>
>>
>>> I see in a nearby thread you would prefer to save some work to drivers
>>> (like this netif_running() check), but I think this all is at the cost
>>> of flexibility, and there will probably appear new problems, when a
>>> driver simply can't wait till the next poll (which btw. looks strange
>>> with all these hotplugging, usb and powersaving).
>>>
>> As someone who has actually had to edit the NAPI support of _EVERY_
>> single driver in the tree I can tell you that code duplication and
>> subtle semantic differences are a huge issue.
>>
>> And when you talk about driver flexibility, it's wise to mention that
>> this comes at the expense of flexibility in the core implmentation.
>> For example, if we export the list handling widget into the ->poll()
>> routines, god help the person who wants to change how the poll list is
>> managed in net_rx_action() :-/
>>
>> So we don't want to export datastructure details like that to the
>> driver.
(I hope you both don't mind I save some 'paper' and do this
2 in 1...)
So, you've seen a few drivers, know this much better than me, and
maybe even thought why they all so unnecessarily different... Of
course, if you think that despite those differences they all can
work with simpler napi api then OK (until they don't have to do
any cheating, like with this 'work' here).
> Also, most of the drivers should/could be doing the same thing. It is
> seems that
> driver writers just want to get "creative" and do things differently.
> The code is
> cleaner, safer, and less buggy if every device uses the interface in the
> same way.
>
> When I did the initial pass on this, I didn't see a single variation on
> NAPI usage
> that was better than the simple "get N packets and return" variation.
> But Dave
> did way more detailed grunt work on this.
It seems there are some differences in thinking what is simple/complex.
I think drivers' developers are used to controlling their devices, so
they know better when to turn on/off interrupts. So, maybe similar model
could be appropriate here. Sometimes doing more looks simpler than doing
less and remembering how and when the rest will be done (like
this netif_running() test). But I hope I'm wrong here, and this will
work after all!
Cheers,
Jarek P.
next prev parent reply other threads:[~2007-12-13 21:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-12 17:29 [RFC] net: napi fix Andrew Gallatin
2007-12-12 17:38 ` David Miller
2007-12-12 17:40 ` Andrew Gallatin
2007-12-12 18:41 ` Kok, Auke
2007-12-13 7:41 ` Joonwoo Park
2007-12-13 14:13 ` Andrew Gallatin
2007-12-13 14:19 ` David Miller
2007-12-13 16:45 ` Kok, Auke
2007-12-13 18:22 ` Stephen Hemminger
2007-12-13 19:02 ` Andrew Gallatin
2007-12-13 19:09 ` David Miller
2007-12-13 19:35 ` Stephen Hemminger
2007-12-13 20:38 ` David Miller
2007-12-14 2:06 ` Joonwoo Park
2007-12-13 13:49 ` Jarek Poplawski
2007-12-13 13:50 ` David Miller
2007-12-13 14:14 ` Jarek Poplawski
2007-12-13 20:16 ` Jarek Poplawski
2007-12-13 20:37 ` David Miller
2007-12-13 20:41 ` Stephen Hemminger
2007-12-13 21:55 ` Jarek Poplawski [this message]
2007-12-13 22:28 ` Jarek Poplawski
2007-12-13 22:34 ` David Miller
2007-12-13 22:58 ` Jarek Poplawski
2007-12-20 9:52 ` Robert Olsson
2007-12-20 11:22 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2007-12-12 4:01 [PATCH 6/7] : tehuti Fix possible causing oops of net_rx_action Joonwoo Park
2007-12-12 5:39 ` Stephen Hemminger
2007-12-12 5:46 ` [RFC] net: napi fix Stephen Hemminger
2007-12-12 6:05 ` Joonwoo Park
2007-12-12 15:22 ` David Miller
2007-12-12 15:21 ` David Miller
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=4761AA3A.1000605@gmail.com \
--to=jarkao2@gmail.com \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=gallatin@myri.com \
--cc=jesse.brandeburg@intel.com \
--cc=jgarzik@pobox.com \
--cc=joonwpark81@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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).