]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net/mlx5: FW tracer, events handling
authorFeras Daoud <ferasda@mellanox.com>
Wed, 7 Feb 2018 09:08:56 +0000 (11:08 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 23 Jul 2018 22:01:11 +0000 (15:01 -0700)
commitc71ad41ccb0c29fce95149b74786574b354c9dda
treef6c1d4e06f05171c80cedcaf7ad19d997383a3eb
parente9cad2cea7f0b2bea253e2681a0a3f5d3940af3c
net/mlx5: FW tracer, events handling

The tracer has one event, event 0x26, with two subtypes:
- Subtype 0: Ownership change
- Subtype 1: Traces available

An ownership change occurs in the following cases:
1- Owner releases his ownership, in this case, an event will be
sent to inform others to reattempt acquire ownership.
2- Ownership was taken by a higher priority tool, in this case
the owner should understand that it lost ownership, and go through
tear down flow.

The second subtype indicates that there are traces in the trace buffer,
in this case, the driver polls the tracer buffer for new traces, parse
them and prepares the messages for printing.

The HW starts tracing from the first address in the tracer buffer.
Driver receives an event notifying that new trace block exists.
HW posts a timestamp event at the last 8B of every 256B block.
Comparing the timestamp to the last handled timestamp would indicate
that this is a new trace block. Once the new timestamp is detected,
the entire block is considered valid.

Block validation and parsing, should be done after copying the current
block to a different location, in order to avoid block overwritten
during processing.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.h
drivers/net/ethernet/mellanox/mlx5/core/eq.c
include/linux/mlx5/device.h