FILE
fs_dr.h
File preview with syntax highlighting.
linux-6.19.14/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.h
1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 2 * Copyright (c) 2019 Mellanox Technologies 3 */ 4 5#ifndef _MLX5_FS_DR_ 6#define _MLX5_FS_DR_ 7 8#include "mlx5dr.h" 9 10struct mlx5_flow_root_namespace; 11struct fs_fte; 12 13struct mlx5_fs_dr_action { 14 struct mlx5dr_action *dr_action; 15}; 16 17struct mlx5_fs_dr_rule { 18 struct mlx5dr_rule *dr_rule; 19 /* Only actions created by fs_dr */ 20 struct mlx5dr_action **dr_actions; 21 int num_actions; 22}; 23 24struct mlx5_fs_dr_domain { 25 struct mlx5dr_domain *dr_domain; 26}; 27 28struct mlx5_fs_dr_matcher { 29 struct mlx5dr_matcher *dr_matcher; 30}; 31 32struct mlx5_fs_dr_table { 33 struct mlx5dr_table *dr_table; 34 struct mlx5dr_action *miss_action; 35}; 36 37#ifdef CONFIG_MLX5_SW_STEERING 38 39bool mlx5_fs_dr_is_supported(struct mlx5_core_dev *dev); 40 41int 42mlx5_fs_dr_action_get_pkt_reformat_id(struct mlx5_pkt_reformat *pkt_reformat, 43 u32 *reformat_id); 44 45const struct mlx5_flow_cmds *mlx5_fs_cmd_get_dr_cmds(void); 46 47#else 48 49static inline const struct mlx5_flow_cmds *mlx5_fs_cmd_get_dr_cmds(void) 50{ 51 return NULL; 52} 53 54static inline int 55mlx5_fs_dr_action_get_pkt_reformat_id(struct mlx5_pkt_reformat *pkt_reformat, 56 u32 *reformat_id) 57{ 58 return -EOPNOTSUPP; 59} 60 61static inline bool mlx5_fs_dr_is_supported(struct mlx5_core_dev *dev) 62{ 63 return false; 64} 65 66#endif /* CONFIG_MLX5_SW_STEERING */ 67#endif
~/
Read-only file preview.