RDMA/mlx5: Separate restrack callbacks initialization from main.c
The restrack code has separate .c, so move callbacks initialization to that file to improve code locality. Link: https://lore.kernel.org/r/20200702081809.423482-3-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
ac47bf5ef1
commit
b572ebe667
@@ -1,33 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
|
||||
/*
|
||||
* 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.
|
||||
* Copyright (c) 2013-2020, Mellanox Technologies inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
@@ -62,6 +35,7 @@
|
||||
#include "srq.h"
|
||||
#include "qp.h"
|
||||
#include "wr.h"
|
||||
#include "restrack.h"
|
||||
#include <linux/mlx5/fs_helpers.h>
|
||||
#include <linux/mlx5/accel.h>
|
||||
#include <rdma/uverbs_std_types.h>
|
||||
@@ -6615,11 +6589,6 @@ static const struct ib_device_ops mlx5_ib_dev_ops = {
|
||||
.drain_rq = mlx5_ib_drain_rq,
|
||||
.drain_sq = mlx5_ib_drain_sq,
|
||||
.enable_driver = mlx5_ib_enable_driver,
|
||||
.fill_res_cq_entry_raw = mlx5_ib_fill_res_cq_entry_raw,
|
||||
.fill_res_mr_entry = mlx5_ib_fill_res_mr_entry,
|
||||
.fill_res_mr_entry_raw = mlx5_ib_fill_res_mr_entry_raw,
|
||||
.fill_res_qp_entry_raw = mlx5_ib_fill_res_qp_entry_raw,
|
||||
.fill_stat_mr_entry = mlx5_ib_fill_stat_mr_entry,
|
||||
.get_dev_fw_str = get_dev_fw_str,
|
||||
.get_dma_mr = mlx5_ib_get_dma_mr,
|
||||
.get_link_layer = mlx5_ib_port_link_layer,
|
||||
@@ -7205,6 +7174,9 @@ static const struct mlx5_ib_profile pf_profile = {
|
||||
STAGE_CREATE(MLX5_IB_STAGE_DELAY_DROP,
|
||||
mlx5_ib_stage_delay_drop_init,
|
||||
mlx5_ib_stage_delay_drop_cleanup),
|
||||
STAGE_CREATE(MLX5_IB_STAGE_RESTRACK,
|
||||
mlx5_ib_restrack_init,
|
||||
NULL),
|
||||
};
|
||||
|
||||
const struct mlx5_ib_profile raw_eth_profile = {
|
||||
@@ -7259,6 +7231,9 @@ const struct mlx5_ib_profile raw_eth_profile = {
|
||||
STAGE_CREATE(MLX5_IB_STAGE_POST_IB_REG_UMR,
|
||||
mlx5_ib_stage_post_ib_reg_umr_init,
|
||||
NULL),
|
||||
STAGE_CREATE(MLX5_IB_STAGE_RESTRACK,
|
||||
mlx5_ib_restrack_init,
|
||||
NULL),
|
||||
};
|
||||
|
||||
static void *mlx5_ib_add_slave_port(struct mlx5_core_dev *mdev)
|
||||
|
Reference in New Issue
Block a user