linux/drivers/infiniband/hw/irdma/type.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/* Copyright (c) 2015 - 2021 Intel Corporation */
#ifndef IRDMA_TYPE_H
#define IRDMA_TYPE_H
#include "osdep.h"
#include "irdma.h"
#include "user.h"
#include "hmc.h"
#include "uda.h"
#include "ws.h"
#define IRDMA_DEBUG_ERR
#define IRDMA_DEBUG_INIT
#define IRDMA_DEBUG_DEV
#define IRDMA_DEBUG_CM
#define IRDMA_DEBUG_VERBS
#define IRDMA_DEBUG_PUDA
#define IRDMA_DEBUG_ILQ
#define IRDMA_DEBUG_IEQ
#define IRDMA_DEBUG_QP
#define IRDMA_DEBUG_CQ
#define IRDMA_DEBUG_MR
#define IRDMA_DEBUG_PBLE
#define IRDMA_DEBUG_WQE
#define IRDMA_DEBUG_AEQ
#define IRDMA_DEBUG_CQP
#define IRDMA_DEBUG_HMC
#define IRDMA_DEBUG_USER
#define IRDMA_DEBUG_VIRT
#define IRDMA_DEBUG_DCB
#define IRDMA_DEBUG_CQE
#define IRDMA_DEBUG_CLNT
#define IRDMA_DEBUG_WS
#define IRDMA_DEBUG_STATS

enum irdma_page_size {};

enum irdma_hdrct_flags {};

enum irdma_term_layers {};

enum irdma_term_error_types {};

enum irdma_term_rdma_errors {};

enum irdma_term_ddp_errors {};

enum irdma_term_mpa_errors {};

enum irdma_qp_event_type {};

enum irdma_hw_stats_index {};

enum irdma_feature_type {};

enum irdma_sched_prio_type {};

enum irdma_vm_vf_type {};

enum irdma_cqp_hmc_profile {};

enum irdma_quad_entry_type {};

enum irdma_quad_hash_manage_type {};

enum irdma_syn_rst_handling {};

enum irdma_queue_type {};

struct irdma_sc_dev;
struct irdma_vsi_pestat;

struct irdma_dcqcn_cc_params {};

struct irdma_cqp_init_info {};

struct irdma_terminate_hdr {};

struct irdma_cqp_sq_wqe {};

struct irdma_sc_aeqe {};

struct irdma_ceqe {};

struct irdma_cqp_ctx {};

struct irdma_cq_shadow_area {};

struct irdma_dev_hw_stats_offsets {};

struct irdma_dev_hw_stats {};

struct irdma_gather_stats {};

struct irdma_hw_stat_map {};

struct irdma_stats_gather_info {};

struct irdma_vsi_pestat {};

struct irdma_hw {};

struct irdma_pfpdu {};

struct irdma_sc_pd {};

struct irdma_cqp_quanta {};

struct irdma_sc_cqp {};

struct irdma_sc_aeq {};

struct irdma_sc_ceq {};

struct irdma_sc_cq {};

struct irdma_sc_qp {};

struct irdma_stats_inst_info {};

struct irdma_up_info {};

#define IRDMA_MAX_WS_NODES
#define IRDMA_WS_NODE_INVALID

struct irdma_ws_node_info {};

struct irdma_hmc_fpm_misc {};

#define IRDMA_LEAF_DEFAULT_REL_BW
#define IRDMA_PARENT_DEFAULT_REL_BW

struct irdma_qos {};

#define IRDMA_INVALID_STATS_IDX
struct irdma_sc_vsi {};

struct irdma_sc_dev {};

struct irdma_modify_cq_info {};

struct irdma_create_qp_info {};

struct irdma_modify_qp_info {};

struct irdma_ccq_cqe_info {};

struct irdma_dcb_app_info {};

struct irdma_qos_tc_info {};

struct irdma_l2params {};

struct irdma_vsi_init_info {};

struct irdma_vsi_stats_info {};

struct irdma_device_init_info {};

struct irdma_ceq_init_info {};

struct irdma_aeq_init_info {};

struct irdma_ccq_init_info {};

struct irdma_udp_offload_info {};

struct irdma_roce_offload_info {};

struct irdma_iwarp_offload_info {};

struct irdma_tcp_offload_info {};

struct irdma_qp_host_ctx_info {};

struct irdma_aeqe_info {};

struct irdma_allocate_stag_info {};

struct irdma_mw_alloc_info {};

struct irdma_reg_ns_stag_info {};

struct irdma_fast_reg_stag_info {};

struct irdma_dealloc_stag_info {};

struct irdma_register_shared_stag {};

struct irdma_qp_init_info {};

struct irdma_cq_init_info {};

struct irdma_upload_context_info {};

struct irdma_local_mac_entry_info {};

struct irdma_add_arp_cache_entry_info {};

struct irdma_apbvt_info {};

struct irdma_qhash_table_info {};

struct irdma_cqp_manage_push_page_info {};

struct irdma_qp_flush_info {};

struct irdma_gen_ae_info {};

struct irdma_cqp_timeout {};

struct irdma_irq_ops {};

void irdma_sc_ccq_arm(struct irdma_sc_cq *ccq);
int irdma_sc_ccq_create(struct irdma_sc_cq *ccq, u64 scratch,
			bool check_overflow, bool post_sq);
int irdma_sc_ccq_destroy(struct irdma_sc_cq *ccq, u64 scratch, bool post_sq);
int irdma_sc_ccq_get_cqe_info(struct irdma_sc_cq *ccq,
			      struct irdma_ccq_cqe_info *info);
int irdma_sc_ccq_init(struct irdma_sc_cq *ccq,
		      struct irdma_ccq_init_info *info);

int irdma_sc_cceq_create(struct irdma_sc_ceq *ceq, u64 scratch);
int irdma_sc_cceq_destroy_done(struct irdma_sc_ceq *ceq);

int irdma_sc_ceq_destroy(struct irdma_sc_ceq *ceq, u64 scratch, bool post_sq);
int irdma_sc_ceq_init(struct irdma_sc_ceq *ceq,
		      struct irdma_ceq_init_info *info);
void irdma_sc_cleanup_ceqes(struct irdma_sc_cq *cq, struct irdma_sc_ceq *ceq);
void *irdma_sc_process_ceq(struct irdma_sc_dev *dev, struct irdma_sc_ceq *ceq);

int irdma_sc_aeq_init(struct irdma_sc_aeq *aeq,
		      struct irdma_aeq_init_info *info);
int irdma_sc_get_next_aeqe(struct irdma_sc_aeq *aeq,
			   struct irdma_aeqe_info *info);
void irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, u32 count);

void irdma_sc_pd_init(struct irdma_sc_dev *dev, struct irdma_sc_pd *pd, u32 pd_id,
		      int abi_ver);
void irdma_cfg_aeq(struct irdma_sc_dev *dev, u32 idx, bool enable);
void irdma_check_cqp_progress(struct irdma_cqp_timeout *cqp_timeout,
			      struct irdma_sc_dev *dev);
int irdma_sc_cqp_create(struct irdma_sc_cqp *cqp, u16 *maj_err, u16 *min_err);
int irdma_sc_cqp_destroy(struct irdma_sc_cqp *cqp);
int irdma_sc_cqp_init(struct irdma_sc_cqp *cqp,
		      struct irdma_cqp_init_info *info);
void irdma_sc_cqp_post_sq(struct irdma_sc_cqp *cqp);
int irdma_sc_poll_for_cqp_op_done(struct irdma_sc_cqp *cqp, u8 opcode,
				  struct irdma_ccq_cqe_info *cmpl_info);
int irdma_sc_fast_register(struct irdma_sc_qp *qp,
			   struct irdma_fast_reg_stag_info *info, bool post_sq);
int irdma_sc_qp_create(struct irdma_sc_qp *qp,
		       struct irdma_create_qp_info *info, u64 scratch,
		       bool post_sq);
int irdma_sc_qp_destroy(struct irdma_sc_qp *qp, u64 scratch,
			bool remove_hash_idx, bool ignore_mw_bnd, bool post_sq);
int irdma_sc_qp_flush_wqes(struct irdma_sc_qp *qp,
			   struct irdma_qp_flush_info *info, u64 scratch,
			   bool post_sq);
int irdma_sc_qp_init(struct irdma_sc_qp *qp, struct irdma_qp_init_info *info);
int irdma_sc_qp_modify(struct irdma_sc_qp *qp,
		       struct irdma_modify_qp_info *info, u64 scratch,
		       bool post_sq);
void irdma_sc_send_lsmm(struct irdma_sc_qp *qp, void *lsmm_buf, u32 size,
			irdma_stag stag);

void irdma_sc_send_rtt(struct irdma_sc_qp *qp, bool read);
void irdma_sc_qp_setctx(struct irdma_sc_qp *qp, __le64 *qp_ctx,
			struct irdma_qp_host_ctx_info *info);
void irdma_sc_qp_setctx_roce(struct irdma_sc_qp *qp, __le64 *qp_ctx,
			     struct irdma_qp_host_ctx_info *info);
int irdma_sc_cq_destroy(struct irdma_sc_cq *cq, u64 scratch, bool post_sq);
int irdma_sc_cq_init(struct irdma_sc_cq *cq, struct irdma_cq_init_info *info);
void irdma_sc_cq_resize(struct irdma_sc_cq *cq, struct irdma_modify_cq_info *info);
int irdma_sc_static_hmc_pages_allocated(struct irdma_sc_cqp *cqp, u64 scratch,
					u8 hmc_fn_id, bool post_sq,
					bool poll_registers);

void sc_vsi_update_stats(struct irdma_sc_vsi *vsi);
struct cqp_info {};

struct cqp_cmds_info {};

__le64 *irdma_sc_cqp_get_next_send_wqe_idx(struct irdma_sc_cqp *cqp, u64 scratch,
					   u32 *wqe_idx);

/**
 * irdma_sc_cqp_get_next_send_wqe - get next wqe on cqp sq
 * @cqp: struct for cqp hw
 * @scratch: private data for CQP WQE
 */
static inline __le64 *irdma_sc_cqp_get_next_send_wqe(struct irdma_sc_cqp *cqp, u64 scratch)
{}
#endif /* IRDMA_TYPE_H */