#include "mlx5hws_internal.h"
#define MLX5_FLOW_LAYER_VXLAN …
#define MLX5_FLOW_LAYER_VXLAN_GPE …
#define MLX5_FLOW_LAYER_GRE …
#define MLX5_FLOW_LAYER_MPLS …
#define MLX5_FLOW_LAYER_IPIP …
#define MLX5_FLOW_LAYER_IPV6_ENCAP …
#define MLX5_FLOW_LAYER_NVGRE …
#define MLX5_FLOW_LAYER_GENEVE …
#define MLX5_FLOW_ITEM_FLEX_TUNNEL …
#define MLX5_FLOW_LAYER_TUNNEL …
#define GTP_PDU_SC …
#define BAD_PORT …
#define ETH_TYPE_IPV4_VXLAN …
#define ETH_TYPE_IPV6_VXLAN …
#define UDP_GTPU_PORT …
#define UDP_PORT_MPLS …
#define UDP_GENEVE_PORT …
#define UDP_ROCEV2_PORT …
#define HWS_FLOW_LAYER_TUNNEL_NO_MPLS …
#define STE_NO_VLAN …
#define STE_SVLAN …
#define STE_CVLAN …
#define STE_NO_L3 …
#define STE_IPV4 …
#define STE_IPV6 …
#define STE_NO_L4 …
#define STE_TCP …
#define STE_UDP …
#define STE_ICMP …
#define STE_ESP …
#define IPV4 …
#define IPV6 …
#define _HWS_SET32(p, v, byte_off, bit_off, mask) …
#define HWS_SET32(p, v, byte_off, bit_off, mask) …
#define HWS_GET32(p, byte_off, bit_off, mask) …
#define HWS_CALC_FNAME(field, inner) …
#define HWS_GET_MATCH_PARAM(match_param, hdr) …
#define HWS_IS_FLD_SET(match_param, hdr) …
#define HWS_IS_FLD_SET_DW_ARR(match_param, hdr, sz_in_bits) …
#define HWS_IS_FLD_SET_SZ(match_param, hdr, sz_in_bits) …
#define HWS_GET64_MATCH_PARAM(match_param, hdr) …
#define HWS_IS_FLD64_SET(match_param, hdr) …
#define HWS_CALC_HDR_SRC(fc, s_hdr) …
#define HWS_CALC_HDR_DST(fc, d_hdr) …
#define HWS_CALC_HDR(fc, s_hdr, d_hdr) …
#define HWS_SET_HDR(fc_arr, match_param, fname, s_hdr, d_hdr) …
struct mlx5hws_definer_sel_ctrl { … };
struct mlx5hws_definer_conv_data { … };
static void
hws_definer_ones_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_generic_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_outer_vlan_type_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_inner_vlan_type_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_second_vlan_type_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag,
bool inner)
{ … }
static void
hws_definer_inner_second_vlan_type_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_outer_second_vlan_type_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void hws_definer_icmp_dw1_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_icmpv6_dw1_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_l3_type_set(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static void
hws_definer_set_source_port_gvmi(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag,
struct mlx5hws_context *peer_ctx)
{ … }
static void
hws_definer_set_source_gvmi_vhca_id(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
__must_hold(&fc->ctx->ctrl_lock)
{ … }
static void
hws_definer_set_source_gvmi(struct mlx5hws_definer_fc *fc,
void *match_param,
u8 *tag)
{ … }
static struct mlx5hws_definer_fc *
hws_definer_flex_parser_steering_ok_bits_handler(struct mlx5hws_definer_conv_data *cd,
u8 parser_id)
{ … }
static struct mlx5hws_definer_fc *
hws_definer_flex_parser_handler(struct mlx5hws_definer_conv_data *cd,
u8 parser_id)
{ … }
static struct mlx5hws_definer_fc *
hws_definer_misc4_fields_handler(struct mlx5hws_definer_conv_data *cd,
bool *parser_is_used,
u32 id,
u32 value)
{ … }
static int
hws_definer_check_match_flags(struct mlx5hws_definer_conv_data *cd)
{ … }
static int
hws_definer_conv_outer(struct mlx5hws_definer_conv_data *cd,
u32 *match_param)
{ … }
static int
hws_definer_conv_inner(struct mlx5hws_definer_conv_data *cd,
u32 *match_param)
{ … }
static int
hws_definer_conv_misc(struct mlx5hws_definer_conv_data *cd,
u32 *match_param)
{ … }
static int
hws_definer_conv_misc2(struct mlx5hws_definer_conv_data *cd,
u32 *match_param)
{ … }
static int
hws_definer_conv_misc3(struct mlx5hws_definer_conv_data *cd, u32 *match_param)
{ … }
static int
hws_definer_conv_misc4(struct mlx5hws_definer_conv_data *cd,
u32 *match_param)
{ … }
static int
hws_definer_conv_misc5(struct mlx5hws_definer_conv_data *cd,
u32 *match_param)
{ … }
static int hws_definer_get_fc_size(struct mlx5hws_definer_fc *fc)
{ … }
static struct mlx5hws_definer_fc *
hws_definer_alloc_compressed_fc(struct mlx5hws_definer_fc *fc)
{ … }
static void
hws_definer_set_hl(u8 *hl, struct mlx5hws_definer_fc *fc)
{ … }
static struct mlx5hws_definer_fc *
hws_definer_alloc_fc(struct mlx5hws_context *ctx,
size_t len)
{ … }
static int
hws_definer_conv_match_params_to_hl(struct mlx5hws_context *ctx,
struct mlx5hws_match_template *mt,
u8 *hl)
{ … }
struct mlx5hws_definer_fc *
mlx5hws_definer_conv_match_params_to_compressed_fc(struct mlx5hws_context *ctx,
u8 match_criteria_enable,
u32 *match_param,
int *fc_sz)
{ … }
static int
hws_definer_find_byte_in_tag(struct mlx5hws_definer *definer,
u32 hl_byte_off,
u32 *tag_byte_off)
{ … }
static int
hws_definer_fc_bind(struct mlx5hws_definer *definer,
struct mlx5hws_definer_fc *fc,
u32 fc_sz)
{ … }
static bool
hws_definer_best_hl_fit_recu(struct mlx5hws_definer_sel_ctrl *ctrl,
u32 cur_dw,
u32 *data)
{ … }
static void
hws_definer_copy_sel_ctrl(struct mlx5hws_definer_sel_ctrl *ctrl,
struct mlx5hws_definer *definer)
{ … }
static int
hws_definer_find_best_match_fit(struct mlx5hws_context *ctx,
struct mlx5hws_definer *definer,
u8 *hl)
{ … }
static void
hws_definer_create_tag_mask(u32 *match_param,
struct mlx5hws_definer_fc *fc,
u32 fc_sz,
u8 *tag)
{ … }
void mlx5hws_definer_create_tag(u32 *match_param,
struct mlx5hws_definer_fc *fc,
u32 fc_sz,
u8 *tag)
{ … }
int mlx5hws_definer_get_id(struct mlx5hws_definer *definer)
{ … }
int mlx5hws_definer_compare(struct mlx5hws_definer *definer_a,
struct mlx5hws_definer *definer_b)
{ … }
int
mlx5hws_definer_calc_layout(struct mlx5hws_context *ctx,
struct mlx5hws_match_template *mt,
struct mlx5hws_definer *match_definer)
{ … }
int mlx5hws_definer_init_cache(struct mlx5hws_definer_cache **cache)
{ … }
void mlx5hws_definer_uninit_cache(struct mlx5hws_definer_cache *cache)
{ … }
int mlx5hws_definer_get_obj(struct mlx5hws_context *ctx,
struct mlx5hws_definer *definer)
{ … }
static void
hws_definer_put_obj(struct mlx5hws_context *ctx, u32 obj_id)
{ … }
static struct mlx5hws_definer *
hws_definer_alloc(struct mlx5hws_context *ctx,
struct mlx5hws_definer_fc *fc,
int fc_sz,
u32 *match_param,
struct mlx5hws_definer *layout,
bool bind_fc)
{ … }
void mlx5hws_definer_free(struct mlx5hws_context *ctx,
struct mlx5hws_definer *definer)
{ … }
static int
hws_definer_mt_match_init(struct mlx5hws_context *ctx,
struct mlx5hws_match_template *mt,
struct mlx5hws_definer *match_layout)
{ … }
static void
hws_definer_mt_match_uninit(struct mlx5hws_context *ctx,
struct mlx5hws_match_template *mt)
{ … }
int mlx5hws_definer_mt_init(struct mlx5hws_context *ctx,
struct mlx5hws_match_template *mt)
{ … }
void mlx5hws_definer_mt_uninit(struct mlx5hws_context *ctx,
struct mlx5hws_match_template *mt)
{ … }