diff options
Diffstat (limited to 'drivers/net/mlx4/en_netdev.c')
-rw-r--r-- | drivers/net/mlx4/en_netdev.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 11b793ad2e1b..ebada3c7aff2 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -369,7 +369,6 @@ static struct net_device_stats *mlx4_en_get_stats(struct net_device *dev) | |||
369 | 369 | ||
370 | static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) | 370 | static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) |
371 | { | 371 | { |
372 | struct mlx4_en_dev *mdev = priv->mdev; | ||
373 | struct mlx4_en_cq *cq; | 372 | struct mlx4_en_cq *cq; |
374 | int i; | 373 | int i; |
375 | 374 | ||
@@ -379,15 +378,8 @@ static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) | |||
379 | * satisfy our coelsing target. | 378 | * satisfy our coelsing target. |
380 | * - moder_time is set to a fixed value. | 379 | * - moder_time is set to a fixed value. |
381 | */ | 380 | */ |
382 | priv->rx_frames = (mdev->profile.rx_moder_cnt == | 381 | priv->rx_frames = MLX4_EN_RX_COAL_TARGET / priv->dev->mtu + 1; |
383 | MLX4_EN_AUTO_CONF) ? | 382 | priv->rx_usecs = MLX4_EN_RX_COAL_TIME; |
384 | MLX4_EN_RX_COAL_TARGET / | ||
385 | priv->dev->mtu + 1 : | ||
386 | mdev->profile.rx_moder_cnt; | ||
387 | priv->rx_usecs = (mdev->profile.rx_moder_time == | ||
388 | MLX4_EN_AUTO_CONF) ? | ||
389 | MLX4_EN_RX_COAL_TIME : | ||
390 | mdev->profile.rx_moder_time; | ||
391 | mlx4_dbg(INTR, priv, "Default coalesing params for mtu:%d - " | 383 | mlx4_dbg(INTR, priv, "Default coalesing params for mtu:%d - " |
392 | "rx_frames:%d rx_usecs:%d\n", | 384 | "rx_frames:%d rx_usecs:%d\n", |
393 | priv->dev->mtu, priv->rx_frames, priv->rx_usecs); | 385 | priv->dev->mtu, priv->rx_frames, priv->rx_usecs); |
@@ -411,7 +403,7 @@ static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) | |||
411 | priv->pkt_rate_high = MLX4_EN_RX_RATE_HIGH; | 403 | priv->pkt_rate_high = MLX4_EN_RX_RATE_HIGH; |
412 | priv->rx_usecs_high = MLX4_EN_RX_COAL_TIME_HIGH; | 404 | priv->rx_usecs_high = MLX4_EN_RX_COAL_TIME_HIGH; |
413 | priv->sample_interval = MLX4_EN_SAMPLE_INTERVAL; | 405 | priv->sample_interval = MLX4_EN_SAMPLE_INTERVAL; |
414 | priv->adaptive_rx_coal = mdev->profile.auto_moder; | 406 | priv->adaptive_rx_coal = 1; |
415 | priv->last_moder_time = MLX4_EN_AUTO_CONF; | 407 | priv->last_moder_time = MLX4_EN_AUTO_CONF; |
416 | priv->last_moder_jiffies = 0; | 408 | priv->last_moder_jiffies = 0; |
417 | priv->last_moder_packets = 0; | 409 | priv->last_moder_packets = 0; |