1dc7e38acSHans Petter Selasky /*- 20b3ebe41SHans Petter Selasky * Copyright (c) 2013-2017, 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 26dc7e38acSHans Petter Selasky #ifndef __TRANSOBJ_H__ 27dc7e38acSHans Petter Selasky #define __TRANSOBJ_H__ 28dc7e38acSHans Petter Selasky 29b633e08cSHans Petter Selasky int mlx5_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn, u32 uid); 30b633e08cSHans Petter Selasky void mlx5_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn, u32 uid); 31dc7e38acSHans Petter Selasky int mlx5_core_create_rq(struct mlx5_core_dev *dev, u32 *in, int inlen, 32dc7e38acSHans Petter Selasky u32 *rqn); 33dc7e38acSHans Petter Selasky int mlx5_core_modify_rq(struct mlx5_core_dev *dev, u32 *in, int inlen); 34dc7e38acSHans Petter Selasky void mlx5_core_destroy_rq(struct mlx5_core_dev *dev, u32 rqn); 35cb4e4a6eSHans Petter Selasky int mlx5_core_query_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *out); 36dc7e38acSHans Petter Selasky int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen, 37dc7e38acSHans Petter Selasky u32 *sqn); 38dc7e38acSHans Petter Selasky int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 *in, int inlen); 39dc7e38acSHans Petter Selasky void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn); 40cb4e4a6eSHans Petter Selasky int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out); 41dc7e38acSHans Petter Selasky int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen, 42dc7e38acSHans Petter Selasky u32 *tirn); 43b633e08cSHans Petter Selasky void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u32 uid); 44dc7e38acSHans Petter Selasky int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen, 45dc7e38acSHans Petter Selasky u32 *tisn); 460b3ebe41SHans Petter Selasky int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in, 470b3ebe41SHans Petter Selasky int inlen); 48b633e08cSHans Petter Selasky void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u32 uid); 49dc7e38acSHans Petter Selasky int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rmpn); 50dc7e38acSHans Petter Selasky int mlx5_core_modify_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen); 51dc7e38acSHans Petter Selasky int mlx5_core_destroy_rmp(struct mlx5_core_dev *dev, u32 rmpn); 52dc7e38acSHans Petter Selasky int mlx5_core_query_rmp(struct mlx5_core_dev *dev, u32 rmpn, u32 *out); 53dc7e38acSHans Petter Selasky int mlx5_core_arm_rmp(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm); 54dc7e38acSHans Petter Selasky int mlx5_core_create_xsrq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rmpn); 55dc7e38acSHans Petter Selasky int mlx5_core_destroy_xsrq(struct mlx5_core_dev *dev, u32 rmpn); 56dc7e38acSHans Petter Selasky int mlx5_core_query_xsrq(struct mlx5_core_dev *dev, u32 rmpn, u32 *out); 57dc7e38acSHans Petter Selasky int mlx5_core_arm_xsrq(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm); 58dc7e38acSHans Petter Selasky 59dc7e38acSHans Petter Selasky int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen, 60dc7e38acSHans Petter Selasky u32 *rqtn); 61dc7e38acSHans Petter Selasky int mlx5_core_modify_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 *in, 62dc7e38acSHans Petter Selasky int inlen); 63b633e08cSHans Petter Selasky void mlx5_core_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 uid); 64dc7e38acSHans Petter Selasky 65dc7e38acSHans Petter Selasky #endif /* __TRANSOBJ_H__ */ 66