1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 /* Copyright (c) 2020 Mellanox Technologies */ 3 4 #ifndef __MLX5E_EN_MOD_HDR_H__ 5 #define __MLX5E_EN_MOD_HDR_H__ 6 7 #include <linux/hashtable.h> 8 #include <linux/mlx5/fs.h> 9 10 struct mlx5e_mod_hdr_handle; 11 12 struct mlx5e_tc_mod_hdr_acts { 13 int num_actions; 14 int max_actions; 15 void *actions; 16 }; 17 18 struct mlx5e_mod_hdr_handle * 19 mlx5e_mod_hdr_attach(struct mlx5_core_dev *mdev, 20 struct mod_hdr_tbl *tbl, 21 enum mlx5_flow_namespace_type namespace, 22 struct mlx5e_tc_mod_hdr_acts *mod_hdr_acts); 23 void mlx5e_mod_hdr_detach(struct mlx5_core_dev *mdev, 24 struct mod_hdr_tbl *tbl, 25 struct mlx5e_mod_hdr_handle *mh); 26 struct mlx5_modify_hdr *mlx5e_mod_hdr_get(struct mlx5e_mod_hdr_handle *mh); 27 28 void mlx5e_mod_hdr_tbl_init(struct mod_hdr_tbl *tbl); 29 void mlx5e_mod_hdr_tbl_destroy(struct mod_hdr_tbl *tbl); 30 31 #endif /* __MLX5E_EN_MOD_HDR_H__ */ 32