From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, auke-jan.h.kok@intel.com
Subject: Re: NAPI poll behavior in various Intel drivers
Date: Mon, 7 Jan 2008 09:24:13 +0100 [thread overview]
Message-ID: <20080107082413.GA1761@ff.dom.local> (raw)
In-Reply-To: <20080104.034036.160194618.davem@davemloft.net>
On 04-01-2008 12:40, David Miller wrote:
...
> That "tx_cleaned" thing clouds the logic in all of these driver's
> poll routines.
>
> The one necessary precondition is that when work_done < budget
> we exit polling and return a value less than budget.
>
> If the ->poll() returns a value less than budget, net_rx_action()
> assumes that the device has been removed from the poll() list.
>
> /* Drivers must not modify the NAPI state if they
> * consume the entire weight. In such cases this code
> * still "owns" the NAPI instance and therefore can
> * move the instance around on the list at-will.
> */
> if (unlikely(work == weight))
> list_move_tail(&n->poll_list, list);
>
Probably it's because of this clouded logic, but IMHO: "Drivers must
not modify the NAPI state if..." doesn't imply: drivers must modify
the NAPI state otherwise. (But it seems I must have missed the real
reason for this quote here.)
Regards,
Jarek P.
prev parent reply other threads:[~2008-01-07 8:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 11:40 NAPI poll behavior in various Intel drivers David Miller
2008-01-04 20:10 ` James Chapman
2008-01-04 21:24 ` David Miller
2008-01-05 0:18 ` James Chapman
2008-01-05 7:25 ` David Miller
2008-01-05 13:29 ` Andi Kleen
2008-01-06 4:15 ` David Miller
2008-01-07 8:24 ` Jarek Poplawski [this message]
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=20080107082413.GA1761@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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).