Commit 341a80de authored by Shay Drory's avatar Shay Drory Committed by Saeed Mahameed

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: c71ad41c ("net/mlx5: FW tracer, events handling")
Signed-off-by: default avatarShay Drory <shayd@nvidia.com>
Reviewed-by: default avatarMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent b4646da0
...@@ -490,7 +490,7 @@ static void poll_trace(struct mlx5_fw_tracer *tracer, ...@@ -490,7 +490,7 @@ static void poll_trace(struct mlx5_fw_tracer *tracer,
(u64)timestamp_low; (u64)timestamp_low;
break; break;
default: default:
if (tracer_event->event_id >= tracer->str_db.first_string_trace || if (tracer_event->event_id >= tracer->str_db.first_string_trace &&
tracer_event->event_id <= tracer->str_db.first_string_trace + tracer_event->event_id <= tracer->str_db.first_string_trace +
tracer->str_db.num_string_trace) { tracer->str_db.num_string_trace) {
tracer_event->type = TRACER_EVENT_TYPE_STRING; tracer_event->type = TRACER_EVENT_TYPE_STRING;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment