xref: /freebsd/sys/dev/mlx5/mpfs.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
166b38bfeSHans Petter Selasky /*-
266b38bfeSHans Petter Selasky  * Copyright (c) 2019, Mellanox Technologies, Ltd.  All rights reserved.
366b38bfeSHans Petter Selasky  *
466b38bfeSHans Petter Selasky  * Redistribution and use in source and binary forms, with or without
566b38bfeSHans Petter Selasky  * modification, are permitted provided that the following conditions
666b38bfeSHans Petter Selasky  * are met:
766b38bfeSHans Petter Selasky  * 1. Redistributions of source code must retain the above copyright
866b38bfeSHans Petter Selasky  *    notice, this list of conditions and the following disclaimer.
966b38bfeSHans Petter Selasky  * 2. Redistributions in binary form must reproduce the above copyright
1066b38bfeSHans Petter Selasky  *    notice, this list of conditions and the following disclaimer in the
1166b38bfeSHans Petter Selasky  *    documentation and/or other materials provided with the distribution.
1266b38bfeSHans Petter Selasky  *
1366b38bfeSHans Petter Selasky  * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND
1466b38bfeSHans Petter Selasky  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1566b38bfeSHans Petter Selasky  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1666b38bfeSHans Petter Selasky  * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
1766b38bfeSHans Petter Selasky  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1866b38bfeSHans Petter Selasky  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1966b38bfeSHans Petter Selasky  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2066b38bfeSHans Petter Selasky  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2166b38bfeSHans Petter Selasky  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2266b38bfeSHans Petter Selasky  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2366b38bfeSHans Petter Selasky  * SUCH DAMAGE.
2466b38bfeSHans Petter Selasky  */
2566b38bfeSHans Petter Selasky 
2666b38bfeSHans Petter Selasky #ifndef _MLX5_MPFS_H_
2766b38bfeSHans Petter Selasky #define _MLX5_MPFS_H_
2866b38bfeSHans Petter Selasky 
2966b38bfeSHans Petter Selasky struct mlx5_core_dev;
30*f6ca0b21SKonstantin Belousov int mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u32 *p_index, const u8 *mac,
31*f6ca0b21SKonstantin Belousov     u8 vlan_valid, u16 bbvlan);
3266b38bfeSHans Petter Selasky int mlx5_mpfs_del_mac(struct mlx5_core_dev *dev, u32 index);
3366b38bfeSHans Petter Selasky int mlx5_mpfs_init(struct mlx5_core_dev *dev);
3466b38bfeSHans Petter Selasky void mlx5_mpfs_destroy(struct mlx5_core_dev *dev);
3566b38bfeSHans Petter Selasky 
3666b38bfeSHans Petter Selasky #endif		/* _MLX5_MPFS_H_ */
37