xref: /linux/drivers/net/ethernet/qlogic/qed/qed_roce.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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  * Copyright (c) 2019-2020 Marvell International Ltd.
5  */
6 
7 #ifndef _QED_ROCE_H
8 #define _QED_ROCE_H
9 #include <linux/types.h>
10 #include <linux/slab.h>
11 
12 #if IS_ENABLED(CONFIG_QED_RDMA)
13 void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
14 #else
15 static inline void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn,
16 				     struct qed_ptt *p_ptt) {}
17 #endif
18 
19 int qed_roce_setup(struct qed_hwfn *p_hwfn);
20 void qed_roce_stop(struct qed_hwfn *p_hwfn);
21 int qed_roce_init_hw(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
22 int qed_roce_alloc_cid(struct qed_hwfn *p_hwfn, u16 *cid);
23 int qed_roce_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp);
24 
25 int qed_roce_query_qp(struct qed_hwfn *p_hwfn,
26 		      struct qed_rdma_qp *qp,
27 		      struct qed_rdma_query_qp_out_params *out_params);
28 
29 int qed_roce_modify_qp(struct qed_hwfn *p_hwfn,
30 		       struct qed_rdma_qp *qp,
31 		       enum qed_roce_qp_state prev_state,
32 		       struct qed_rdma_modify_qp_in_params *params);
33 
34 #endif
35