net/mlx5: Move QP logic to mlx5_ib
The mlx5_core doesn't need any functionality coded in qp.c, so move that file to drivers/infiniband/ be under mlx5_ib responsibility. Reviewed-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:
parent
42f9bbd112
commit
333fbaa025
16 changed files with 180 additions and 317 deletions
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2015, Mellanox Technologies. All rights reserved.
|
||||
*
|
||||
* This software is available to you under a choice of one of two
|
||||
* licenses. You may choose to be licensed under the terms of the GNU
|
||||
* General Public License (GPL) Version 2, available from the file
|
||||
* COPYING in the main directory of this source tree, or the
|
||||
* OpenIB.org BSD license below:
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* - Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef MLX5_CMD_H
|
||||
#define MLX5_CMD_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct manage_pages_layout {
|
||||
u64 ptr;
|
||||
u32 reserved;
|
||||
u16 num_entries;
|
||||
u16 func_id;
|
||||
};
|
||||
|
||||
|
||||
struct mlx5_cmd_alloc_uar_imm_out {
|
||||
u32 rsvd[3];
|
||||
u32 uarn;
|
||||
};
|
||||
|
||||
#endif /* MLX5_CMD_H */
|
||||
|
|
@ -541,7 +541,6 @@ struct mlx5_priv {
|
|||
struct mlx5_core_health health;
|
||||
|
||||
/* start: qp staff */
|
||||
struct mlx5_qp_table qp_table;
|
||||
struct dentry *qp_debugfs;
|
||||
struct dentry *eq_debugfs;
|
||||
struct dentry *cq_debugfs;
|
||||
|
|
@ -687,7 +686,6 @@ struct mlx5_core_dev {
|
|||
unsigned long intf_state;
|
||||
struct mlx5_priv priv;
|
||||
struct mlx5_profile *profile;
|
||||
atomic_t num_qps;
|
||||
u32 issi;
|
||||
struct mlx5e_resources mlx5e_res;
|
||||
struct mlx5_dm *dm;
|
||||
|
|
|
|||
|
|
@ -553,53 +553,8 @@ struct mlx5_qp_context {
|
|||
u8 rsvd1[24];
|
||||
};
|
||||
|
||||
static inline struct mlx5_core_qp *__mlx5_qp_lookup(struct mlx5_core_dev *dev, u32 qpn)
|
||||
{
|
||||
return radix_tree_lookup(&dev->priv.qp_table.tree, qpn);
|
||||
}
|
||||
|
||||
int mlx5_core_create_dct(struct mlx5_core_dev *dev,
|
||||
struct mlx5_core_dct *qp,
|
||||
u32 *in, int inlen,
|
||||
u32 *out, int outlen);
|
||||
int mlx5_core_create_qp(struct mlx5_core_dev *dev,
|
||||
struct mlx5_core_qp *qp,
|
||||
u32 *in,
|
||||
int inlen);
|
||||
int mlx5_core_qp_modify(struct mlx5_core_dev *dev, u16 opcode,
|
||||
u32 opt_param_mask, void *qpc,
|
||||
struct mlx5_core_qp *qp);
|
||||
int mlx5_core_destroy_qp(struct mlx5_core_dev *dev,
|
||||
struct mlx5_core_qp *qp);
|
||||
int mlx5_core_destroy_dct(struct mlx5_core_dev *dev,
|
||||
struct mlx5_core_dct *dct);
|
||||
int mlx5_core_qp_query(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp,
|
||||
u32 *out, int outlen);
|
||||
int mlx5_core_dct_query(struct mlx5_core_dev *dev, struct mlx5_core_dct *dct,
|
||||
u32 *out, int outlen);
|
||||
|
||||
int mlx5_core_set_delay_drop(struct mlx5_core_dev *dev,
|
||||
u32 timeout_usec);
|
||||
|
||||
int mlx5_core_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn);
|
||||
int mlx5_core_xrcd_dealloc(struct mlx5_core_dev *dev, u32 xrcdn);
|
||||
void mlx5_init_qp_table(struct mlx5_core_dev *dev);
|
||||
void mlx5_cleanup_qp_table(struct mlx5_core_dev *dev);
|
||||
int mlx5_debug_qp_add(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);
|
||||
void mlx5_debug_qp_remove(struct mlx5_core_dev *dev, struct mlx5_core_qp *qp);
|
||||
int mlx5_core_create_rq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
||||
struct mlx5_core_qp *rq);
|
||||
void mlx5_core_destroy_rq_tracked(struct mlx5_core_dev *dev,
|
||||
struct mlx5_core_qp *rq);
|
||||
int mlx5_core_create_sq_tracked(struct mlx5_core_dev *dev, u32 *in, int inlen,
|
||||
struct mlx5_core_qp *sq);
|
||||
void mlx5_core_destroy_sq_tracked(struct mlx5_core_dev *dev,
|
||||
struct mlx5_core_qp *sq);
|
||||
|
||||
struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_core_dev *dev,
|
||||
int res_num,
|
||||
enum mlx5_res_type res_type);
|
||||
void mlx5_core_res_put(struct mlx5_core_rsc_common *res);
|
||||
|
||||
static inline const char *mlx5_qp_type_str(int type)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue