forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/net/ethernet/mellanox/mlx5/core/en_dim.c
....@@ -30,22 +30,22 @@
3030 * SOFTWARE.
3131 */
3232
33
-#include <linux/net_dim.h>
33
+#include <linux/dim.h>
3434 #include "en.h"
3535
3636 static void
37
-mlx5e_complete_dim_work(struct net_dim *dim, struct net_dim_cq_moder moder,
37
+mlx5e_complete_dim_work(struct dim *dim, struct dim_cq_moder moder,
3838 struct mlx5_core_dev *mdev, struct mlx5_core_cq *mcq)
3939 {
4040 mlx5_core_modify_cq_moderation(mdev, mcq, moder.usec, moder.pkts);
41
- dim->state = NET_DIM_START_MEASURE;
41
+ dim->state = DIM_START_MEASURE;
4242 }
4343
4444 void mlx5e_rx_dim_work(struct work_struct *work)
4545 {
46
- struct net_dim *dim = container_of(work, struct net_dim, work);
46
+ struct dim *dim = container_of(work, struct dim, work);
4747 struct mlx5e_rq *rq = container_of(dim, struct mlx5e_rq, dim);
48
- struct net_dim_cq_moder cur_moder =
48
+ struct dim_cq_moder cur_moder =
4949 net_dim_get_rx_moderation(dim->mode, dim->profile_ix);
5050
5151 mlx5e_complete_dim_work(dim, cur_moder, rq->mdev, &rq->cq.mcq);
....@@ -53,9 +53,9 @@
5353
5454 void mlx5e_tx_dim_work(struct work_struct *work)
5555 {
56
- struct net_dim *dim = container_of(work, struct net_dim, work);
56
+ struct dim *dim = container_of(work, struct dim, work);
5757 struct mlx5e_txqsq *sq = container_of(dim, struct mlx5e_txqsq, dim);
58
- struct net_dim_cq_moder cur_moder =
58
+ struct dim_cq_moder cur_moder =
5959 net_dim_get_tx_moderation(dim->mode, dim->profile_ix);
6060
6161 mlx5e_complete_dim_work(dim, cur_moder, sq->cq.mdev, &sq->cq.mcq);