OSDN Git Service

net/mlx5e: Add TX reporter support
authorEran Ben Elisha <eranbe@mellanox.com>
Thu, 17 Jan 2019 21:59:18 +0000 (23:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2019 22:51:23 +0000 (14:51 -0800)
commitaba25279c10094c5c97d09c3491ca86d00b4ad5e
treecd440e53b9a0d95b44cf54ad450afc3e8603a54f
parent12bd0dcefe88782ac1c9fff632958dd1b71d27e5
net/mlx5e: Add TX reporter support

Add mlx5e tx reporter to devlink health reporters. This reporter will be
responsible for diagnosing, reporting and recovering of TX errors.
This patch declares the TX reporter operations and allocate it using the
devlink health API. Currently, this reporter supports reporting and
recovering from send error CQE only. In addition, it adds diagnose
information for the open SQs.

For a local SQ recover (due to driver error report), in case of SQ recover
failure, the recover operation will be considered as a failure.
For a full TX recover, an attempt to close and open the channels will be
done. If this one passed successfully, it will be considered as a
successful recover.

The SQ recover from error CQE flow is not a new feature in the driver,
this patch re-organize the functions and adapt them for the devlink
health API. For this purpose, move code from en_main.c to a new file
named reporter_tx.c.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/reporter.h [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c