net/mlx4_en: use napi_complete_done() return value
authorEric Dumazet <edumazet@google.com>
Tue, 15 Nov 2016 18:15:14 +0000 (10:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 18:40:58 +0000 (13:40 -0500)
Do not rearm interrupts if we are busy polling.

mlx4 uses separate CQ for TX and RX, so number of TX interrupts
does not change, unfortunately.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Cc: Adam Belay <abelay@google.com>
Cc: Tariq Toukan <tariqt@mellanox.com>
Cc: Yuval Mintz <Yuval.Mintz@cavium.com>
Cc: Ariel Elior <ariel.elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c

index 2cc91002064f9aab7d3abfe828b85f3b6e7393fd..22f08f9ef4645869359783823127c0432fc7a591 100644 (file)
@@ -1137,8 +1137,8 @@ int mlx4_en_poll_rx_cq(struct napi_struct *napi, int budget)
                done = 0;
        }
        /* Done for now */
-       napi_complete_done(napi, done);
-       mlx4_en_arm_cq(priv, cq);
+       if (napi_complete_done(napi, done))
+               mlx4_en_arm_cq(priv, cq);
        return done;
 }