#ifndef __ECORE_ROCE_H__
#define __ECORE_ROCE_H__
#include "ecore_status.h"
#define ECORE_ROCE_QP_TO_ICID(qp_idx) ((qp_idx)*2)
#define ECORE_ROCE_ICID_TO_QP(icid) ((icid)/2)
void
ecore_roce_dpm_dcbx(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
void
ecore_rdma_dpm_bar(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
enum _ecore_status_t
ecore_roce_dcqcn_cfg(struct ecore_hwfn *p_hwfn,
struct ecore_roce_dcqcn_params *params,
struct roce_init_func_ramrod_data *p_ramrod,
struct ecore_ptt *p_ptt);
enum _ecore_status_t
ecore_roce_setup(struct ecore_hwfn *p_hwfn);
enum _ecore_status_t
ecore_roce_stop_rl(struct ecore_hwfn *p_hwfn);
enum _ecore_status_t
ecore_roce_stop(struct ecore_hwfn *p_hwfn);
enum _ecore_status_t
ecore_roce_query_qp(struct ecore_hwfn *p_hwfn,
struct ecore_rdma_qp *qp,
struct ecore_rdma_query_qp_out_params *out_params);
enum _ecore_status_t
ecore_roce_destroy_qp(struct ecore_hwfn *p_hwfn,
struct ecore_rdma_qp *qp,
struct ecore_rdma_destroy_qp_out_params *out_params);
enum _ecore_status_t
ecore_roce_alloc_qp_idx(struct ecore_hwfn *p_hwfn,
u16 *qp_idx16);
#define IS_ECORE_DCQCN(p_hwfn) \
(!!(p_hwfn->pf_params.rdma_pf_params.enable_dcqcn))
struct ecore_roce_info {
struct roce_events_stats event_stats;
struct roce_dcqcn_received_stats dcqcn_rx_stats;
struct roce_dcqcn_sent_stats dcqcn_tx_stats;
u8 dcqcn_enabled;
u8 dcqcn_reaction_point;
};
enum _ecore_status_t
ecore_roce_modify_qp(struct ecore_hwfn *p_hwfn,
struct ecore_rdma_qp *qp,
enum ecore_roce_qp_state prev_state,
struct ecore_rdma_modify_qp_in_params *params);
#endif