[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1394904231.15764.34.camel@deadeye.wl.decadent.org.uk>
Date: Sat, 15 Mar 2014 17:23:51 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: David Miller <davem@...emloft.net>
Cc: ebiederm@...ssion.com, eric.dumazet@...il.com,
netdev@...r.kernel.org, xiyou.wangcong@...il.com, mpm@...enic.com,
satyam.sharma@...il.com
Subject: Re: [PATCH net-next 16/16] sfc: Don't receive packets when the napi
budget == 0
On Sat, 2014-03-15 at 12:29 -0400, David Miller wrote:
> From: Ben Hutchings <ben@...adent.org.uk>
> Date: Sat, 15 Mar 2014 15:23:34 +0000
>
> > On Fri, 2014-03-14 at 18:11 -0700, Eric W. Biederman wrote:
> >> Processing any incoming packets with a with a napi budget of 0
> >> is incorrect driver behavior.
> >>
> >> This matters as netpoll will shortly call drivers with a budget of 0
> >> to avoid receive packet processing happening in hard irq context.
> >
> > But this also prevents handling TX completions, at which point you may
> > as well change efx_netpoll() to a no-op. And then, does it make sense
> > to implement ndo_poll_controller at all?
> >
> > Note that sfc does have a module parameter to enable separate RX and TX
> > completions so they could be polled separately, but it is disabled by
> > default.
>
> TX completions should run unconditionally, irregardless of the given
> budget.
>
> This is how I have coded all of my drivers, and I how I tell others
> to do so.
The Solarflare hardware provides generic event queues for RX and TX
completions, link changes, errors, etc. The driver can't process TX
completions without going through all the other events mixed in with
them.
It is possible to allocate separate event queues for TX completions but
that isn't done by default because it also requires extra IRQs. The
driver could be restructured to allocate some event queues without IRQs
of their own, but it probably requires a lot of work.
Ben.
--
Ben Hutchings
When you say `I wrote a program that crashed Windows', people just stare ...
and say `Hey, I got those with the system, *for free*'. - Linus Torvalds
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists