linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.h

/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */

#ifndef MLX5HWS_MATCHER_H_
#define MLX5HWS_MATCHER_H_

/* We calculated that concatenating a collision table to the main table with
 * 3% of the main table rows will be enough resources for high insertion
 * success probability.
 *
 * The calculation: log2(2^x * 3 / 100) = log2(2^x) + log2(3/100) = x - 5.05 ~ 5
 */
#define MLX5HWS_MATCHER_ASSURED_ROW_RATIO
/* Threshold to determine if amount of rules require a collision table */
#define MLX5HWS_MATCHER_ASSURED_RULES_TH
/* Required depth of an assured collision table */
#define MLX5HWS_MATCHER_ASSURED_COL_TBL_DEPTH
/* Required depth of the main large table */
#define MLX5HWS_MATCHER_ASSURED_MAIN_TBL_DEPTH

enum mlx5hws_matcher_offset {};

enum mlx5hws_matcher_flags {};

struct mlx5hws_match_template {};

struct mlx5hws_matcher_match_ste {};

struct mlx5hws_matcher_action_ste {};

struct mlx5hws_matcher_resize_data_node {};

struct mlx5hws_matcher_resize_data {};

struct mlx5hws_matcher {};

static inline bool
mlx5hws_matcher_mt_is_jumbo(struct mlx5hws_match_template *mt)
{}

static inline bool mlx5hws_matcher_is_resizable(struct mlx5hws_matcher *matcher)
{}

static inline bool mlx5hws_matcher_is_in_resize(struct mlx5hws_matcher *matcher)
{}

static inline bool mlx5hws_matcher_is_insert_by_idx(struct mlx5hws_matcher *matcher)
{}

#endif /* MLX5HWS_MATCHER_H_ */