xref: /freebsd/sys/dev/mlx5/mlx5_core/transobj.h (revision b633e08c)
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  * $FreeBSD$
26dc7e38acSHans Petter Selasky  */
27dc7e38acSHans Petter Selasky 
28dc7e38acSHans Petter Selasky #ifndef __TRANSOBJ_H__
29dc7e38acSHans Petter Selasky #define __TRANSOBJ_H__
30dc7e38acSHans Petter Selasky 
31b633e08cSHans Petter Selasky int mlx5_alloc_transport_domain(struct mlx5_core_dev *dev, u32 *tdn, u32 uid);
32b633e08cSHans Petter Selasky void mlx5_dealloc_transport_domain(struct mlx5_core_dev *dev, u32 tdn, u32 uid);
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);
37cb4e4a6eSHans Petter Selasky int mlx5_core_query_rq(struct mlx5_core_dev *dev, u32 rqn, u32 *out);
38dc7e38acSHans Petter Selasky int mlx5_core_create_sq(struct mlx5_core_dev *dev, u32 *in, int inlen,
39dc7e38acSHans Petter Selasky 			u32 *sqn);
40dc7e38acSHans Petter Selasky int mlx5_core_modify_sq(struct mlx5_core_dev *dev, u32 *in, int inlen);
41dc7e38acSHans Petter Selasky void mlx5_core_destroy_sq(struct mlx5_core_dev *dev, u32 sqn);
42cb4e4a6eSHans Petter Selasky int mlx5_core_query_sq(struct mlx5_core_dev *dev, u32 sqn, u32 *out);
43dc7e38acSHans Petter Selasky int mlx5_core_create_tir(struct mlx5_core_dev *dev, u32 *in, int inlen,
44dc7e38acSHans Petter Selasky 			 u32 *tirn);
45b633e08cSHans Petter Selasky void mlx5_core_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u32 uid);
46dc7e38acSHans Petter Selasky int mlx5_core_create_tis(struct mlx5_core_dev *dev, u32 *in, int inlen,
47dc7e38acSHans Petter Selasky 			 u32 *tisn);
480b3ebe41SHans Petter Selasky int mlx5_core_modify_tis(struct mlx5_core_dev *dev, u32 tisn, u32 *in,
490b3ebe41SHans Petter Selasky 			 int inlen);
50b633e08cSHans Petter Selasky void mlx5_core_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u32 uid);
51dc7e38acSHans Petter Selasky int mlx5_core_create_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rmpn);
52dc7e38acSHans Petter Selasky int mlx5_core_modify_rmp(struct mlx5_core_dev *dev, u32 *in, int inlen);
53dc7e38acSHans Petter Selasky int mlx5_core_destroy_rmp(struct mlx5_core_dev *dev, u32 rmpn);
54dc7e38acSHans Petter Selasky int mlx5_core_query_rmp(struct mlx5_core_dev *dev, u32 rmpn, u32 *out);
55dc7e38acSHans Petter Selasky int mlx5_core_arm_rmp(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm);
56dc7e38acSHans Petter Selasky int mlx5_core_create_xsrq(struct mlx5_core_dev *dev, u32 *in, int inlen, u32 *rmpn);
57dc7e38acSHans Petter Selasky int mlx5_core_destroy_xsrq(struct mlx5_core_dev *dev, u32 rmpn);
58dc7e38acSHans Petter Selasky int mlx5_core_query_xsrq(struct mlx5_core_dev *dev, u32 rmpn, u32 *out);
59dc7e38acSHans Petter Selasky int mlx5_core_arm_xsrq(struct mlx5_core_dev *dev, u32 rmpn, u16 lwm);
60dc7e38acSHans Petter Selasky 
61dc7e38acSHans Petter Selasky int mlx5_core_create_rqt(struct mlx5_core_dev *dev, u32 *in, int inlen,
62dc7e38acSHans Petter Selasky 			 u32 *rqtn);
63dc7e38acSHans Petter Selasky int mlx5_core_modify_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 *in,
64dc7e38acSHans Petter Selasky 			 int inlen);
65b633e08cSHans Petter Selasky void mlx5_core_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u32 uid);
66dc7e38acSHans Petter Selasky 
67dc7e38acSHans Petter Selasky #endif /* __TRANSOBJ_H__ */
68