cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

rqt.h (1184B)


      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_RQT_H__
      5#define __MLX5_EN_RQT_H__
      6
      7#include <linux/kernel.h>
      8
      9#define MLX5E_INDIR_RQT_SIZE (1 << 8)
     10
     11struct mlx5_core_dev;
     12
     13struct mlx5e_rss_params_indir {
     14	u32 table[MLX5E_INDIR_RQT_SIZE];
     15};
     16
     17void mlx5e_rss_params_indir_init_uniform(struct mlx5e_rss_params_indir *indir,
     18					 unsigned int num_channels);
     19
     20struct mlx5e_rqt {
     21	struct mlx5_core_dev *mdev;
     22	u32 rqtn;
     23	u16 size;
     24};
     25
     26int mlx5e_rqt_init_direct(struct mlx5e_rqt *rqt, struct mlx5_core_dev *mdev,
     27			  bool indir_enabled, u32 init_rqn);
     28int mlx5e_rqt_init_indir(struct mlx5e_rqt *rqt, struct mlx5_core_dev *mdev,
     29			 u32 *rqns, unsigned int num_rqns,
     30			 u8 hfunc, struct mlx5e_rss_params_indir *indir);
     31void mlx5e_rqt_destroy(struct mlx5e_rqt *rqt);
     32
     33static inline u32 mlx5e_rqt_get_rqtn(struct mlx5e_rqt *rqt)
     34{
     35	return rqt->rqtn;
     36}
     37
     38int mlx5e_rqt_redirect_direct(struct mlx5e_rqt *rqt, u32 rqn);
     39int mlx5e_rqt_redirect_indir(struct mlx5e_rqt *rqt, u32 *rqns, unsigned int num_rqns,
     40			     u8 hfunc, struct mlx5e_rss_params_indir *indir);
     41
     42#endif /* __MLX5_EN_RQT_H__ */