xref: /linux/drivers/net/ethernet/mellanox/mlx5/core/en/channels.h (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2021, Mellanox Technologies inc. All rights reserved. */
3 
4 #ifndef __MLX5_EN_CHANNELS_H__
5 #define __MLX5_EN_CHANNELS_H__
6 
7 #include <linux/kernel.h>
8 
9 struct mlx5e_channels;
10 
11 unsigned int mlx5e_channels_get_num(struct mlx5e_channels *chs);
12 bool mlx5e_channels_is_xsk(struct mlx5e_channels *chs, unsigned int ix);
13 void mlx5e_channels_get_regular_rqn(struct mlx5e_channels *chs, unsigned int ix, u32 *rqn,
14 				    u32 *vhca_id);
15 void mlx5e_channels_get_xsk_rqn(struct mlx5e_channels *chs, unsigned int ix, u32 *rqn,
16 				u32 *vhca_id);
17 bool mlx5e_channels_get_ptp_rqn(struct mlx5e_channels *chs, u32 *rqn);
18 int mlx5e_channels_rx_change_dim(struct mlx5e_channels *chs, bool enabled);
19 int mlx5e_channels_tx_change_dim(struct mlx5e_channels *chs, bool enabled);
20 int mlx5e_channels_rx_toggle_dim(struct mlx5e_channels *chs);
21 int mlx5e_channels_tx_toggle_dim(struct mlx5e_channels *chs);
22 
23 #endif /* __MLX5_EN_CHANNELS_H__ */
24