@@ -387,10 +387,41 @@ static int hws_debug_dump_context_stc(struct seq_file *f, struct mlx5hws_context
387387 return 0 ;
388388}
389389
390+ static void
391+ hws_debug_dump_action_ste_table (struct seq_file * f ,
392+ struct mlx5hws_action_ste_table * action_tbl )
393+ {
394+ int ste_0_id = mlx5hws_pool_get_base_id (action_tbl -> pool );
395+ int ste_1_id = mlx5hws_pool_get_base_mirror_id (action_tbl -> pool );
396+
397+ seq_printf (f , "%d,0x%llx,%d,%d,%d,%d\n" ,
398+ MLX5HWS_DEBUG_RES_TYPE_ACTION_STE_TABLE ,
399+ HWS_PTR_TO_ID (action_tbl ),
400+ action_tbl -> rtc_0_id , ste_0_id ,
401+ action_tbl -> rtc_1_id , ste_1_id );
402+ }
403+
404+ static void hws_debug_dump_action_ste_pool (struct seq_file * f ,
405+ struct mlx5hws_action_ste_pool * pool )
406+ {
407+ struct mlx5hws_action_ste_table * action_tbl ;
408+ enum mlx5hws_pool_optimize opt ;
409+
410+ mutex_lock (& pool -> lock );
411+ for (opt = MLX5HWS_POOL_OPTIMIZE_NONE ; opt < MLX5HWS_POOL_OPTIMIZE_MAX ;
412+ opt ++ ) {
413+ list_for_each_entry (action_tbl , & pool -> elems [opt ].available ,
414+ list_node ) {
415+ hws_debug_dump_action_ste_table (f , action_tbl );
416+ }
417+ }
418+ mutex_unlock (& pool -> lock );
419+ }
420+
390421static int hws_debug_dump_context (struct seq_file * f , struct mlx5hws_context * ctx )
391422{
392423 struct mlx5hws_table * tbl ;
393- int ret ;
424+ int ret , i ;
394425
395426 ret = hws_debug_dump_context_info (f , ctx );
396427 if (ret )
@@ -410,6 +441,9 @@ static int hws_debug_dump_context(struct seq_file *f, struct mlx5hws_context *ct
410441 return ret ;
411442 }
412443
444+ for (i = 0 ; i < ctx -> queues ; i ++ )
445+ hws_debug_dump_action_ste_pool (f , & ctx -> action_ste_pool [i ]);
446+
413447 return 0 ;
414448}
415449
0 commit comments