linux/drivers/infiniband/hw/efa/efa_com_cmd.h

/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
 * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved.
 */

#ifndef _EFA_COM_CMD_H_
#define _EFA_COM_CMD_H_

#include "efa_com.h"

#define EFA_GID_SIZE

struct efa_com_create_qp_params {};

struct efa_com_create_qp_result {};

struct efa_com_modify_qp_params {};

struct efa_com_query_qp_params {};

struct efa_com_query_qp_result {};

struct efa_com_destroy_qp_params {};

struct efa_com_create_cq_params {};

struct efa_com_create_cq_result {};

struct efa_com_destroy_cq_params {};

struct efa_com_create_ah_params {};

struct efa_com_create_ah_result {};

struct efa_com_destroy_ah_params {};

struct efa_com_get_device_attr_result {};

struct efa_com_get_hw_hints_result {};

struct efa_com_mem_addr {};

/* Used at indirect mode page list chunks for chaining */
struct efa_com_ctrl_buff_info {};

struct efa_com_reg_mr_params {};

struct efa_com_mr_interconnect_info {};

struct efa_com_reg_mr_result {};

struct efa_com_dereg_mr_params {};

struct efa_com_alloc_pd_result {};

struct efa_com_dealloc_pd_params {};

struct efa_com_alloc_uar_result {};

struct efa_com_dealloc_uar_params {};

struct efa_com_get_stats_params {};

struct efa_com_basic_stats {};

struct efa_com_messages_stats {};

struct efa_com_rdma_read_stats {};

struct efa_com_rdma_write_stats {};

efa_com_get_stats_result;

int efa_com_create_qp(struct efa_com_dev *edev,
		      struct efa_com_create_qp_params *params,
		      struct efa_com_create_qp_result *res);
int efa_com_modify_qp(struct efa_com_dev *edev,
		      struct efa_com_modify_qp_params *params);
int efa_com_query_qp(struct efa_com_dev *edev,
		     struct efa_com_query_qp_params *params,
		     struct efa_com_query_qp_result *result);
int efa_com_destroy_qp(struct efa_com_dev *edev,
		       struct efa_com_destroy_qp_params *params);
int efa_com_create_cq(struct efa_com_dev *edev,
		      struct efa_com_create_cq_params *params,
		      struct efa_com_create_cq_result *result);
int efa_com_destroy_cq(struct efa_com_dev *edev,
		       struct efa_com_destroy_cq_params *params);
int efa_com_register_mr(struct efa_com_dev *edev,
			struct efa_com_reg_mr_params *params,
			struct efa_com_reg_mr_result *result);
int efa_com_dereg_mr(struct efa_com_dev *edev,
		     struct efa_com_dereg_mr_params *params);
int efa_com_create_ah(struct efa_com_dev *edev,
		      struct efa_com_create_ah_params *params,
		      struct efa_com_create_ah_result *result);
int efa_com_destroy_ah(struct efa_com_dev *edev,
		       struct efa_com_destroy_ah_params *params);
int efa_com_get_device_attr(struct efa_com_dev *edev,
			    struct efa_com_get_device_attr_result *result);
int efa_com_get_hw_hints(struct efa_com_dev *edev,
			 struct efa_com_get_hw_hints_result *result);
bool
efa_com_check_supported_feature_id(struct efa_com_dev *edev,
				   enum efa_admin_aq_feature_id feature_id);
int efa_com_set_feature_ex(struct efa_com_dev *edev,
			   struct efa_admin_set_feature_resp *set_resp,
			   struct efa_admin_set_feature_cmd *set_cmd,
			   enum efa_admin_aq_feature_id feature_id,
			   dma_addr_t control_buf_dma_addr,
			   u32 control_buff_size);
int efa_com_set_aenq_config(struct efa_com_dev *edev, u32 groups);
int efa_com_alloc_pd(struct efa_com_dev *edev,
		     struct efa_com_alloc_pd_result *result);
int efa_com_dealloc_pd(struct efa_com_dev *edev,
		       struct efa_com_dealloc_pd_params *params);
int efa_com_alloc_uar(struct efa_com_dev *edev,
		      struct efa_com_alloc_uar_result *result);
int efa_com_dealloc_uar(struct efa_com_dev *edev,
			struct efa_com_dealloc_uar_params *params);
int efa_com_get_stats(struct efa_com_dev *edev,
		      struct efa_com_get_stats_params *params,
		      union efa_com_get_stats_result *result);

#endif /* _EFA_COM_CMD_H_ */