@@ -80,7 +80,6 @@ int mlx5_wq_cyc_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
80
80
void * wqc , struct mlx5_wq_cyc * wq ,
81
81
struct mlx5_wq_ctrl * wq_ctrl );
82
82
void mlx5_wq_cyc_wqe_dump (struct mlx5_wq_cyc * wq , u16 ix , u8 nstrides );
83
- u32 mlx5_wq_cyc_get_size (struct mlx5_wq_cyc * wq );
84
83
85
84
int mlx5_wq_qp_create (struct mlx5_core_dev * mdev , struct mlx5_wq_param * param ,
86
85
void * qpc , struct mlx5_wq_qp * wq ,
@@ -89,16 +88,18 @@ int mlx5_wq_qp_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
89
88
int mlx5_cqwq_create (struct mlx5_core_dev * mdev , struct mlx5_wq_param * param ,
90
89
void * cqc , struct mlx5_cqwq * wq ,
91
90
struct mlx5_wq_ctrl * wq_ctrl );
92
- u32 mlx5_cqwq_get_size (struct mlx5_cqwq * wq );
93
- u8 mlx5_cqwq_get_log_stride_size (struct mlx5_cqwq * wq );
94
91
95
92
int mlx5_wq_ll_create (struct mlx5_core_dev * mdev , struct mlx5_wq_param * param ,
96
93
void * wqc , struct mlx5_wq_ll * wq ,
97
94
struct mlx5_wq_ctrl * wq_ctrl );
98
- u32 mlx5_wq_ll_get_size (struct mlx5_wq_ll * wq );
99
95
100
96
void mlx5_wq_destroy (struct mlx5_wq_ctrl * wq_ctrl );
101
97
98
+ static inline u32 mlx5_wq_cyc_get_size (struct mlx5_wq_cyc * wq )
99
+ {
100
+ return (u32 )wq -> fbc .sz_m1 + 1 ;
101
+ }
102
+
102
103
static inline int mlx5_wq_cyc_is_full (struct mlx5_wq_cyc * wq )
103
104
{
104
105
return wq -> cur_sz == wq -> sz ;
@@ -169,6 +170,16 @@ static inline int mlx5_wq_cyc_cc_bigger(u16 cc1, u16 cc2)
169
170
return !equal && !smaller ;
170
171
}
171
172
173
+ static inline u32 mlx5_cqwq_get_size (struct mlx5_cqwq * wq )
174
+ {
175
+ return wq -> fbc .sz_m1 + 1 ;
176
+ }
177
+
178
+ static inline u8 mlx5_cqwq_get_log_stride_size (struct mlx5_cqwq * wq )
179
+ {
180
+ return wq -> fbc .log_stride ;
181
+ }
182
+
172
183
static inline u32 mlx5_cqwq_ctr2ix (struct mlx5_cqwq * wq , u32 ctr )
173
184
{
174
185
return ctr & wq -> fbc .sz_m1 ;
@@ -225,6 +236,11 @@ static inline struct mlx5_cqe64 *mlx5_cqwq_get_cqe(struct mlx5_cqwq *wq)
225
236
return cqe ;
226
237
}
227
238
239
+ static inline u32 mlx5_wq_ll_get_size (struct mlx5_wq_ll * wq )
240
+ {
241
+ return (u32 )wq -> fbc .sz_m1 + 1 ;
242
+ }
243
+
228
244
static inline int mlx5_wq_ll_is_full (struct mlx5_wq_ll * wq )
229
245
{
230
246
return wq -> cur_sz == wq -> fbc .sz_m1 ;
0 commit comments