From 7ade1ff96c7aa7e10445688a433d7ae39a13c6c9 Mon Sep 17 00:00:00 2001 From: Mark Zhang Date: Tue, 2 Jul 2019 13:02:31 +0300 Subject: RDMA/restrack: Introduce statistic counter Introduce statistic counter as a new resource. It allows a user to monitor specific objects (e.g., QPs) by binding to a counter. In some cases a user counter resource is created with task other then "current", because its creation is done as part of rdmatool call. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- include/rdma/rdma_counter.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/rdma/rdma_counter.h (limited to 'include/rdma/rdma_counter.h') diff --git a/include/rdma/rdma_counter.h b/include/rdma/rdma_counter.h new file mode 100644 index 000000000000..283ac1a0cdb7 --- /dev/null +++ b/include/rdma/rdma_counter.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ +/* + * Copyright (c) 2019 Mellanox Technologies. All rights reserved. + */ + +#ifndef _RDMA_COUNTER_H_ +#define _RDMA_COUNTER_H_ + +#include +#include + +struct rdma_counter { + struct rdma_restrack_entry res; + struct ib_device *device; + uint32_t id; + u8 port; +}; +#endif /* _RDMA_COUNTER_H_ */ -- cgit v1.2.3-59-g8ed1b