linux/drivers/infiniband/hw/mlx5/qpc.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
 * Copyright (c) 2013-2020, Mellanox Technologies inc. All rights reserved.
 */

#include <linux/gfp.h>
#include <linux/mlx5/qp.h>
#include <linux/mlx5/driver.h>
#include "mlx5_ib.h"
#include "qp.h"

static int mlx5_core_drain_dct(struct mlx5_ib_dev *dev,
			       struct mlx5_core_dct *dct);

static struct mlx5_core_rsc_common *
mlx5_get_rsc(struct mlx5_qp_table *table, u32 rsn)
{}

void mlx5_core_put_rsc(struct mlx5_core_rsc_common *common)
{}

static u64 qp_allowed_event_types(void)
{}

static u64 rq_allowed_event_types(void)
{}

static u64 sq_allowed_event_types(void)
{}

static u64 dct_allowed_event_types(void)
{}

static bool is_event_type_allowed(int rsc_type, int event_type)
{}

static int dct_event_notifier(struct mlx5_ib_dev *dev, struct mlx5_eqe *eqe)
{}

static int rsc_event_notifier(struct notifier_block *nb,
			      unsigned long type, void *data)
{}

static int create_resource_common(struct mlx5_ib_dev *dev,
				  struct mlx5_core_qp *qp, int rsc_type)
{}

static void destroy_resource_common(struct mlx5_ib_dev *dev,
				    struct mlx5_core_qp *qp)
{}

static int _mlx5_core_destroy_dct(struct mlx5_ib_dev *dev,
				  struct mlx5_core_dct *dct)
{}

int mlx5_core_create_dct(struct mlx5_ib_dev *dev, struct mlx5_core_dct *dct,
			 u32 *in, int inlen, u32 *out, int outlen)
{}

int mlx5_qpc_create_qp(struct mlx5_ib_dev *dev, struct mlx5_core_qp *qp,
		       u32 *in, int inlen, u32 *out)
{}

static int mlx5_core_drain_dct(struct mlx5_ib_dev *dev,
			       struct mlx5_core_dct *dct)
{}

int mlx5_core_destroy_dct(struct mlx5_ib_dev *dev,
			  struct mlx5_core_dct *dct)
{}

int mlx5_core_destroy_qp(struct mlx5_ib_dev *dev, struct mlx5_core_qp *qp)
{}

int mlx5_core_set_delay_drop(struct mlx5_ib_dev *dev,
			     u32 timeout_usec)
{}

struct mbox_info {};

static int mbox_alloc(struct mbox_info *mbox, int inlen, int outlen)
{}

static void mbox_free(struct mbox_info *mbox)
{}

static int get_ece_from_mbox(void *out, u16 opcode)
{}

static int modify_qp_mbox_alloc(struct mlx5_core_dev *dev, u16 opcode, int qpn,
				u32 opt_param_mask, void *qpc,
				struct mbox_info *mbox, u16 uid, u32 ece)
{}

int mlx5_core_qp_modify(struct mlx5_ib_dev *dev, u16 opcode, u32 opt_param_mask,
			void *qpc, struct mlx5_core_qp *qp, u32 *ece)
{}

int mlx5_init_qp_table(struct mlx5_ib_dev *dev)
{}

void mlx5_cleanup_qp_table(struct mlx5_ib_dev *dev)
{}

int mlx5_core_qp_query(struct mlx5_ib_dev *dev, struct mlx5_core_qp *qp,
		       u32 *out, int outlen, bool qpc_ext)
{}

int mlx5_core_dct_query(struct mlx5_ib_dev *dev, struct mlx5_core_dct *dct,
			u32 *out, int outlen)
{}

int mlx5_core_xrcd_alloc(struct mlx5_ib_dev *dev, u32 *xrcdn)
{}

int mlx5_core_xrcd_dealloc(struct mlx5_ib_dev *dev, u32 xrcdn)
{}

static int destroy_rq_tracked(struct mlx5_ib_dev *dev, u32 rqn, u16 uid)
{}

int mlx5_core_create_rq_tracked(struct mlx5_ib_dev *dev, u32 *in, int inlen,
				struct mlx5_core_qp *rq)
{}

int mlx5_core_destroy_rq_tracked(struct mlx5_ib_dev *dev,
				 struct mlx5_core_qp *rq)
{}

static void destroy_sq_tracked(struct mlx5_ib_dev *dev, u32 sqn, u16 uid)
{}

int mlx5_core_create_sq_tracked(struct mlx5_ib_dev *dev, u32 *in, int inlen,
				struct mlx5_core_qp *sq)
{}

void mlx5_core_destroy_sq_tracked(struct mlx5_ib_dev *dev,
				  struct mlx5_core_qp *sq)
{}

struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_ib_dev *dev,
						int res_num,
						enum mlx5_res_type res_type)
{}

void mlx5_core_res_put(struct mlx5_core_rsc_common *res)
{}