1dc7e38acSHans Petter Selasky /*- 2dc7e38acSHans Petter Selasky * Copyright (c) 2013-2015, Mellanox Technologies, Ltd. All rights reserved. 3dc7e38acSHans Petter Selasky * 4dc7e38acSHans Petter Selasky * Redistribution and use in source and binary forms, with or without 5dc7e38acSHans Petter Selasky * modification, are permitted provided that the following conditions 6dc7e38acSHans Petter Selasky * are met: 7dc7e38acSHans Petter Selasky * 1. Redistributions of source code must retain the above copyright 8dc7e38acSHans Petter Selasky * notice, this list of conditions and the following disclaimer. 9dc7e38acSHans Petter Selasky * 2. Redistributions in binary form must reproduce the above copyright 10dc7e38acSHans Petter Selasky * notice, this list of conditions and the following disclaimer in the 11dc7e38acSHans Petter Selasky * documentation and/or other materials provided with the distribution. 12dc7e38acSHans Petter Selasky * 13dc7e38acSHans Petter Selasky * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND 14dc7e38acSHans Petter Selasky * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15dc7e38acSHans Petter Selasky * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16dc7e38acSHans Petter Selasky * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 17dc7e38acSHans Petter Selasky * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18dc7e38acSHans Petter Selasky * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19dc7e38acSHans Petter Selasky * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20dc7e38acSHans Petter Selasky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21dc7e38acSHans Petter Selasky * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22dc7e38acSHans Petter Selasky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23dc7e38acSHans Petter Selasky * SUCH DAMAGE. 24dc7e38acSHans Petter Selasky * 25dc7e38acSHans Petter Selasky * $FreeBSD$ 26dc7e38acSHans Petter Selasky */ 27dc7e38acSHans Petter Selasky 28dc7e38acSHans Petter Selasky #ifndef __TRANSOBJ_H__ 29dc7e38acSHans Petter Selasky #define __TRANSOBJ_H__ 30dc7e38acSHans Petter Selasky 31dc7e38acSHans Petter Selasky int mlx5_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn); 32dc7e38acSHans Petter Selasky void mlx5_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn); 33dc7e38acSHans Petter Selasky int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen, 34dc7e38acSHans Petter Selasky u32 *rqn); 35dc7e38acSHans Petter Selasky int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 *in, int inlen); 36dc7e38acSHans Petter Selasky void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn); 37dc7e38acSHans Petter Selasky int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen, 38dc7e38acSHans Petter Selasky u32 *sqn); 39dc7e38acSHans Petter Selasky int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 *in, int inlen); 40dc7e38acSHans Petter Selasky void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn); 41dc7e38acSHans Petter Selasky int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen, 42dc7e38acSHans Petter Selasky u32 *tirn); 43dc7e38acSHans Petter Selasky void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn); 44dc7e38acSHans Petter Selasky int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen, 45dc7e38acSHans Petter Selasky u32 *tisn); 46dc7e38acSHans Petter Selasky void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn); 47dc7e38acSHans Petter Selasky int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rmpn); 48dc7e38acSHans Petter Selasky int mlx5_core_modify_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen); 49dc7e38acSHans Petter Selasky int mlx5_core_destroy_rmp(struct mlx5_core_dev *dev, u32 rmpn); 50dc7e38acSHans Petter Selasky int mlx5_core_query_rmp(struct mlx5_core_dev *dev, u32 rmpn, u32 *out); 51dc7e38acSHans Petter Selasky int mlx5_core_arm_rmp(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm); 52dc7e38acSHans Petter Selasky int mlx5_core_create_xsrq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rmpn); 53dc7e38acSHans Petter Selasky int mlx5_core_destroy_xsrq(struct mlx5_core_dev *dev, u32 rmpn); 54dc7e38acSHans Petter Selasky int mlx5_core_query_xsrq(struct mlx5_core_dev *dev, u32 rmpn, u32 *out); 55dc7e38acSHans Petter Selasky int mlx5_core_arm_xsrq(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm); 56dc7e38acSHans Petter Selasky 57dc7e38acSHans Petter Selasky int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen, 58dc7e38acSHans Petter Selasky u32 *rqtn); 59dc7e38acSHans Petter Selasky int mlx5_core_modify_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 *in, 60dc7e38acSHans Petter Selasky int inlen); 61dc7e38acSHans Petter Selasky void mlx5_core_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn); 62dc7e38acSHans Petter Selasky 63dc7e38acSHans Petter Selasky #endif /* __TRANSOBJ_H__ */ 64