Browse Source

net/mlx4_en: Fix adaptive moderation cq update

When turning on adaptive_rx under adaptive moderation, the CQ's moderation
count wasn't updated according to rx_frames which resulted in too many
interrupts and bandwidth drop.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sagi Grimberg 12 years ago
parent
commit
a1c6693a50
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/net/ethernet/mellanox/mlx4/en_netdev.c

+ 1 - 0
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

@@ -1323,6 +1323,7 @@ static void mlx4_en_auto_moderation(struct mlx4_en_priv *priv)
 			priv->last_moder_time[ring] = moder_time;
 			cq = &priv->rx_cq[ring];
 			cq->moder_time = moder_time;
+			cq->moder_cnt = priv->rx_frames;
 			err = mlx4_en_set_cq_moder(priv, cq);
 			if (err)
 				en_err(priv, "Failed modifying moderation for cq:%d\n",