OSDN Git Service

net/mlx5e: Early-return on empty completion queues
authorTariq Toukan <tariqt@mellanox.com>
Mon, 19 Jun 2017 15:11:30 +0000 (18:11 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 3 Sep 2017 03:34:08 +0000 (06:34 +0300)
commit4b7dfc9925143eb4a55bbb97c033d6da03b29bff
tree346bcc87dfaefad75684dd4581c958319d47094a
parent4cbb7558013a4f600eb1ca9ad34959d8912240e6
net/mlx5e: Early-return on empty completion queues

NAPI context handles different kinds of completion queues
(RX, TX, and others). Hence, upon a poll trial, some of them
might be empty.
Here we early-return upon empty completion queues, as well as
full rx buffer, and save unnecessary logic and memory barriers.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c