net/mlx4_en: use napi_complete_done() return value

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>
This commit is contained in:
Eric Dumazet 2016-11-15 10:15:14 -08:00 committed by David S. Miller
parent 364b605573
commit 2e71328375

View 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;
}