1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 /* Copyright (c) 2021 Mellanox Technologies. */ 3 4 #ifndef __MLX5_EN_TC_TUN_ENCAP_H__ 5 #define __MLX5_EN_TC_TUN_ENCAP_H__ 6 7 #include "tc_priv.h" 8 9 void mlx5e_detach_encap(struct mlx5e_priv *priv, 10 struct mlx5e_tc_flow *flow, 11 struct mlx5_flow_attr *attr, 12 int out_index); 13 14 int mlx5e_attach_encap(struct mlx5e_priv *priv, 15 struct mlx5e_tc_flow *flow, 16 struct mlx5_flow_attr *attr, 17 struct net_device *mirred_dev, 18 int out_index, 19 struct netlink_ext_ack *extack, 20 struct net_device **encap_dev); 21 22 int mlx5e_attach_decap(struct mlx5e_priv *priv, 23 struct mlx5e_tc_flow *flow, 24 struct netlink_ext_ack *extack); 25 void mlx5e_detach_decap(struct mlx5e_priv *priv, 26 struct mlx5e_tc_flow *flow); 27 28 int mlx5e_attach_decap_route(struct mlx5e_priv *priv, 29 struct mlx5e_tc_flow *flow); 30 void mlx5e_detach_decap_route(struct mlx5e_priv *priv, 31 struct mlx5e_tc_flow *flow); 32 33 struct ip_tunnel_info *mlx5e_dup_tun_info(const struct ip_tunnel_info *tun_info); 34 35 int mlx5e_tc_set_attr_rx_tun(struct mlx5e_tc_flow *flow, 36 struct mlx5_flow_spec *spec); 37 38 struct mlx5e_tc_tun_encap *mlx5e_tc_tun_init(struct mlx5e_priv *priv); 39 void mlx5e_tc_tun_cleanup(struct mlx5e_tc_tun_encap *encap); 40 41 #endif /* __MLX5_EN_TC_TUN_ENCAP_H__ */ 42