FILE
indir_table.h
File preview with syntax highlighting.
linux-6.19.14/drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h
1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2/* Copyright (c) 2021 Mellanox Technologies. */ 3 4#ifndef __MLX5_ESW_FT_H__ 5#define __MLX5_ESW_FT_H__ 6 7#ifdef CONFIG_MLX5_CLS_ACT 8 9struct mlx5_esw_indir_table * 10mlx5_esw_indir_table_init(void); 11void 12mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir); 13 14struct mlx5_flow_table *mlx5_esw_indir_table_get(struct mlx5_eswitch *esw, 15 struct mlx5_flow_attr *attr, 16 u16 vport, bool decap); 17void mlx5_esw_indir_table_put(struct mlx5_eswitch *esw, 18 u16 vport, bool decap); 19 20bool 21mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw, 22 struct mlx5_flow_attr *attr, 23 u16 vport_num, 24 struct mlx5_core_dev *dest_mdev); 25 26u16 27mlx5_esw_indir_table_decap_vport(struct mlx5_flow_attr *attr); 28 29#else 30/* indir API stubs */ 31static inline struct mlx5_esw_indir_table * 32mlx5_esw_indir_table_init(void) 33{ 34 return NULL; 35} 36 37static inline void 38mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir) 39{ 40} 41 42static inline struct mlx5_flow_table * 43mlx5_esw_indir_table_get(struct mlx5_eswitch *esw, 44 struct mlx5_flow_attr *attr, 45 u16 vport, bool decap) 46{ 47 return ERR_PTR(-EOPNOTSUPP); 48} 49 50static inline void 51mlx5_esw_indir_table_put(struct mlx5_eswitch *esw, 52 u16 vport, bool decap) 53{ 54} 55 56static inline bool 57mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw, 58 struct mlx5_flow_attr *attr, 59 u16 vport_num, 60 struct mlx5_core_dev *dest_mdev) 61{ 62 return false; 63} 64 65static inline u16 66mlx5_esw_indir_table_decap_vport(struct mlx5_flow_attr *attr) 67{ 68 return 0; 69} 70#endif 71 72#endif /* __MLX5_ESW_FT_H__ */
~/
Read-only file preview.