mlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global.
Make some functions and structures global to allow for code reuse when creating rate limiting sendqueues. Sponsored by: Mellanox Technologies MFC after: 1 week
This commit is contained in:
parent
941cd5d1a4
commit
28f22ccea3
@ -352,6 +352,21 @@ struct mlx5e_stats {
|
||||
struct mlx5e_port_stats_debug port_stats_debug;
|
||||
};
|
||||
|
||||
struct mlx5e_rq_param {
|
||||
u32 rqc [MLX5_ST_SZ_DW(rqc)];
|
||||
struct mlx5_wq_param wq;
|
||||
};
|
||||
|
||||
struct mlx5e_sq_param {
|
||||
u32 sqc [MLX5_ST_SZ_DW(sqc)];
|
||||
struct mlx5_wq_param wq;
|
||||
};
|
||||
|
||||
struct mlx5e_cq_param {
|
||||
u32 cqc [MLX5_ST_SZ_DW(cqc)];
|
||||
struct mlx5_wq_param wq;
|
||||
};
|
||||
|
||||
struct mlx5e_params {
|
||||
u8 log_sq_size;
|
||||
u8 log_rq_size;
|
||||
@ -794,5 +809,8 @@ void mlx5e_create_stats(struct sysctl_ctx_list *,
|
||||
void mlx5e_send_nop(struct mlx5e_sq *, u32);
|
||||
void mlx5e_sq_cev_timeout(void *);
|
||||
int mlx5e_refresh_channel_params(struct mlx5e_priv *);
|
||||
int mlx5e_open_cq(struct mlx5e_priv *, struct mlx5e_cq_param *,
|
||||
struct mlx5e_cq *, mlx5e_cq_comp_t *, int eq_ix);
|
||||
void mlx5e_close_cq(struct mlx5e_cq *);
|
||||
|
||||
#endif /* _MLX5_EN_H_ */
|
||||
|
@ -34,21 +34,6 @@
|
||||
char mlx5e_version[] = "Mellanox Ethernet driver"
|
||||
" (" ETH_DRIVER_VERSION ")";
|
||||
|
||||
struct mlx5e_rq_param {
|
||||
u32 rqc [MLX5_ST_SZ_DW(rqc)];
|
||||
struct mlx5_wq_param wq;
|
||||
};
|
||||
|
||||
struct mlx5e_sq_param {
|
||||
u32 sqc [MLX5_ST_SZ_DW(sqc)];
|
||||
struct mlx5_wq_param wq;
|
||||
};
|
||||
|
||||
struct mlx5e_cq_param {
|
||||
u32 cqc [MLX5_ST_SZ_DW(cqc)];
|
||||
struct mlx5_wq_param wq;
|
||||
};
|
||||
|
||||
struct mlx5e_channel_param {
|
||||
struct mlx5e_rq_param rq;
|
||||
struct mlx5e_sq_param sq;
|
||||
@ -1349,7 +1334,7 @@ mlx5e_disable_cq(struct mlx5e_cq *cq)
|
||||
mlx5_core_destroy_cq(cq->priv->mdev, &cq->mcq);
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
mlx5e_open_cq(struct mlx5e_priv *priv,
|
||||
struct mlx5e_cq_param *param,
|
||||
struct mlx5e_cq *cq,
|
||||
@ -1374,7 +1359,7 @@ err_destroy_cq:
|
||||
return (err);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
mlx5e_close_cq(struct mlx5e_cq *cq)
|
||||
{
|
||||
mlx5e_disable_cq(cq);
|
||||
|
Loading…
x
Reference in New Issue
Block a user