1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2019 Mellanox Technologies. */
4 #ifndef __MLX5_PORT_TUN_H__
5 #define __MLX5_PORT_TUN_H__
7 #include <linux/mlx5/driver.h>
9 struct mlx5_tun_entropy {
10 struct mlx5_core_dev *mdev;
11 u32 num_enabling_entries;
12 u32 num_disabling_entries;
14 struct mutex lock; /* lock the entropy fields */
17 void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
18 struct mlx5_core_dev *mdev);
19 int mlx5_tun_entropy_refcount_inc(struct mlx5_tun_entropy *tun_entropy,
21 void mlx5_tun_entropy_refcount_dec(struct mlx5_tun_entropy *tun_entropy,
24 #endif /* __MLX5_PORT_TUN_H__ */