RDMA/core: Get sum value of all counters when perform a sysfs stat read
Since a QP can only be bound to one counter, then if it is bound to a separate counter, for backward compatibility purpose, the statistic value must be: * stat of default counter + stat of all running allocated counters + stat of all deallocated counters (history stats) Signed-off-by: Mark Zhang <markz@mellanox.com> Reviewed-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Jason Gunthorpe

vecāks
18d422ce8c
revīzija
f34a55e497
@@ -27,6 +27,7 @@ struct rdma_counter_mode {
|
||||
|
||||
struct rdma_port_counter {
|
||||
struct rdma_counter_mode mode;
|
||||
struct rdma_hw_stats *hstats;
|
||||
struct mutex lock;
|
||||
};
|
||||
|
||||
@@ -49,5 +50,6 @@ int rdma_counter_bind_qp_auto(struct ib_qp *qp, u8 port);
|
||||
int rdma_counter_unbind_qp(struct ib_qp *qp, bool force);
|
||||
|
||||
int rdma_counter_query_stats(struct rdma_counter *counter);
|
||||
u64 rdma_counter_get_hwstat_value(struct ib_device *dev, u8 port, u32 index);
|
||||
|
||||
#endif /* _RDMA_COUNTER_H_ */
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user