[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 5 May 2019 17:49:02 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Saeed Mahameed <saeedm@...lanox.com>
Cc: "David S. Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jiri Pirko <jiri@...lanox.com>,
Moshe Shemesh <moshe@...lanox.com>,
Eran Ben Elisha <eranbe@...lanox.com>
Subject: Re: [net-next 11/15] net/mlx5: Add support for FW reporter dump
Sun, May 05, 2019 at 02:33:27AM CEST, saeedm@...lanox.com wrote:
>From: Moshe Shemesh <moshe@...lanox.com>
>
>Add support of dump callback for mlx5 FW reporter.
>Once we trigger FW dump, the FW will write the core dump to its raw data
>buffer. The tracer translates the raw data to traces and save it to a
>buffer. Once dump is done, the saved traces data is filled as objects
>into the dump buffer.
>
[...]
>+static void mlx5_fw_tracer_save_trace(struct mlx5_fw_tracer *tracer,
>+ u64 timestamp, bool lost,
>+ u8 event_id, char *msg)
>+{
>+ char *saved_traces = tracer->sbuff.traces_buff;
>+ u32 offset;
>+
>+ mutex_lock(&tracer->sbuff.lock);
>+ offset = tracer->sbuff.saved_traces_index * TRACE_STR_LINE;
>+ snprintf(saved_traces + offset, TRACE_STR_LINE,
>+ "%s [0x%llx] %d [0x%x] %s", dev_name(&tracer->dev->pdev->dev),
>+ timestamp, lost, event_id, msg);
Please format this using fmsg helpers instead.
>+
>+ tracer->sbuff.saved_traces_index =
>+ (tracer->sbuff.saved_traces_index + 1) & (SAVED_TRACES_NUM - 1);
>+ mutex_unlock(&tracer->sbuff.lock);
>+}
[...]
Powered by blists - more mailing lists