From: David Miller <davem@davemloft.net>
To: benh@kernel.crashing.org
Cc: shemminger@osdl.org, netdev@vger.kernel.org, ebs@ebshome.net,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] split NAPI from network device.
Date: Thu, 22 Feb 2007 03:18:58 -0800 (PST) [thread overview]
Message-ID: <20070222.031858.39163926.davem@davemloft.net> (raw)
In-Reply-To: <1172100271.6792.7.camel@localhost.localdomain>
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Thu, 22 Feb 2007 10:24:31 +1100
> The device has a single interrupt though that interrupt at least can
> tell you which queues need servicing. It can't mask the interrupt per
> queue though, which is the main issue.
Right, which effectively turns it into a single interrupt
for multiple queues as far as NAPI is concerned.
> So while I think this scheme would work (the driver, ibm_emac, currently
> uses a fake net_device and that sort-of works, budget is set a CONFIG_*
> time though, I'm sure that can/needs to be improved), I've been
> wondering all along if I could do something smarter by doing some
> interrupt soft-disabling instead, though I have to get my head around
> properly kicking softirqs from task context (if I need to re-trigger
> from a enable_*() call occuring at task context).
If you cannot make use of it sanely in your driver, it's hard to
justify this patch just in the cleanup sense since it breaks
NAPI interfaces and makes driver maintainence harder than it would
need to be.
Whereas if it makes a straightforward implementation in drivers
like ibm_emac possible, this tends to tip things over the edge
such that we can justify the maintainence hassles to some extent.
I think the intention with these changes, is that you would
have a napi struct per-queue. It would be embedded in some
private per-queue software state struct, and from which you
could also get to the device. So you'd do the "container_of()"
bit a little bit differently at the beginning of your ->poll()
method.
This way you don't need the dummy netdevices.
Anyways, please let us know what you come up with once you get
a chance to investigate this.
Thanks!
next prev parent reply other threads:[~2007-02-22 11:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-12 5:27 [PATCH] add init_dummy_netdev() for napi only dummy intefaces Benjamin Herrenschmidt
2006-12-13 19:35 ` Stephen Hemminger
2006-12-13 20:42 ` Benjamin Herrenschmidt
2006-12-13 21:06 ` Stephen Hemminger
2006-12-13 23:46 ` [RFC] split NAPI from network device Stephen Hemminger
2006-12-14 20:01 ` Benjamin Herrenschmidt
2007-02-21 5:31 ` David Miller
2007-02-21 7:39 ` Divy Le Ray
2007-02-21 7:47 ` David Miller
2007-02-21 23:24 ` Benjamin Herrenschmidt
2007-02-22 11:18 ` David Miller [this message]
2007-02-22 12:24 ` Divy Le Ray
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=20070222.031858.39163926.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=benh@kernel.crashing.org \
--cc=ebs@ebshome.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.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).