linux/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste_v1.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/* Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. */

#include <linux/types.h>
#include "mlx5_ifc_dr_ste_v1.h"
#include "dr_ste_v1.h"

#define DR_STE_CALC_DFNR_TYPE(lookup_type, inner)

enum dr_ste_v1_entry_format {};

/* Lookup type is built from 2B: [ Definer mode 1B ][ Definer index 1B ] */
enum {};

enum dr_ste_v1_header_anchors {};

enum dr_ste_v1_action_size {};

enum dr_ste_v1_action_insert_ptr_attr {};

enum dr_ste_v1_action_id {};

enum {};

enum dr_ste_v1_aso_ctx_type {};

static const struct mlx5dr_ste_action_modify_field dr_ste_v1_action_modify_field_arr[] =;

static void dr_ste_v1_set_entry_type(u8 *hw_ste_p, u8 entry_type)
{}

bool dr_ste_v1_is_miss_addr_set(u8 *hw_ste_p)
{}

void dr_ste_v1_set_miss_addr(u8 *hw_ste_p, u64 miss_addr)
{}

u64 dr_ste_v1_get_miss_addr(u8 *hw_ste_p)
{}

void dr_ste_v1_set_byte_mask(u8 *hw_ste_p, u16 byte_mask)
{}

u16 dr_ste_v1_get_byte_mask(u8 *hw_ste_p)
{}

static void dr_ste_v1_set_lu_type(u8 *hw_ste_p, u16 lu_type)
{}

void dr_ste_v1_set_next_lu_type(u8 *hw_ste_p, u16 lu_type)
{}

u16 dr_ste_v1_get_next_lu_type(u8 *hw_ste_p)
{}

static void dr_ste_v1_set_hit_gvmi(u8 *hw_ste_p, u16 gvmi)
{}

void dr_ste_v1_set_hit_addr(u8 *hw_ste_p, u64 icm_addr, u32 ht_size)
{}

void dr_ste_v1_init(u8 *hw_ste_p, u16 lu_type, bool is_rx, u16 gvmi)
{}

void dr_ste_v1_prepare_for_postsend(u8 *hw_ste_p, u32 ste_size)
{}

static void dr_ste_v1_set_rx_flow_tag(u8 *s_action, u32 flow_tag)
{}

static void dr_ste_v1_set_counter_id(u8 *hw_ste_p, u32 ctr_id)
{}

static void dr_ste_v1_set_reparse(u8 *hw_ste_p)
{}

static void dr_ste_v1_set_encap(u8 *hw_ste_p, u8 *d_action,
				u32 reformat_id, int size)
{}

static void dr_ste_v1_set_insert_hdr(u8 *hw_ste_p, u8 *d_action,
				     u32 reformat_id,
				     u8 anchor, u8 offset,
				     int size)
{}

static void dr_ste_v1_set_remove_hdr(u8 *hw_ste_p, u8 *s_action,
				     u8 anchor, u8 offset,
				     int size)
{}

static void dr_ste_v1_set_push_vlan(u8 *hw_ste_p, u8 *d_action,
				    u32 vlan_hdr)
{}

static void dr_ste_v1_set_pop_vlan(u8 *hw_ste_p, u8 *s_action, u8 vlans_num)
{}

static void dr_ste_v1_set_encap_l3(u8 *hw_ste_p,
				   u8 *frst_s_action,
				   u8 *scnd_d_action,
				   u32 reformat_id,
				   int size)
{}

static void dr_ste_v1_set_rx_decap(u8 *hw_ste_p, u8 *s_action)
{}

static void dr_ste_v1_set_accelerated_rewrite_actions(u8 *hw_ste_p,
						      u8 *d_action,
						      u16 num_of_actions,
						      u32 rewrite_pattern,
						      u32 rewrite_args,
						      u8 *action_data)
{}

static void dr_ste_v1_set_basic_rewrite_actions(u8 *hw_ste_p,
						u8 *s_action,
						u16 num_of_actions,
						u32 rewrite_index)
{}

static void dr_ste_v1_set_rewrite_actions(u8 *hw_ste_p,
					  u8 *action,
					  u16 num_of_actions,
					  u32 rewrite_pattern,
					  u32 rewrite_args,
					  u8 *action_data)
{}

static void dr_ste_v1_set_aso_flow_meter(u8 *d_action,
					 u32 object_id,
					 u32 offset,
					 u8 dest_reg_id,
					 u8 init_color)
{}

static void dr_ste_v1_set_match_range_pkt_len(u8 *hw_ste_p, u32 definer_id,
					      u32 min, u32 max)
{}

static void dr_ste_v1_arr_init_next_match(u8 **last_ste,
					  u32 *added_stes,
					  u16 gvmi)
{}

static void dr_ste_v1_arr_init_next_match_range(u8 **last_ste,
						u32 *added_stes,
						u16 gvmi)
{}

void dr_ste_v1_set_actions_tx(struct mlx5dr_domain *dmn,
			      u8 *action_type_set,
			      u32 actions_caps,
			      u8 *last_ste,
			      struct mlx5dr_ste_actions_attr *attr,
			      u32 *added_stes)
{}

void dr_ste_v1_set_actions_rx(struct mlx5dr_domain *dmn,
			      u8 *action_type_set,
			      u32 actions_caps,
			      u8 *last_ste,
			      struct mlx5dr_ste_actions_attr *attr,
			      u32 *added_stes)
{}

void dr_ste_v1_set_action_set(u8 *d_action,
			      u8 hw_field,
			      u8 shifter,
			      u8 length,
			      u32 data)
{}

void dr_ste_v1_set_action_add(u8 *d_action,
			      u8 hw_field,
			      u8 shifter,
			      u8 length,
			      u32 data)
{}

void dr_ste_v1_set_action_copy(u8 *d_action,
			       u8 dst_hw_field,
			       u8 dst_shifter,
			       u8 dst_len,
			       u8 src_hw_field,
			       u8 src_shifter)
{}

#define DR_STE_DECAP_L3_ACTION_NUM
#define DR_STE_L2_HDR_MAX_SZ

int dr_ste_v1_set_action_decap_l3_list(void *data,
				       u32 data_sz,
				       u8 *hw_action,
				       u32 hw_action_sz,
				       u16 *used_hw_action_num)
{}

static void dr_ste_v1_build_eth_l2_src_dst_bit_mask(struct mlx5dr_match_param *value,
						    bool inner, u8 *bit_mask)
{}

static int dr_ste_v1_build_eth_l2_src_dst_tag(struct mlx5dr_match_param *value,
					      struct mlx5dr_ste_build *sb,
					      u8 *tag)
{}

void dr_ste_v1_build_eth_l2_src_dst_init(struct mlx5dr_ste_build *sb,
					 struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_eth_l3_ipv6_dst_tag(struct mlx5dr_match_param *value,
					       struct mlx5dr_ste_build *sb,
					       u8 *tag)
{}

void dr_ste_v1_build_eth_l3_ipv6_dst_init(struct mlx5dr_ste_build *sb,
					  struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_eth_l3_ipv6_src_tag(struct mlx5dr_match_param *value,
					       struct mlx5dr_ste_build *sb,
					       u8 *tag)
{}

void dr_ste_v1_build_eth_l3_ipv6_src_init(struct mlx5dr_ste_build *sb,
					  struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_eth_l3_ipv4_5_tuple_tag(struct mlx5dr_match_param *value,
						   struct mlx5dr_ste_build *sb,
						   u8 *tag)
{}

void dr_ste_v1_build_eth_l3_ipv4_5_tuple_init(struct mlx5dr_ste_build *sb,
					      struct mlx5dr_match_param *mask)
{}

static void dr_ste_v1_build_eth_l2_src_or_dst_bit_mask(struct mlx5dr_match_param *value,
						       bool inner, u8 *bit_mask)
{}

static int dr_ste_v1_build_eth_l2_src_or_dst_tag(struct mlx5dr_match_param *value,
						 bool inner, u8 *tag)
{}

static void dr_ste_v1_build_eth_l2_src_bit_mask(struct mlx5dr_match_param *value,
						bool inner, u8 *bit_mask)
{}

static int dr_ste_v1_build_eth_l2_src_tag(struct mlx5dr_match_param *value,
					  struct mlx5dr_ste_build *sb,
					  u8 *tag)
{}

void dr_ste_v1_build_eth_l2_src_init(struct mlx5dr_ste_build *sb,
				     struct mlx5dr_match_param *mask)
{}

static void dr_ste_v1_build_eth_l2_dst_bit_mask(struct mlx5dr_match_param *value,
						bool inner, u8 *bit_mask)
{}

static int dr_ste_v1_build_eth_l2_dst_tag(struct mlx5dr_match_param *value,
					  struct mlx5dr_ste_build *sb,
					  u8 *tag)
{}

void dr_ste_v1_build_eth_l2_dst_init(struct mlx5dr_ste_build *sb,
				     struct mlx5dr_match_param *mask)
{}

static void dr_ste_v1_build_eth_l2_tnl_bit_mask(struct mlx5dr_match_param *value,
						bool inner, u8 *bit_mask)
{}

static int dr_ste_v1_build_eth_l2_tnl_tag(struct mlx5dr_match_param *value,
					  struct mlx5dr_ste_build *sb,
					  u8 *tag)
{}

void dr_ste_v1_build_eth_l2_tnl_init(struct mlx5dr_ste_build *sb,
				     struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_eth_l3_ipv4_misc_tag(struct mlx5dr_match_param *value,
						struct mlx5dr_ste_build *sb,
						u8 *tag)
{}

void dr_ste_v1_build_eth_l3_ipv4_misc_init(struct mlx5dr_ste_build *sb,
					   struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_eth_ipv6_l3_l4_tag(struct mlx5dr_match_param *value,
					      struct mlx5dr_ste_build *sb,
					      u8 *tag)
{}

void dr_ste_v1_build_eth_ipv6_l3_l4_init(struct mlx5dr_ste_build *sb,
					 struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_mpls_tag(struct mlx5dr_match_param *value,
				    struct mlx5dr_ste_build *sb,
				    u8 *tag)
{}

void dr_ste_v1_build_mpls_init(struct mlx5dr_ste_build *sb,
			       struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_tnl_gre_tag(struct mlx5dr_match_param *value,
				       struct mlx5dr_ste_build *sb,
				       u8 *tag)
{}

void dr_ste_v1_build_tnl_gre_init(struct mlx5dr_ste_build *sb,
				  struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_tnl_mpls_tag(struct mlx5dr_match_param *value,
					struct mlx5dr_ste_build *sb,
					u8 *tag)
{}

void dr_ste_v1_build_tnl_mpls_init(struct mlx5dr_ste_build *sb,
				   struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_tnl_mpls_over_udp_tag(struct mlx5dr_match_param *value,
						 struct mlx5dr_ste_build *sb,
						 u8 *tag)
{}

void dr_ste_v1_build_tnl_mpls_over_udp_init(struct mlx5dr_ste_build *sb,
					    struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_tnl_mpls_over_gre_tag(struct mlx5dr_match_param *value,
						 struct mlx5dr_ste_build *sb,
						 u8 *tag)
{}

void dr_ste_v1_build_tnl_mpls_over_gre_init(struct mlx5dr_ste_build *sb,
					    struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_icmp_tag(struct mlx5dr_match_param *value,
				    struct mlx5dr_ste_build *sb,
				    u8 *tag)
{}

void dr_ste_v1_build_icmp_init(struct mlx5dr_ste_build *sb,
			       struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_general_purpose_tag(struct mlx5dr_match_param *value,
					       struct mlx5dr_ste_build *sb,
					       u8 *tag)
{}

void dr_ste_v1_build_general_purpose_init(struct mlx5dr_ste_build *sb,
					  struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_eth_l4_misc_tag(struct mlx5dr_match_param *value,
					   struct mlx5dr_ste_build *sb,
					   u8 *tag)
{}

void dr_ste_v1_build_eth_l4_misc_init(struct mlx5dr_ste_build *sb,
				      struct mlx5dr_match_param *mask)
{}

static int
dr_ste_v1_build_flex_parser_tnl_vxlan_gpe_tag(struct mlx5dr_match_param *value,
					      struct mlx5dr_ste_build *sb,
					      u8 *tag)
{}

void dr_ste_v1_build_flex_parser_tnl_vxlan_gpe_init(struct mlx5dr_ste_build *sb,
						    struct mlx5dr_match_param *mask)
{}

static int
dr_ste_v1_build_flex_parser_tnl_geneve_tag(struct mlx5dr_match_param *value,
					   struct mlx5dr_ste_build *sb,
					   u8 *tag)
{}

void dr_ste_v1_build_flex_parser_tnl_geneve_init(struct mlx5dr_ste_build *sb,
						 struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_tnl_header_0_1_tag(struct mlx5dr_match_param *value,
					      struct mlx5dr_ste_build *sb,
					      u8 *tag)
{}

void dr_ste_v1_build_tnl_header_0_1_init(struct mlx5dr_ste_build *sb,
					 struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_register_0_tag(struct mlx5dr_match_param *value,
					  struct mlx5dr_ste_build *sb,
					  u8 *tag)
{}

void dr_ste_v1_build_register_0_init(struct mlx5dr_ste_build *sb,
				     struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_register_1_tag(struct mlx5dr_match_param *value,
					  struct mlx5dr_ste_build *sb,
					  u8 *tag)
{}

void dr_ste_v1_build_register_1_init(struct mlx5dr_ste_build *sb,
				     struct mlx5dr_match_param *mask)
{}

static void dr_ste_v1_build_src_gvmi_qpn_bit_mask(struct mlx5dr_match_param *value,
						  u8 *bit_mask)
{}

static int dr_ste_v1_build_src_gvmi_qpn_tag(struct mlx5dr_match_param *value,
					    struct mlx5dr_ste_build *sb,
					    u8 *tag)
{}

void dr_ste_v1_build_src_gvmi_qpn_init(struct mlx5dr_ste_build *sb,
				       struct mlx5dr_match_param *mask)
{}

static void dr_ste_v1_set_flex_parser(u32 *misc4_field_id,
				      u32 *misc4_field_value,
				      bool *parser_is_used,
				      u8 *tag)
{}

static int dr_ste_v1_build_felx_parser_tag(struct mlx5dr_match_param *value,
					   struct mlx5dr_ste_build *sb,
					   u8 *tag)
{}

void dr_ste_v1_build_flex_parser_0_init(struct mlx5dr_ste_build *sb,
					struct mlx5dr_match_param *mask)
{}

void dr_ste_v1_build_flex_parser_1_init(struct mlx5dr_ste_build *sb,
					struct mlx5dr_match_param *mask)
{}

static int
dr_ste_v1_build_flex_parser_tnl_geneve_tlv_opt_tag(struct mlx5dr_match_param *value,
						   struct mlx5dr_ste_build *sb,
						   u8 *tag)
{}

void
dr_ste_v1_build_flex_parser_tnl_geneve_tlv_opt_init(struct mlx5dr_ste_build *sb,
						    struct mlx5dr_match_param *mask)
{}

static int
dr_ste_v1_build_flex_parser_tnl_geneve_tlv_opt_exist_tag(struct mlx5dr_match_param *value,
							 struct mlx5dr_ste_build *sb,
							 u8 *tag)
{}

void
dr_ste_v1_build_flex_parser_tnl_geneve_tlv_opt_exist_init(struct mlx5dr_ste_build *sb,
							  struct mlx5dr_match_param *mask)
{}

static int dr_ste_v1_build_flex_parser_tnl_gtpu_tag(struct mlx5dr_match_param *value,
						    struct mlx5dr_ste_build *sb,
						    u8 *tag)
{}

void dr_ste_v1_build_flex_parser_tnl_gtpu_init(struct mlx5dr_ste_build *sb,
					       struct mlx5dr_match_param *mask)
{}

static int
dr_ste_v1_build_tnl_gtpu_flex_parser_0_tag(struct mlx5dr_match_param *value,
					   struct mlx5dr_ste_build *sb,
					   u8 *tag)
{}

void
dr_ste_v1_build_tnl_gtpu_flex_parser_0_init(struct mlx5dr_ste_build *sb,
					    struct mlx5dr_match_param *mask)
{}

static int
dr_ste_v1_build_tnl_gtpu_flex_parser_1_tag(struct mlx5dr_match_param *value,
					   struct mlx5dr_ste_build *sb,
					   u8 *tag)
{}

void
dr_ste_v1_build_tnl_gtpu_flex_parser_1_init(struct mlx5dr_ste_build *sb,
					    struct mlx5dr_match_param *mask)
{}

int dr_ste_v1_alloc_modify_hdr_ptrn_arg(struct mlx5dr_action *action)
{}

void dr_ste_v1_free_modify_hdr_ptrn_arg(struct mlx5dr_action *action)
{}

static struct mlx5dr_ste_ctx ste_ctx_v1 =;

struct mlx5dr_ste_ctx *mlx5dr_ste_get_ctx_v1(void)
{}