Subject: Re: [PATCH net-next 16/16] sfc: Don't receive packets when the napi budget == 0

From: [email-masked] (Eric W. Biederman)
Date: Sat, 15 Mar 2014 12:25:06 -0700

Eric Dumazet <[email-masked]> writes:

> On Sat, 2014-03-15 at 17:23 +0000, Ben Hutchings wrote:
>
>> 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.
>> 
>
> ndo_poll_controller() could process all events, and queue incoming
> packets through netif_rx().
>
> Nobody cares about performance in this path.

I made this change so that we don't process rx packets in hard irq
context and cause things to break, and I made the most minimal most
obvious change I could.

queueing incoming packets with trough netif_rx sounds elegant.

The practical challenge is that there might be napi bottom halves
already scheduled to run before ndo_poll_controller is called so even
if ndo_poll_controller processes all of the events and calls netif_rx
to deal with the incoming packets the napi bottom halves will have to
still not process the queues when they are called.

Eric