From: Roland Dreier <rdreier@cisco.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, shemminger@linux-foundation.org,
rusty@rustcorp.com.au, jgarzik@pobox.com
Subject: Re: [PATCH RFX]: napi_struct V3
Date: Sat, 28 Jul 2007 08:21:58 -0700 [thread overview]
Message-ID: <ada6444y2nd.fsf@cisco.com> (raw)
In-Reply-To: <20070723.210748.63127793.davem@davemloft.net> (David Miller's message of "Mon, 23 Jul 2007 21:07:48 -0700 (PDT)")
I've been on vacation so I missed most of this thread. I'm just
catching up now...
> Ok I converted everything with Rusty's suggestion to move napi_struct
> out of net_device, this was mostly mechanical but some devices took
> some unanticipated amount of work.
Actually you missed drivers/infiniband/ulp/ipoib, which has used NAPI
since 2.6.22. I can take a stab at the conversion soon if you want...
> Another area of consternation are drivers that were using
> netif_rx_reschedule(), as that interface was removed because it
> doesn't fit well with the caller managing the dev->quota et al. I
> left race conditions in the drivers that were using that interface,
> but they should still basically work nonetheless.
...but this is a problem for IPoIB. The underlying IB stuff only
allows us to register what is essentially a one-shot edge-triggered
interrupt. So there is a race between calling netif_rx_complete() and
calling ib_req_notify_cq() (which enables the interrupt), since the
interrupt might never happen if a packet arrives between the two calls.
In the current driver we are OK because ib_req_notify_cq() can return
a hint if an event was missed, but to use this hint we need a way to
restart the NAPI poll without getting into trouble if the interrupt
handler calls netif_rx_schedule() too.
Thanks,
Roland
next prev parent reply other threads:[~2007-07-28 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 4:07 [PATCH RFX]: napi_struct V3 David Miller
2007-07-24 4:47 ` Rusty Russell
2007-07-24 5:47 ` David Miller
2007-07-24 6:21 ` Rusty Russell
2007-07-25 0:45 ` David Miller
2007-07-25 1:15 ` Rusty Russell
2007-07-25 1:47 ` David Miller
2007-07-25 2:33 ` Rusty Russell
2007-07-25 4:29 ` David Miller
2007-07-25 5:09 ` Rusty Russell
2007-07-25 5:12 ` David Miller
2007-07-25 5:10 ` David Miller
2007-07-24 7:12 ` Francois Romieu
2007-07-24 7:33 ` Jeff Garzik
2007-07-24 7:35 ` David Miller
2007-07-28 15:21 ` Roland Dreier [this message]
2007-07-29 5:30 ` 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=ada6444y2nd.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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).