hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/mlx5/cq.h
....@@ -33,7 +33,6 @@
3333 #ifndef MLX5_CORE_CQ_H
3434 #define MLX5_CORE_CQ_H
3535
36
-#include <rdma/ib_verbs.h>
3736 #include <linux/mlx5/driver.h>
3837 #include <linux/refcount.h>
3938
....@@ -47,7 +46,7 @@
4746 struct completion free;
4847 unsigned vector;
4948 unsigned int irqn;
50
- void (*comp) (struct mlx5_core_cq *);
49
+ void (*comp)(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe);
5150 void (*event) (struct mlx5_core_cq *, enum mlx5_event);
5251 u32 cons_index;
5352 unsigned arm_sn;
....@@ -55,12 +54,13 @@
5554 int pid;
5655 struct {
5756 struct list_head list;
58
- void (*comp)(struct mlx5_core_cq *);
57
+ void (*comp)(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe);
5958 void *priv;
6059 } tasklet_ctx;
6160 int reset_notify_added;
6261 struct list_head reset_notify;
63
- struct mlx5_eq *eq;
62
+ struct mlx5_eq_comp *eq;
63
+ u16 uid;
6464 };
6565
6666
....@@ -124,9 +124,9 @@
124124 };
125125
126126 enum {
127
- CQE_SIZE_64 = 0,
128
- CQE_SIZE_128 = 1,
129
- CQE_SIZE_128_PAD = 2,
127
+ CQE_STRIDE_64 = 0,
128
+ CQE_STRIDE_128 = 1,
129
+ CQE_STRIDE_128_PAD = 2,
130130 };
131131
132132 #define MLX5_MAX_CQ_PERIOD (BIT(__mlx5_bit_sz(cqc, cq_period)) - 1)
....@@ -134,8 +134,8 @@
134134
135135 static inline int cqe_sz_to_mlx_sz(u8 size, int padding_128_en)
136136 {
137
- return padding_128_en ? CQE_SIZE_128_PAD :
138
- size == 64 ? CQE_SIZE_64 : CQE_SIZE_128;
137
+ return padding_128_en ? CQE_STRIDE_128_PAD :
138
+ size == 64 ? CQE_STRIDE_64 : CQE_STRIDE_128;
139139 }
140140
141141 static inline void mlx5_cq_set_ci(struct mlx5_core_cq *cq)
....@@ -169,7 +169,7 @@
169169 doorbell[0] = cpu_to_be32(sn << 28 | cmd | ci);
170170 doorbell[1] = cpu_to_be32(cq->cqn);
171171
172
- mlx5_write64(doorbell, uar_page + MLX5_CQ_DOORBELL, NULL);
172
+ mlx5_write64(doorbell, uar_page + MLX5_CQ_DOORBELL);
173173 }
174174
175175 static inline void mlx5_cq_hold(struct mlx5_core_cq *cq)
....@@ -184,10 +184,10 @@
184184 }
185185
186186 int mlx5_core_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
187
- u32 *in, int inlen);
187
+ u32 *in, int inlen, u32 *out, int outlen);
188188 int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
189189 int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
190
- u32 *out, int outlen);
190
+ u32 *out);
191191 int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
192192 u32 *in, int inlen);
193193 int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev,