Mon, May 06, 2019 at 12:51:24PM CEST, mo...@mellanox.com wrote:
>
>
>On 5/5/2019 6:49 PM, Jiri Pirko wrote:
>> Sun, May 05, 2019 at 02:33:27AM CEST, sae...@mellanox.com wrote:
>>> From: Moshe Shemesh <mo...@mellanox.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.
>> 
>
>Same here, I want to keep the format as is, not change it.

"as is" - where exactly?


>> 
>>> +
>>> +   tracer->sbuff.saved_traces_index =
>>> +           (tracer->sbuff.saved_traces_index + 1) & (SAVED_TRACES_NUM - 1);
>>> +   mutex_unlock(&tracer->sbuff.lock);
>>> +}
>> 
>> [...]
>> 

Reply via email to