aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/mlx4/en_netdev.c14
-rw-r--r--drivers/net/mlx4/en_params.c10
-rw-r--r--drivers/net/mlx4/mlx4_en.h3
3 files changed, 3 insertions, 24 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
370static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) 370static 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;
diff --git a/drivers/net/mlx4/en_params.c b/drivers/net/mlx4/en_params.c
index 95706ee1c019..86f403163450 100644
--- a/drivers/net/mlx4/en_params.c
+++ b/drivers/net/mlx4/en_params.c
@@ -71,13 +71,6 @@ MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]."
71MLX4_EN_PARM_INT(pfcrx, 0, "Priority based Flow Control policy on RX[7:0]." 71MLX4_EN_PARM_INT(pfcrx, 0, "Priority based Flow Control policy on RX[7:0]."
72 " Per priority bit mask"); 72 " Per priority bit mask");
73 73
74/* Interrupt moderation tunning */
75MLX4_EN_PARM_INT(rx_moder_cnt, MLX4_EN_AUTO_CONF,
76 "Max coalesced descriptors for Rx interrupt moderation");
77MLX4_EN_PARM_INT(rx_moder_time, MLX4_EN_AUTO_CONF,
78 "Timeout following last packet for Rx interrupt moderation");
79MLX4_EN_PARM_INT(auto_moder, 1, "Enable dynamic interrupt moderation");
80
81MLX4_EN_PARM_INT(rx_ring_num1, 0, "Number or Rx rings for port 1 (0 = #cores)"); 74MLX4_EN_PARM_INT(rx_ring_num1, 0, "Number or Rx rings for port 1 (0 = #cores)");
82MLX4_EN_PARM_INT(rx_ring_num2, 0, "Number or Rx rings for port 2 (0 = #cores)"); 75MLX4_EN_PARM_INT(rx_ring_num2, 0, "Number or Rx rings for port 2 (0 = #cores)");
83 76
@@ -92,9 +85,6 @@ int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
92 struct mlx4_en_profile *params = &mdev->profile; 85 struct mlx4_en_profile *params = &mdev->profile;
93 int i; 86 int i;
94 87
95 params->rx_moder_cnt = min_t(int, rx_moder_cnt, MLX4_EN_AUTO_CONF);
96 params->rx_moder_time = min_t(int, rx_moder_time, MLX4_EN_AUTO_CONF);
97 params->auto_moder = auto_moder;
98 params->rss_xor = (rss_xor != 0); 88 params->rss_xor = (rss_xor != 0);
99 params->rss_mask = rss_mask & 0x1f; 89 params->rss_mask = rss_mask & 0x1f;
100 params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS); 90 params->num_lro = min_t(int, num_lro , MLX4_EN_MAX_LRO_DESCRIPTORS);
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index e07111521b72..e78209768def 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -333,9 +333,6 @@ struct mlx4_en_profile {
333 u8 rss_mask; 333 u8 rss_mask;
334 u32 active_ports; 334 u32 active_ports;
335 u32 small_pkt_int; 335 u32 small_pkt_int;
336 int rx_moder_cnt;
337 int rx_moder_time;
338 int auto_moder;
339 u8 no_reset; 336 u8 no_reset;
340 struct mlx4_en_port_profile prof[MLX4_MAX_PORTS + 1]; 337 struct mlx4_en_port_profile prof[MLX4_MAX_PORTS + 1];
341}; 338};