Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
0002 /*
0003  * Copyright (c) 2013-2020, Mellanox Technologies inc. All rights reserved.
0004  */
0005 
0006 #ifndef _MLX5_IB_QP_H
0007 #define _MLX5_IB_QP_H
0008 
0009 #include "mlx5_ib.h"
0010 
0011 int mlx5_init_qp_table(struct mlx5_ib_dev *dev);
0012 void mlx5_cleanup_qp_table(struct mlx5_ib_dev *dev);
0013 
0014 int mlx5_core_create_dct(struct mlx5_ib_dev *dev, struct mlx5_core_dct *qp,
0015              u32 *in, int inlen, u32 *out, int outlen);
0016 int mlx5_qpc_create_qp(struct mlx5_ib_dev *dev, struct mlx5_core_qp *qp,
0017                u32 *in, int inlen, u32 *out);
0018 int mlx5_core_qp_modify(struct mlx5_ib_dev *dev, u16 opcode, u32 opt_param_mask,
0019             void *qpc, struct mlx5_core_qp *qp, u32 *ece);
0020 int mlx5_core_destroy_qp(struct mlx5_ib_dev *dev, struct mlx5_core_qp *qp);
0021 int mlx5_core_destroy_dct(struct mlx5_ib_dev *dev, struct mlx5_core_dct *dct);
0022 int mlx5_core_qp_query(struct mlx5_ib_dev *dev, struct mlx5_core_qp *qp,
0023                u32 *out, int outlen);
0024 int mlx5_core_dct_query(struct mlx5_ib_dev *dev, struct mlx5_core_dct *dct,
0025             u32 *out, int outlen);
0026 
0027 int mlx5_core_set_delay_drop(struct mlx5_ib_dev *dev, u32 timeout_usec);
0028 
0029 int mlx5_core_destroy_rq_tracked(struct mlx5_ib_dev *dev,
0030                  struct mlx5_core_qp *rq);
0031 int mlx5_core_create_sq_tracked(struct mlx5_ib_dev *dev, u32 *in, int inlen,
0032                 struct mlx5_core_qp *sq);
0033 void mlx5_core_destroy_sq_tracked(struct mlx5_ib_dev *dev,
0034                   struct mlx5_core_qp *sq);
0035 
0036 int mlx5_core_create_rq_tracked(struct mlx5_ib_dev *dev, u32 *in, int inlen,
0037                 struct mlx5_core_qp *rq);
0038 
0039 struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_ib_dev *dev,
0040                         int res_num,
0041                         enum mlx5_res_type res_type);
0042 void mlx5_core_res_put(struct mlx5_core_rsc_common *res);
0043 
0044 int mlx5_core_xrcd_alloc(struct mlx5_ib_dev *dev, u32 *xrcdn);
0045 int mlx5_core_xrcd_dealloc(struct mlx5_ib_dev *dev, u32 xrcdn);
0046 int mlx5_ib_qp_set_counter(struct ib_qp *qp, struct rdma_counter *counter);
0047 #endif /* _MLX5_IB_QP_H */