Read device capabilities that describe the support for Hash Split table and Linear RTC table.
Signed-off-by: Yevgeny Kliteynik <klit...@nvidia.com> --- drivers/net/mlx5/hws/mlx5dr_cmd.c | 16 ++++++++++++++++ drivers/net/mlx5/hws/mlx5dr_cmd.h | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.c b/drivers/net/mlx5/hws/mlx5dr_cmd.c index c64f127de8..32378673cf 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.c +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.c @@ -970,6 +970,22 @@ int mlx5dr_cmd_query_caps(struct ibv_context *ctx, caps->stc_alloc_log_gran = MLX5_GET(query_hca_cap_out, out, capability.wqe_based_flow_table_cap. stc_alloc_log_granularity); + + caps->rtc_hash_split_table = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + rtc_hash_split_table); + + caps->rtc_linear_lookup_table = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + rtc_linear_lookup_table); + + caps->access_index_mode = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + access_index_mode); + + caps->linear_match_definer = MLX5_GET(query_hca_cap_out, out, + capability.wqe_based_flow_table_cap. + linear_match_definer_reg_c3); } if (caps->eswitch_manager) { diff --git a/drivers/net/mlx5/hws/mlx5dr_cmd.h b/drivers/net/mlx5/hws/mlx5dr_cmd.h index 5d8d779708..468557ba16 100644 --- a/drivers/net/mlx5/hws/mlx5dr_cmd.h +++ b/drivers/net/mlx5/hws/mlx5dr_cmd.h @@ -170,7 +170,11 @@ struct mlx5dr_cmd_query_caps { uint8_t format_select_gtpu_dw_1; uint8_t format_select_gtpu_dw_2; uint8_t format_select_gtpu_ext_dw_0; + uint32_t linear_match_definer; + uint8_t access_index_mode; bool full_dw_jumbo_support; + bool rtc_hash_split_table; + bool rtc_linear_lookup_table; struct mlx5dr_cmd_query_ft_caps nic_ft; struct mlx5dr_cmd_query_ft_caps fdb_ft; bool eswitch_manager; -- 2.27.0