Skip to content

Commit 8bf94e6

Browse files
Feras DaoudSaeed Mahameed
authored andcommitted
net/mlx5: Rearm the FW tracer after each tracer event
The current design does not arm the tracer if traces are available before the tracer string database is fully loaded, leading to an unfunctional tracer. This fix will rearm the tracer every time the FW triggers tracer event regardless of the tracer strings database status. Fixes: c71ad41 ("net/mlx5: FW tracer, events handling") Signed-off-by: Feras Daoud <[email protected]> Signed-off-by: Roy Novich <[email protected]> Reviewed-by: Moshe Shemesh <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 3008e6a commit 8bf94e6

File tree

1 file changed

+5
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/diag

1 file changed

+5
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,9 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)
675675
if (!tracer->owner)
676676
return;
677677

678+
if (unlikely(!tracer->str_db.loaded))
679+
goto arm;
680+
678681
block_count = tracer->buff.size / TRACER_BLOCK_SIZE_BYTE;
679682
start_offset = tracer->buff.consumer_index * TRACER_BLOCK_SIZE_BYTE;
680683

@@ -732,6 +735,7 @@ static void mlx5_fw_tracer_handle_traces(struct work_struct *work)
732735
&tmp_trace_block[TRACES_PER_BLOCK - 1]);
733736
}
734737

738+
arm:
735739
mlx5_fw_tracer_arm(dev);
736740
}
737741

@@ -1136,8 +1140,7 @@ static int fw_tracer_event(struct notifier_block *nb, unsigned long action, void
11361140
queue_work(tracer->work_queue, &tracer->ownership_change_work);
11371141
break;
11381142
case MLX5_TRACER_SUBTYPE_TRACES_AVAILABLE:
1139-
if (likely(tracer->str_db.loaded))
1140-
queue_work(tracer->work_queue, &tracer->handle_traces_work);
1143+
queue_work(tracer->work_queue, &tracer->handle_traces_work);
11411144
break;
11421145
default:
11431146
mlx5_core_dbg(dev, "FWTracer: Event with unrecognized subtype: sub_type %d\n",

0 commit comments

Comments
 (0)