#ifndef MLX5_CORE_CQ_H
#define MLX5_CORE_CQ_H
#include <linux/mlx5/driver.h>
#include <linux/refcount.h>
struct mlx5_core_cq { … };
enum { … };
enum { … };
enum { … };
enum { … };
struct mlx5_cq_modify_params { … };
enum { … };
#define MLX5_MAX_CQ_PERIOD …
#define MLX5_MAX_CQ_COUNT …
static inline int cqe_sz_to_mlx_sz(u8 size, int padding_128_en)
{ … }
static inline void mlx5_cq_set_ci(struct mlx5_core_cq *cq)
{ … }
enum { … };
static inline void mlx5_cq_arm(struct mlx5_core_cq *cq, u32 cmd,
void __iomem *uar_page,
u32 cons_index)
{ … }
static inline void mlx5_cq_hold(struct mlx5_core_cq *cq)
{ … }
static inline void mlx5_cq_put(struct mlx5_core_cq *cq)
{ … }
int mlx5_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
u32 *in, int inlen, u32 *out, int outlen);
int mlx5_core_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
u32 *in, int inlen, u32 *out, int outlen);
int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
u32 *out);
int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq,
u32 *in, int inlen);
int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev,
struct mlx5_core_cq *cq, u16 cq_period,
u16 cq_max_count);
static inline void mlx5_dump_err_cqe(struct mlx5_core_dev *dev,
struct mlx5_err_cqe *err_cqe)
{ … }
int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq);
#endif