|
@@ -3432,6 +3432,17 @@ static const struct mlx5_ib_counter cong_cnts[] = {
|
|
INIT_CONG_COUNTER(np_cnp_sent),
|
|
INIT_CONG_COUNTER(np_cnp_sent),
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static const struct mlx5_ib_counter extended_err_cnts[] = {
|
|
|
|
+ INIT_Q_COUNTER(resp_local_length_error),
|
|
|
|
+ INIT_Q_COUNTER(resp_cqe_error),
|
|
|
|
+ INIT_Q_COUNTER(req_cqe_error),
|
|
|
|
+ INIT_Q_COUNTER(req_remote_invalid_request),
|
|
|
|
+ INIT_Q_COUNTER(req_remote_access_errors),
|
|
|
|
+ INIT_Q_COUNTER(resp_remote_access_errors),
|
|
|
|
+ INIT_Q_COUNTER(resp_cqe_flush_error),
|
|
|
|
+ INIT_Q_COUNTER(req_cqe_flush_error),
|
|
|
|
+};
|
|
|
|
+
|
|
static void mlx5_ib_dealloc_counters(struct mlx5_ib_dev *dev)
|
|
static void mlx5_ib_dealloc_counters(struct mlx5_ib_dev *dev)
|
|
{
|
|
{
|
|
unsigned int i;
|
|
unsigned int i;
|
|
@@ -3456,6 +3467,10 @@ static int __mlx5_ib_alloc_counters(struct mlx5_ib_dev *dev,
|
|
|
|
|
|
if (MLX5_CAP_GEN(dev->mdev, retransmission_q_counters))
|
|
if (MLX5_CAP_GEN(dev->mdev, retransmission_q_counters))
|
|
num_counters += ARRAY_SIZE(retrans_q_cnts);
|
|
num_counters += ARRAY_SIZE(retrans_q_cnts);
|
|
|
|
+
|
|
|
|
+ if (MLX5_CAP_GEN(dev->mdev, enhanced_error_q_counters))
|
|
|
|
+ num_counters += ARRAY_SIZE(extended_err_cnts);
|
|
|
|
+
|
|
cnts->num_q_counters = num_counters;
|
|
cnts->num_q_counters = num_counters;
|
|
|
|
|
|
if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) {
|
|
if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) {
|
|
@@ -3505,6 +3520,13 @@ static void mlx5_ib_fill_counters(struct mlx5_ib_dev *dev,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (MLX5_CAP_GEN(dev->mdev, enhanced_error_q_counters)) {
|
|
|
|
+ for (i = 0; i < ARRAY_SIZE(extended_err_cnts); i++, j++) {
|
|
|
|
+ names[j] = extended_err_cnts[i].name;
|
|
|
|
+ offsets[j] = extended_err_cnts[i].offset;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) {
|
|
if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) {
|
|
for (i = 0; i < ARRAY_SIZE(cong_cnts); i++, j++) {
|
|
for (i = 0; i < ARRAY_SIZE(cong_cnts); i++, j++) {
|
|
names[j] = cong_cnts[i].name;
|
|
names[j] = cong_cnts[i].name;
|