]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Add support for resource dump
authorAya Levin <ayal@mellanox.com>
Tue, 11 Feb 2020 22:32:43 +0000 (14:32 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 19 Feb 2020 03:17:29 +0000 (19:17 -0800)
commitc96d60f2481f7cff7d28ed31c9515ad55d64f3a4
tree77a317b3c1ef557d2ca486b889439d0a03fcebe1
parentaa0a94221a43f33d35d0cc9a776f083b9302bc2c
net/mlx5: Add support for resource dump

On driver load:
- Initialize resource dump data structure and memory access tools (mkey
  & pd).
- Read the resource dump's menu which contains the FW segment
  identifier. Each record is identified by the segment name (ASCII).

During the driver's course of life, users (like reporters) may request
dumps per segment. The user should create a command providing the
segment identifier (SW enumeration) and command keys. In return, the
user receives a command context. In order to receive the dump, the user
should supply the command context and a memory (aligned to a PAGE) on
which the dump content will be written. Since the dump may be larger
than the given memory, the user may resubmit the command until received
an indication of end-of-dump. It is the user's responsibility to destroy
the command.

Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h