@@ -753,6 +753,12 @@ enum mlx5e_channel_state {
MLX5E_CHANNEL_NUM_STATES
};
+struct mlx5e_moder {
+ struct dim_cq_moder dim;
+ /* Consumed when dim is not enabled */
+ struct ethtool_coalesce coal_params;
+};
+
struct mlx5e_channel {
/* data path */
struct mlx5e_rq rq;
@@ -794,6 +800,10 @@ struct mlx5e_channel {
int cpu;
/* Sync between icosq recovery and XSK enable/disable. */
struct mutex icosq_recovery_lock;
+
+ /* coalescing configuration */
+ struct mlx5e_moder rx_moder;
+ struct mlx5e_moder tx_moder;
};
struct mlx5e_ptp;
@@ -570,6 +570,7 @@ mlx5e_set_priv_channels_tx_coalesce(struct mlx5e_priv *priv, struct ethtool_coal
for (i = 0; i < priv->channels.num; ++i) {
struct mlx5e_channel *c = priv->channels.c[i];
+ c->tx_moder.coal_params = *coal;
for (tc = 0; tc < c->num_tc; tc++) {
mlx5_core_modify_cq_moderation(mdev,
&c->sq[tc].cq.mcq,
@@ -588,6 +589,7 @@ mlx5e_set_priv_channels_rx_coalesce(struct mlx5e_priv *priv, struct ethtool_coal
for (i = 0; i < priv->channels.num; ++i) {
struct mlx5e_channel *c = priv->channels.c[i];
+ c->rx_moder.coal_params = *coal;
mlx5_core_modify_cq_moderation(mdev, &c->rq.cq.mcq,
coal->rx_coalesce_usecs,
coal->rx_max_coalesced_frames);