This patch adds below requester and responder side error counters, which will be exposed by hardware counters interface and are supported as part of query Q counters command extension. +---------------------------+-------------------------------------+ | Name | Description | |---------------------------+-------------------------------------| |resp_local_length_error | Number of times responder detected | | | local length errors | |---------------------------+-------------------------------------| |resp_cqe_error | Number of CQEs completed with error | | | at responder | |---------------------------+-------------------------------------| |req_cqe_error | Number of CQEs completed with error | | | at requester | |---------------------------+-------------------------------------| |req_remote_invalid_request | Number of times requester detected | | | remote invalid request error | |---------------------------+-------------------------------------| |req_remote_access_error | Number of times requester detected | | | remote access error | |---------------------------+-------------------------------------| |resp_remote_access_error | Number of times responder detected | | | remote access error | |---------------------------+-------------------------------------| |resp_cqe_flush_error | Number of CQEs completed with | | | flushed with error at responder | |---------------------------+-------------------------------------| |req_cqe_flush_error | Number of CQEs completed with | | | flushed with error at requester | +---------------------------+-------------------------------------+
Unified · Split
| @@ -3432,6 +3432,17 @@ static const struct mlx5_ib_counter cong_cnts[] = { · 3431 unmodified lines | ||
| 3432 | 3432 | INIT_CONG_COUNTER(np_cnp_sent), |
| 3433 | 3433 | }; |
| 3434 | 3434 | |
| 3435 | +static const struct mlx5_ib_counter extended_err_cnts[] = { | |
| 3436 | + INIT_Q_COUNTER(resp_local_length_error), | |
| 3437 | + INIT_Q_COUNTER(resp_cqe_error), | |
| 3438 | + INIT_Q_COUNTER(req_cqe_error), | |
| 3439 | + INIT_Q_COUNTER(req_remote_invalid_request), | |
| 3440 | + INIT_Q_COUNTER(req_remote_access_errors), | |
| 3441 | + INIT_Q_COUNTER(resp_remote_access_errors), | |
| 3442 | + INIT_Q_COUNTER(resp_cqe_flush_error), | |
| 3443 | + INIT_Q_COUNTER(req_cqe_flush_error), | |
| 3444 | +}; | |
| 3445 | + | |
| 3435 | 3446 | static void mlx5_ib_dealloc_counters(struct mlx5_ib_dev *dev) |
| 3436 | 3447 | { |
| 3437 | 3448 | unsigned int i; |
| @@ -3456,6 +3467,10 @@ static int __mlx5_ib_alloc_counters(struct mlx5_ib_dev *dev, · 18 unmodified lines | ||
| 3456 | 3467 | |
| 3457 | 3468 | if (MLX5_CAP_GEN(dev->mdev, retransmission_q_counters)) |
| 3458 | 3469 | num_counters += ARRAY_SIZE(retrans_q_cnts); |
| 3470 | + | |
| 3471 | + if (MLX5_CAP_GEN(dev->mdev, enhanced_error_q_counters)) | |
| 3472 | + num_counters += ARRAY_SIZE(extended_err_cnts); | |
| 3473 | + | |
| 3459 | 3474 | cnts->num_q_counters = num_counters; |
| 3460 | 3475 | |
| 3461 | 3476 | if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) { |
| @@ -3505,6 +3520,13 @@ static void mlx5_ib_fill_counters(struct mlx5_ib_dev *dev, · 43 unmodified lines | ||
| 3505 | 3520 | } |
| 3506 | 3521 | } |
| 3507 | 3522 | |
| 3523 | + if (MLX5_CAP_GEN(dev->mdev, enhanced_error_q_counters)) { | |
| 3524 | + for (i = 0; i < ARRAY_SIZE(extended_err_cnts); i++, j++) { | |
| 3525 | + names[j] = extended_err_cnts[i].name; | |
| 3526 | + offsets[j] = extended_err_cnts[i].offset; | |
| 3527 | + } | |
| 3528 | + } | |
| 3529 | + | |
| 3508 | 3530 | if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) { |
| 3509 | 3531 | for (i = 0; i < ARRAY_SIZE(cong_cnts); i++, j++) { |
| 3510 | 3532 | names[j] = cong_cnts[i].name; |
| @@ -858,7 +858,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { · 857 unmodified lines | ||
| 858 | 858 | u8 pcam_reg[0x1]; |
| 859 | 859 | u8 local_ca_ack_delay[0x5]; |
| 860 | 860 | u8 port_module_event[0x1]; |
| 861 | − u8 reserved_at_1b1[0x1]; | |
| 861 | + u8 enhanced_error_q_counters[0x1]; | |
| 862 | 862 | u8 ports_check[0x1]; |
| 863 | 863 | u8 reserved_at_1b3[0x1]; |
| 864 | 864 | u8 disable_link_up[0x1]; |
| @@ -3953,7 +3953,47 @@ struct mlx5_ifc_query_q_counter_out_bits { · 3088 unmodified lines | ||
| 3953 | 3953 | |
| 3954 | 3954 | u8 local_ack_timeout_err[0x20]; |
| 3955 | 3955 | |
| 3956 | − u8 reserved_at_320[0x4e0]; | |
| 3956 | + u8 reserved_at_320[0xa0]; | |
| 3957 | + | |
| 3958 | + u8 resp_local_length_error[0x20]; | |
| 3959 | + | |
| 3960 | + u8 req_local_length_error[0x20]; | |
| 3961 | + | |
| 3962 | + u8 resp_local_qp_error[0x20]; | |
| 3963 | + | |
| 3964 | + u8 local_operation_error[0x20]; | |
| 3965 | + | |
| 3966 | + u8 resp_local_protection[0x20]; | |
| 3967 | + | |
| 3968 | + u8 req_local_protection[0x20]; | |
| 3969 | + | |
| 3970 | + u8 resp_cqe_error[0x20]; | |
| 3971 | + | |
| 3972 | + u8 req_cqe_error[0x20]; | |
| 3973 | + | |
| 3974 | + u8 req_mw_binding[0x20]; | |
| 3975 | + | |
| 3976 | + u8 req_bad_response[0x20]; | |
| 3977 | + | |
| 3978 | + u8 req_remote_invalid_request[0x20]; | |
| 3979 | + | |
| 3980 | + u8 resp_remote_invalid_request[0x20]; | |
| 3981 | + | |
| 3982 | + u8 req_remote_access_errors[0x20]; | |
| 3983 | + | |
| 3984 | + u8 resp_remote_access_errors[0x20]; | |
| 3985 | + | |
| 3986 | + u8 req_remote_operation_errors[0x20]; | |
| 3987 | + | |
| 3988 | + u8 req_transport_retries_exceeded[0x20]; | |
| 3989 | + | |
| 3990 | + u8 cq_overflow[0x20]; | |
| 3991 | + | |
| 3992 | + u8 resp_cqe_flush_error[0x20]; | |
| 3993 | + | |
| 3994 | + u8 req_cqe_flush_error[0x20]; | |
| 3995 | + | |
| 3996 | + u8 reserved_at_620[0x1e0]; | |
| 3957 | 3997 | }; |
| 3958 | 3998 | |
| 3959 | 3999 | struct mlx5_ifc_query_q_counter_in_bits { |