Skip to content

Commit

Permalink
Revert "net/mlx5: Expose steering dropped packets counter"
Browse files Browse the repository at this point in the history
This reverts commit 4fe1b3a, which
exposes the steering dropped packets counter via debugfs. The upcoming
series will expose the counter via devlink health reporter instead
of debugfs.

Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Maher Sanalla authored and Saeed Mahameed committed Apr 21, 2023
1 parent 57295e0 commit e267b8a
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions drivers/net/ethernet/mellanox/mlx5/core/esw/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ enum vnic_diag_counter {
MLX5_VNIC_DIAG_CQ_OVERRUN,
MLX5_VNIC_DIAG_INVALID_COMMAND,
MLX5_VNIC_DIAG_QOUTA_EXCEEDED_COMMAND,
MLX5_VNIC_DIAG_RX_STEERING_DISCARD,
};

static int mlx5_esw_query_vnic_diag(struct mlx5_vport *vport, enum vnic_diag_counter counter,
u64 *val)
u32 *val)
{
u32 out[MLX5_ST_SZ_DW(query_vnic_env_out)] = {};
u32 in[MLX5_ST_SZ_DW(query_vnic_env_in)] = {};
Expand Down Expand Up @@ -58,10 +57,6 @@ static int mlx5_esw_query_vnic_diag(struct mlx5_vport *vport, enum vnic_diag_cou
case MLX5_VNIC_DIAG_QOUTA_EXCEEDED_COMMAND:
*val = MLX5_GET(vnic_diagnostic_statistics, vnic_diag_out, quota_exceeded_command);
break;
case MLX5_VNIC_DIAG_RX_STEERING_DISCARD:
*val = MLX5_GET64(vnic_diagnostic_statistics, vnic_diag_out,
nic_receive_steering_discard);
break;
}

return 0;
Expand All @@ -70,14 +65,14 @@ static int mlx5_esw_query_vnic_diag(struct mlx5_vport *vport, enum vnic_diag_cou
static int __show_vnic_diag(struct seq_file *file, struct mlx5_vport *vport,
enum vnic_diag_counter type)
{
u64 val = 0;
u32 val = 0;
int ret;

ret = mlx5_esw_query_vnic_diag(vport, type, &val);
if (ret)
return ret;

seq_printf(file, "%llu\n", val);
seq_printf(file, "%d\n", val);
return 0;
}

Expand Down Expand Up @@ -117,19 +112,13 @@ static int quota_exceeded_command_show(struct seq_file *file, void *priv)
return __show_vnic_diag(file, file->private, MLX5_VNIC_DIAG_QOUTA_EXCEEDED_COMMAND);
}

static int rx_steering_discard_show(struct seq_file *file, void *priv)
{
return __show_vnic_diag(file, file->private, MLX5_VNIC_DIAG_RX_STEERING_DISCARD);
}

DEFINE_SHOW_ATTRIBUTE(total_q_under_processor_handle);
DEFINE_SHOW_ATTRIBUTE(send_queue_priority_update_flow);
DEFINE_SHOW_ATTRIBUTE(comp_eq_overrun);
DEFINE_SHOW_ATTRIBUTE(async_eq_overrun);
DEFINE_SHOW_ATTRIBUTE(cq_overrun);
DEFINE_SHOW_ATTRIBUTE(invalid_command);
DEFINE_SHOW_ATTRIBUTE(quota_exceeded_command);
DEFINE_SHOW_ATTRIBUTE(rx_steering_discard);

void mlx5_esw_vport_debugfs_destroy(struct mlx5_eswitch *esw, u16 vport_num)
{
Expand Down Expand Up @@ -190,9 +179,4 @@ void mlx5_esw_vport_debugfs_create(struct mlx5_eswitch *esw, u16 vport_num, bool
if (MLX5_CAP_GEN(esw->dev, quota_exceeded_count))
debugfs_create_file("quota_exceeded_command", 0444, vnic_diag, vport,
&quota_exceeded_command_fops);

if (MLX5_CAP_GEN(esw->dev, nic_receive_steering_discard))
debugfs_create_file("rx_steering_discard", 0444, vnic_diag, vport,
&rx_steering_discard_fops);

}

0 comments on commit e267b8a

Please sign in to comment.