OSDN Git Service

net/mlx5: Add vnic devlink health reporter to PFs/VFs
authorMaher Sanalla <msanalla@nvidia.com>
Mon, 20 Mar 2023 22:10:16 +0000 (00:10 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 21 Apr 2023 01:35:49 +0000 (18:35 -0700)
commitb0bc615df488abd0e95107e4a9ecefb9bf8c250a
tree3abfd34221fd76fb4f0b75e51b6ebbf8ba60f4ea
parent0a431418f685e100c45ff150efaf4a5afa6f1982
net/mlx5: Add vnic devlink health reporter to PFs/VFs

Create a vnic devlink health reporter for PFs/VFs interfaces.
The reporter's diagnose callback displays the values of vNIC/vport
transport debug counters of PFs/VFs, as follows:

$ devlink health diagnose pci/0000:08:00.0 reporter vnic
 vNIC env counters:
    total_error_queues: 0 send_queue_priority_update_flow: 0
    comp_eq_overrun: 0 async_eq_overrun: 0 cq_overrun: 0
    invalid_command: 0 quota_exceeded_command: 0
    nic_receive_steering_discard: 0

Moreover, add documentation on the reporter functionality and the
counters description.

While at it, expose the vNIC counters diagnose function to be used by
the downstream patch, which will reveal the counters for representor
interfaces.

Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Documentation/networking/device_drivers/ethernet/mellanox/mlx5/devlink.rst
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/diag/reporter_vnic.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/health.c
include/linux/mlx5/driver.h