xref: /linux/drivers/infiniband/sw/rxe/rxe_hw_counters.h (revision 8e1bb4a41aa78d6105e59186af3dcd545fc66e70)
1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /*
3  * Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved.
4  */
5 
6 #ifndef RXE_HW_COUNTERS_H
7 #define RXE_HW_COUNTERS_H
8 
9 /*
10  * when adding counters to enum also add
11  * them to rxe_counter_name[] vector.
12  */
13 enum rxe_counters {
14 	RXE_CNT_SENT_PKTS,
15 	RXE_CNT_RCVD_PKTS,
16 	RXE_CNT_DUP_REQ,
17 	RXE_CNT_OUT_OF_SEQ_REQ,
18 	RXE_CNT_RCV_RNR,
19 	RXE_CNT_SND_RNR,
20 	RXE_CNT_RCV_SEQ_ERR,
21 	RXE_CNT_SENDER_SCHED,
22 	RXE_CNT_RETRY_EXCEEDED,
23 	RXE_CNT_RNR_RETRY_EXCEEDED,
24 	RXE_CNT_COMP_RETRY,
25 	RXE_CNT_SEND_ERR,
26 	RXE_CNT_LINK_DOWNED,
27 	RXE_CNT_RDMA_SEND,
28 	RXE_CNT_RDMA_RECV,
29 	RXE_NUM_OF_COUNTERS
30 };
31 
32 struct rdma_hw_stats *rxe_ib_alloc_hw_port_stats(struct ib_device *ibdev,
33 						 u32 port_num);
34 int rxe_ib_get_hw_stats(struct ib_device *ibdev,
35 			struct rdma_hw_stats *stats,
36 			u32 port, int index);
37 #endif /* RXE_HW_COUNTERS_H */
38