1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2 /* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */ 3 4 #ifndef _DR_STE_V1_ 5 #define _DR_STE_V1_ 6 7 #include "dr_types.h" 8 #include "dr_ste.h" 9 10 void dr_ste_v1_set_miss_addr(u8 *hw_ste_p, u64 miss_addr); 11 u64 dr_ste_v1_get_miss_addr(u8 *hw_ste_p); 12 void dr_ste_v1_set_byte_mask(u8 *hw_ste_p, u16 byte_mask); 13 u16 dr_ste_v1_get_byte_mask(u8 *hw_ste_p); 14 void dr_ste_v1_set_next_lu_type(u8 *hw_ste_p, u16 lu_type); 15 u16 dr_ste_v1_get_next_lu_type(u8 *hw_ste_p); 16 void dr_ste_v1_set_hit_addr(u8 *hw_ste_p, u64 icm_addr, u32 ht_size); 17 void dr_ste_v1_init(u8 *hw_ste_p, u16 lu_type, bool is_rx, u16 gvmi); 18 void dr_ste_v1_prepare_for_postsend(u8 *hw_ste_p, u32 ste_size); 19 void dr_ste_v1_set_actions_tx(struct mlx5dr_domain *dmn, u8 *action_type_set, 20 u32 actions_caps, u8 *last_ste, 21 struct mlx5dr_ste_actions_attr *attr, u32 *added_stes); 22 void dr_ste_v1_set_actions_rx(struct mlx5dr_domain *dmn, u8 *action_type_set, 23 u32 actions_caps, u8 *last_ste, 24 struct mlx5dr_ste_actions_attr *attr, u32 *added_stes); 25 void dr_ste_v1_set_action_set(u8 *d_action, u8 hw_field, u8 shifter, 26 u8 length, u32 data); 27 void dr_ste_v1_set_action_add(u8 *d_action, u8 hw_field, u8 shifter, 28 u8 length, u32 data); 29 void dr_ste_v1_set_action_copy(u8 *d_action, u8 dst_hw_field, u8 dst_shifter, 30 u8 dst_len, u8 src_hw_field, u8 src_shifter); 31 int dr_ste_v1_set_action_decap_l3_list(void *data, u32 data_sz, u8 *hw_action, 32 u32 hw_action_sz, u16 *used_hw_action_num); 33 void dr_ste_v1_build_eth_l2_src_dst_init(struct mlx5dr_ste_build *sb, 34 struct mlx5dr_match_param *mask); 35 void dr_ste_v1_build_eth_l3_ipv6_dst_init(struct mlx5dr_ste_build *sb, 36 struct mlx5dr_match_param *mask); 37 void dr_ste_v1_build_eth_l3_ipv6_src_init(struct mlx5dr_ste_build *sb, 38 struct mlx5dr_match_param *mask); 39 void dr_ste_v1_build_eth_l3_ipv4_5_tuple_init(struct mlx5dr_ste_build *sb, 40 struct mlx5dr_match_param *mask); 41 void dr_ste_v1_build_eth_l2_src_init(struct mlx5dr_ste_build *sb, 42 struct mlx5dr_match_param *mask); 43 void dr_ste_v1_build_eth_l2_dst_init(struct mlx5dr_ste_build *sb, 44 struct mlx5dr_match_param *mask); 45 void dr_ste_v1_build_eth_l2_tnl_init(struct mlx5dr_ste_build *sb, 46 struct mlx5dr_match_param *mask); 47 void dr_ste_v1_build_eth_l3_ipv4_misc_init(struct mlx5dr_ste_build *sb, 48 struct mlx5dr_match_param *mask); 49 void dr_ste_v1_build_eth_ipv6_l3_l4_init(struct mlx5dr_ste_build *sb, 50 struct mlx5dr_match_param *mask); 51 void dr_ste_v1_build_mpls_init(struct mlx5dr_ste_build *sb, 52 struct mlx5dr_match_param *mask); 53 void dr_ste_v1_build_tnl_gre_init(struct mlx5dr_ste_build *sb, 54 struct mlx5dr_match_param *mask); 55 void dr_ste_v1_build_tnl_mpls_init(struct mlx5dr_ste_build *sb, 56 struct mlx5dr_match_param *mask); 57 void dr_ste_v1_build_tnl_mpls_over_udp_init(struct mlx5dr_ste_build *sb, 58 struct mlx5dr_match_param *mask); 59 void dr_ste_v1_build_tnl_mpls_over_gre_init(struct mlx5dr_ste_build *sb, 60 struct mlx5dr_match_param *mask); 61 void dr_ste_v1_build_icmp_init(struct mlx5dr_ste_build *sb, 62 struct mlx5dr_match_param *mask); 63 void dr_ste_v1_build_general_purpose_init(struct mlx5dr_ste_build *sb, 64 struct mlx5dr_match_param *mask); 65 void dr_ste_v1_build_eth_l4_misc_init(struct mlx5dr_ste_build *sb, 66 struct mlx5dr_match_param *mask); 67 void dr_ste_v1_build_flex_parser_tnl_vxlan_gpe_init(struct mlx5dr_ste_build *sb, 68 struct mlx5dr_match_param *mask); 69 void dr_ste_v1_build_flex_parser_tnl_geneve_init(struct mlx5dr_ste_build *sb, 70 struct mlx5dr_match_param *mask); 71 void dr_ste_v1_build_tnl_header_0_1_init(struct mlx5dr_ste_build *sb, 72 struct mlx5dr_match_param *mask); 73 void dr_ste_v1_build_register_0_init(struct mlx5dr_ste_build *sb, 74 struct mlx5dr_match_param *mask); 75 void dr_ste_v1_build_register_1_init(struct mlx5dr_ste_build *sb, 76 struct mlx5dr_match_param *mask); 77 void dr_ste_v1_build_src_gvmi_qpn_init(struct mlx5dr_ste_build *sb, 78 struct mlx5dr_match_param *mask); 79 void dr_ste_v1_build_flex_parser_0_init(struct mlx5dr_ste_build *sb, 80 struct mlx5dr_match_param *mask); 81 void dr_ste_v1_build_flex_parser_1_init(struct mlx5dr_ste_build *sb, 82 struct mlx5dr_match_param *mask); 83 void dr_ste_v1_build_flex_parser_tnl_geneve_tlv_opt_init(struct mlx5dr_ste_build *sb, 84 struct mlx5dr_match_param *mask); 85 void dr_ste_v1_build_flex_parser_tnl_geneve_tlv_opt_exist_init(struct mlx5dr_ste_build *sb, 86 struct mlx5dr_match_param *mask); 87 void dr_ste_v1_build_flex_parser_tnl_gtpu_init(struct mlx5dr_ste_build *sb, 88 struct mlx5dr_match_param *mask); 89 void dr_ste_v1_build_tnl_gtpu_flex_parser_0_init(struct mlx5dr_ste_build *sb, 90 struct mlx5dr_match_param *mask); 91 void dr_ste_v1_build_tnl_gtpu_flex_parser_1_init(struct mlx5dr_ste_build *sb, 92 struct mlx5dr_match_param *mask); 93 94 #endif /* _DR_STE_V1_ */ 95