linux/drivers/net/ethernet/mellanox/mlx5/core/lib/aso.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */

#ifndef __MLX5_LIB_ASO_H__
#define __MLX5_LIB_ASO_H__

#include <linux/mlx5/qp.h>
#include "mlx5_core.h"

#define MLX5_ASO_WQEBBS
#define MLX5_ASO_WQEBBS_DATA
#define ASO_CTRL_READ_EN
#define MLX5_WQE_CTRL_WQE_OPC_MOD_SHIFT
#define MLX5_MACSEC_ASO_DS_CNT

#define ASO_CTRL_READ_EN
struct mlx5_wqe_aso_ctrl_seg {};

struct mlx5_wqe_aso_data_seg {};

struct mlx5_aso_wqe {};

struct mlx5_aso_wqe_data {};

enum {};

enum {};

enum {};

enum {};

struct mlx5_aso;

struct mlx5_aso_wqe *mlx5_aso_get_wqe(struct mlx5_aso *aso);
void mlx5_aso_build_wqe(struct mlx5_aso *aso, u8 ds_cnt,
			struct mlx5_aso_wqe *aso_wqe,
			u32 obj_id, u32 opc_mode);
void mlx5_aso_post_wqe(struct mlx5_aso *aso, bool with_data,
		       struct mlx5_wqe_ctrl_seg *doorbell_cseg);
int mlx5_aso_poll_cq(struct mlx5_aso *aso, bool with_data);

struct mlx5_aso *mlx5_aso_create(struct mlx5_core_dev *mdev, u32 pdn);
void mlx5_aso_destroy(struct mlx5_aso *aso);
#endif /* __MLX5_LIB_ASO_H__ */