1
2
3
4#ifndef __MLX5_EN_RSS_H__
5#define __MLX5_EN_RSS_H__
6
7#include "rqt.h"
8#include "tir.h"
9#include "fs.h"
10
11struct mlx5e_rss_params_traffic_type
12mlx5e_rss_get_default_tt_config(enum mlx5_traffic_types tt);
13
14struct mlx5e_rss;
15
16struct mlx5e_rss *mlx5e_rss_alloc(void);
17void mlx5e_rss_free(struct mlx5e_rss *rss);
18int mlx5e_rss_init(struct mlx5e_rss *rss, struct mlx5_core_dev *mdev,
19 bool inner_ft_support, u32 drop_rqn,
20 const struct mlx5e_lro_param *init_lro_param);
21int mlx5e_rss_init_no_tirs(struct mlx5e_rss *rss, struct mlx5_core_dev *mdev,
22 bool inner_ft_support, u32 drop_rqn);
23int mlx5e_rss_cleanup(struct mlx5e_rss *rss);
24
25void mlx5e_rss_refcnt_inc(struct mlx5e_rss *rss);
26void mlx5e_rss_refcnt_dec(struct mlx5e_rss *rss);
27unsigned int mlx5e_rss_refcnt_read(struct mlx5e_rss *rss);
28
29u32 mlx5e_rss_get_tirn(struct mlx5e_rss *rss, enum mlx5_traffic_types tt,
30 bool inner);
31int mlx5e_rss_obtain_tirn(struct mlx5e_rss *rss,
32 enum mlx5_traffic_types tt,
33 const struct mlx5e_lro_param *init_lro_param,
34 bool inner, u32 *tirn);
35
36void mlx5e_rss_enable(struct mlx5e_rss *rss, u32 *rqns, unsigned int num_rqns);
37void mlx5e_rss_disable(struct mlx5e_rss *rss);
38
39int mlx5e_rss_lro_set_param(struct mlx5e_rss *rss, struct mlx5e_lro_param *lro_param);
40int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc);
41int mlx5e_rss_set_rxfh(struct mlx5e_rss *rss, const u32 *indir,
42 const u8 *key, const u8 *hfunc,
43 u32 *rqns, unsigned int num_rqns);
44struct mlx5e_rss_params_hash mlx5e_rss_get_hash(struct mlx5e_rss *rss);
45u8 mlx5e_rss_get_hash_fields(struct mlx5e_rss *rss, enum mlx5_traffic_types tt);
46int mlx5e_rss_set_hash_fields(struct mlx5e_rss *rss, enum mlx5_traffic_types tt,
47 u8 rx_hash_fields);
48void mlx5e_rss_set_indir_uniform(struct mlx5e_rss *rss, unsigned int nch);
49#endif
50