FILE
ipsec_fs.h
File preview with syntax highlighting.
linux-6.19.14/drivers/net/ethernet/mellanox/mlx5/core/esw/ipsec_fs.h
1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2/* Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ 3 4#ifndef __MLX5_ESW_IPSEC_FS_H__ 5#define __MLX5_ESW_IPSEC_FS_H__ 6 7struct mlx5e_ipsec; 8struct mlx5e_ipsec_sa_entry; 9 10#ifdef CONFIG_MLX5_ESWITCH 11void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec, 12 struct mlx5e_ipsec_rx_create_attr *attr); 13int mlx5_esw_ipsec_rx_status_pass_dest_get(struct mlx5e_ipsec *ipsec, 14 struct mlx5_flow_destination *dest); 15int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry, 16 struct mlx5_flow_act *flow_act); 17void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry); 18int mlx5_esw_ipsec_rx_ipsec_obj_id_search(struct mlx5e_priv *priv, u32 id, 19 u32 *ipsec_obj_id); 20void mlx5_esw_ipsec_tx_create_attr_set(struct mlx5e_ipsec *ipsec, 21 struct mlx5e_ipsec_tx_create_attr *attr); 22void mlx5_esw_ipsec_restore_dest_uplink(struct mlx5_core_dev *mdev); 23void mlx5_esw_ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry, 24 struct mlx5_flow_spec *spec); 25#else 26static inline void mlx5_esw_ipsec_rx_create_attr_set(struct mlx5e_ipsec *ipsec, 27 struct mlx5e_ipsec_rx_create_attr *attr) {} 28 29static inline int mlx5_esw_ipsec_rx_status_pass_dest_get(struct mlx5e_ipsec *ipsec, 30 struct mlx5_flow_destination *dest) 31{ 32 return -EINVAL; 33} 34 35static inline int mlx5_esw_ipsec_rx_setup_modify_header(struct mlx5e_ipsec_sa_entry *sa_entry, 36 struct mlx5_flow_act *flow_act) 37{ 38 return -EINVAL; 39} 40 41static inline void mlx5_esw_ipsec_rx_id_mapping_remove(struct mlx5e_ipsec_sa_entry *sa_entry) {} 42 43static inline int mlx5_esw_ipsec_rx_ipsec_obj_id_search(struct mlx5e_priv *priv, u32 id, 44 u32 *ipsec_obj_id) 45{ 46 return -EINVAL; 47} 48 49static inline void mlx5_esw_ipsec_tx_create_attr_set(struct mlx5e_ipsec *ipsec, 50 struct mlx5e_ipsec_tx_create_attr *attr) {} 51 52static inline void mlx5_esw_ipsec_restore_dest_uplink(struct mlx5_core_dev *mdev) {} 53static inline void 54mlx5_esw_ipsec_rx_rule_add_match_obj(struct mlx5e_ipsec_sa_entry *sa_entry, 55 struct mlx5_flow_spec *spec) {} 56#endif /* CONFIG_MLX5_ESWITCH */ 57#endif /* __MLX5_ESW_IPSEC_FS_H__ */
~/
Read-only file preview.