1341572Sslavash/*-
2341572Sslavash * Copyright (c) 2017, Mellanox Technologies, Ltd.  All rights reserved.
3341572Sslavash *
4341572Sslavash * This software is available to you under a choice of one of two
5341572Sslavash * licenses.  You may choose to be licensed under the terms of the GNU
6341572Sslavash * General Public License (GPL) Version 2, available from the file
7341572Sslavash * COPYING in the main directory of this source tree, or the
8341572Sslavash * OpenIB.org BSD license below:
9341572Sslavash *
10341572Sslavash *     Redistribution and use in source and binary forms, with or
11341572Sslavash *     without modification, are permitted provided that the following
12341572Sslavash *     conditions are met:
13341572Sslavash *
14341572Sslavash *      - Redistributions of source code must retain the above
15341572Sslavash *        copyright notice, this list of conditions and the following
16341572Sslavash *        disclaimer.
17341572Sslavash *
18341572Sslavash *      - Redistributions in binary form must reproduce the above
19341572Sslavash *        copyright notice, this list of conditions and the following
20341572Sslavash *        disclaimer in the documentation and/or other materials
21341572Sslavash *        provided with the distribution.
22341572Sslavash *
23341572Sslavash * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24341572Sslavash * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25341572Sslavash * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26341572Sslavash * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27341572Sslavash * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28341572Sslavash * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29341572Sslavash * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30341572Sslavash * SOFTWARE.
31341572Sslavash *
32341572Sslavash * $FreeBSD: stable/11/sys/dev/mlx5/mlx5_lib/mlx5.h 341572 2018-12-05 14:11:20Z slavash $
33341572Sslavash */
34341572Sslavash
35341572Sslavash#ifndef __LIB_MLX5_H__
36341572Sslavash#define __LIB_MLX5_H__
37341572Sslavash
38341572Sslavashvoid mlx5_init_reserved_gids(struct mlx5_core_dev *dev);
39341572Sslavashvoid mlx5_cleanup_reserved_gids(struct mlx5_core_dev *dev);
40341572Sslavashint  mlx5_core_reserve_gids(struct mlx5_core_dev *dev, unsigned int count);
41341572Sslavashvoid mlx5_core_unreserve_gids(struct mlx5_core_dev *dev, unsigned int count);
42341572Sslavashint  mlx5_core_reserved_gid_alloc(struct mlx5_core_dev *dev, int *gid_index);
43341572Sslavashvoid mlx5_core_reserved_gid_free(struct mlx5_core_dev *dev, int gid_index);
44341572Sslavash
45341572Sslavash#endif
46