]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/rdma/rdma_counter.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
[linux.git] / include / rdma / rdma_counter.h
index bf2c3578768f1804586482df98d6c8977deb9b85..eb99856e8b30780577b645babd213aa5af4d762a 100644 (file)
@@ -9,10 +9,10 @@
 #include <linux/mutex.h>
 #include <linux/pid_namespace.h>
 
-#include <rdma/ib_verbs.h>
 #include <rdma/restrack.h>
 #include <rdma/rdma_netlink.h>
 
+struct ib_device;
 struct ib_qp;
 
 struct auto_mode_param {
@@ -28,6 +28,7 @@ struct rdma_counter_mode {
 struct rdma_port_counter {
        struct rdma_counter_mode mode;
        struct rdma_hw_stats *hstats;
+       unsigned int num_counters;
        struct mutex lock;
 };
 
@@ -51,5 +52,14 @@ 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);
+int rdma_counter_bind_qpn(struct ib_device *dev, u8 port,
+                         u32 qp_num, u32 counter_id);
+int rdma_counter_bind_qpn_alloc(struct ib_device *dev, u8 port,
+                               u32 qp_num, u32 *counter_id);
+int rdma_counter_unbind_qpn(struct ib_device *dev, u8 port,
+                           u32 qp_num, u32 counter_id);
+int rdma_counter_get_mode(struct ib_device *dev, u8 port,
+                         enum rdma_nl_counter_mode *mode,
+                         enum rdma_nl_counter_mask *mask);
 
 #endif /* _RDMA_COUNTER_H_ */