netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Miguel Ángel Álvarez" <gotzoncabanes@gmail.com>
Cc: netdev@vger.kernel.org, "Miguel Ángel Álvarez" <gotzoncabanes@gmail.com>
Subject: Re: NAPI of many interfaces with just an interruption source
Date: Fri, 20 Feb 2009 10:54:13 -0800	[thread overview]
Message-ID: <20090220105413.55e4f5f6@extreme> (raw)
In-Reply-To: <b0438a630902201033l395edc7ck4a2749e239797445@mail.gmail.com>

On Fri, 20 Feb 2009 19:33:23 +0100
Miguel Ángel Álvarez <gotzoncabanes@gmail.com> wrote:

> Hi
> 
> I have four interfaces that share the same interruption source (four
> hdlc channels in ixp4xx that share the same rx queue... but I am
> trying to do the question generic).
> 
> My first approach was to declare a napi interface for each device.
> When I detected the first interrupt, I determine the correct net
> interface, and schedule a poll for it.
> 
> The question is that there is no warranty that the data received in
> the polling belongs to the same interface, so...
> 
> - It is correct to do like this, and just analyse the data to check to
> which net interface should the data be sent.
> - Or NAPI is not correct for this case and we should just use the
> simple interruption mechanism?
> 
> Thanks
> 
> Miguel Ángel Álvarez

Several other devices have this (like sky2).  Since NAPI needs
to control irq, you need to have 1 NAPI instance per IRQ, so for
these type of drivers there is 1 NAPI in hardware structure
and multiple network devices.

Note: netconsole/netpoll will only work on a single channel,
but usually a big issue.

  reply	other threads:[~2009-02-20 18:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 18:33 NAPI of many interfaces with just an interruption source Miguel Ángel Álvarez
2009-02-20 18:54 ` Stephen Hemminger [this message]
2009-02-21 13:12   ` Herbert Xu
2009-02-21 18:15     ` Miguel Ángel Álvarez
2009-02-21 21:19     ` Benjamin Herrenschmidt
2009-02-23  9:21       ` Miguel Ángel Álvarez

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=20090220105413.55e4f5f6@extreme \
    --to=shemminger@vyatta.com \
    --cc=gotzoncabanes@gmail.com \
    --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).