Skip to content

Commit 341a80d

Browse files
shayshyiSaeed Mahameed
authored andcommitted
net/mlx5: fw_tracer, Fix event handling
mlx5 driver needs to parse traces with event_id inside the range of first_string_trace and num_string_trace. However, mlx5 is parsing all events with event_id >= first_string_trace. Fix it by checking for the correct range. Fixes: c71ad41 ("net/mlx5: FW tracer, events handling") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent b4646da commit 341a80d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core/diag

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ static void poll_trace(struct mlx5_fw_tracer *tracer,
490490
(u64)timestamp_low;
491491
break;
492492
default:
493-
if (tracer_event->event_id >= tracer->str_db.first_string_trace ||
493+
if (tracer_event->event_id >= tracer->str_db.first_string_trace &&
494494
tracer_event->event_id <= tracer->str_db.first_string_trace +
495495
tracer->str_db.num_string_trace) {
496496
tracer_event->type = TRACER_EVENT_TYPE_STRING;

0 commit comments

Comments
 (0)