xref: /linux/drivers/net/ethernet/qlogic/qed/qed_roce.h (revision 1f4d4ed6acc5b74974fa038e5e9d2e19f3b532f3)
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2 /* QLogic qed NIC Driver
3  * Copyright (c) 2015-2017  QLogic Corporation
4  */
5 
6 #ifndef _QED_ROCE_H
7 #define _QED_ROCE_H
8 #include <linux/types.h>
9 #include <linux/slab.h>
10 
11 #if IS_ENABLED(CONFIG_QED_RDMA)
12 void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
13 #else
14 static inline void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn,
15 				     struct qed_ptt *p_ptt) {}
16 #endif
17 
18 int qed_roce_setup(struct qed_hwfn *p_hwfn);
19 void qed_roce_stop(struct qed_hwfn *p_hwfn);
20 int qed_roce_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
21 int qed_roce_alloc_cid(struct qed_hwfn *p_hwfn, u16 *cid);
22 int qed_roce_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);
23 
24 int qed_roce_query_qp(struct qed_hwfn *p_hwfn,
25 		      struct qed_rdma_qp *qp,
26 		      struct qed_rdma_query_qp_out_params *out_params);
27 
28 int qed_roce_modify_qp(struct qed_hwfn *p_hwfn,
29 		       struct qed_rdma_qp *qp,
30 		       enum qed_roce_qp_state prev_state,
31 		       struct qed_rdma_modify_qp_in_params *params);
32 
33 #endif
34