From: Roland Dreier <rdreier@cisco.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@vger.kernel.org
Subject: Re: NAPI: netif_rx_reschedule() ??
Date: Wed, 30 Aug 2006 16:31:12 -0700 [thread overview]
Message-ID: <adapsehls1r.fsf@cisco.com> (raw)
In-Reply-To: <20060830161219.7878bada@localhost.localdomain> (Stephen Hemminger's message of "Wed, 30 Aug 2006 16:12:19 -0700")
Stephen> The undo should really be handled by the caller, not in
Stephen> netif_rx_reschedule. The existing interface assumes you
Stephen> have already deducted N from your quota and so it needs
Stephen> to be put back.
makes sense -- especially since the caller probably also deducted N
from *budget, and netif_rx_reschedule() doesn't touch that.
Stephen> If poll is already scheduled, then after leaving this
Stephen> poll call, another will occur. If the poll routine just
Stephen> went ahead and rescanned that would work as well. The
Stephen> important part is not to leave the poll routine without
Stephen> being in one of these states: * all work is done, and
Stephen> hardware is empty and/or will interrupt for more. * some
Stephen> work was done, and device left on poll_list with softirq
Stephen> raised
But how does the return value of netif_rx_reschedule() help anything?
It either tells you that a poll was already scheduled, or that it
succeeded in scheduling a poll. In either case another poll will
happen. So why should the caller care?
Or is it possible that netif_rx_reschedule() returning 0 might mean
that it failed to reschedule the poll routine? But even if that's
true, how can the caller use that -- 0 might mean the poll was already
rescheduled, and it might mean that the poll couldn't be resheduled,
but there's no way for the caller to know which.
- R.
next prev parent reply other threads:[~2006-08-30 23:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-30 22:07 NAPI: netif_rx_reschedule() ?? Roland Dreier
2006-08-30 23:12 ` Stephen Hemminger
2006-08-30 23:31 ` Roland Dreier [this message]
2006-08-30 23:38 ` Stephen Hemminger
2006-08-30 23:39 ` Roland Dreier
2006-08-31 21:29 ` Stephen Hemminger
2006-08-31 21:50 ` jamal
2006-08-31 23:54 ` Alexey Kuznetsov
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=adapsehls1r.fsf@cisco.com \
--to=rdreier@cisco.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.