aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/mlx4/en_ethtool.c3
-rw-r--r--drivers/net/mlx4/en_netdev.c2
-rw-r--r--drivers/net/mlx4/mlx4_en.h4
3 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/mlx4/en_ethtool.c b/drivers/net/mlx4/en_ethtool.c
index 91d81169e04e..091f99052c91 100644
--- a/drivers/net/mlx4/en_ethtool.c
+++ b/drivers/net/mlx4/en_ethtool.c
@@ -268,8 +268,7 @@ static int mlx4_en_set_coalesce(struct net_device *dev,
268 268
269 priv->rx_frames = (coal->rx_max_coalesced_frames == 269 priv->rx_frames = (coal->rx_max_coalesced_frames ==
270 MLX4_EN_AUTO_CONF) ? 270 MLX4_EN_AUTO_CONF) ?
271 MLX4_EN_RX_COAL_TARGET / 271 MLX4_EN_RX_COAL_TARGET :
272 priv->dev->mtu + 1 :
273 coal->rx_max_coalesced_frames; 272 coal->rx_max_coalesced_frames;
274 priv->rx_usecs = (coal->rx_coalesce_usecs == 273 priv->rx_usecs = (coal->rx_coalesce_usecs ==
275 MLX4_EN_AUTO_CONF) ? 274 MLX4_EN_AUTO_CONF) ?
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index fea65e78d6de..16a634ffbcdf 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -372,7 +372,7 @@ static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv)
372 * satisfy our coelsing target. 372 * satisfy our coelsing target.
373 * - moder_time is set to a fixed value. 373 * - moder_time is set to a fixed value.
374 */ 374 */
375 priv->rx_frames = MLX4_EN_RX_COAL_TARGET / priv->dev->mtu + 1; 375 priv->rx_frames = MLX4_EN_RX_COAL_TARGET;
376 priv->rx_usecs = MLX4_EN_RX_COAL_TIME; 376 priv->rx_usecs = MLX4_EN_RX_COAL_TIME;
377 en_dbg(INTR, priv, "Default coalesing params for mtu:%d - " 377 en_dbg(INTR, priv, "Default coalesing params for mtu:%d - "
378 "rx_frames:%d rx_usecs:%d\n", 378 "rx_frames:%d rx_usecs:%d\n",
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index 174ae86e9523..fcbfcfc11568 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -143,8 +143,8 @@ enum {
143#define MLX4_EN_DEF_TX_RING_SIZE 1024 143#define MLX4_EN_DEF_TX_RING_SIZE 1024
144#define MLX4_EN_DEF_RX_RING_SIZE 1024 144#define MLX4_EN_DEF_RX_RING_SIZE 1024
145 145
146/* Target number of bytes to coalesce with interrupt moderation */ 146/* Target number of packets to coalesce with interrupt moderation */
147#define MLX4_EN_RX_COAL_TARGET 0x20000 147#define MLX4_EN_RX_COAL_TARGET 44
148#define MLX4_EN_RX_COAL_TIME 0x10 148#define MLX4_EN_RX_COAL_TIME 0x10
149 149
150#define MLX4_EN_TX_COAL_PKTS 5 150#define MLX4_EN_TX_COAL_PKTS 5