sfc: don't rearm interrupts if busy polling
authorBert Kenward <bkenward@solarflare.com>
Mon, 6 Feb 2017 16:50:55 +0000 (16:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2017 16:59:36 +0000 (11:59 -0500)
Since commit 364b6055738b ("net: busy-poll: return busypolling status
to drivers"), napi_complete_done() returns a boolean that can be used
by drivers to conditionally rearm interrupts.

Testing with a 7142 shows a small latency improvement of ~100 ns.

Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/efx.c

index fcd4eeecfef4201d4e0b205a14fba2f57a1041ed..c28cd9daf94963d20c391c7508560a429f2eff37 100644 (file)
@@ -328,8 +328,8 @@ static int efx_poll(struct napi_struct *napi, int budget)
                 * since efx_nic_eventq_read_ack() will have no effect if
                 * interrupts have already been disabled.
                 */
-               napi_complete_done(napi, spent);
-               efx_nic_eventq_read_ack(channel);
+               if (napi_complete_done(napi, spent))
+                       efx_nic_eventq_read_ack(channel);
        }
 
        return spent;