From b389327df90530d47931d0f5616b5cd6abb96c96 Mon Sep 17 00:00:00 2001 From: Mark Zhang Date: Tue, 2 Jul 2019 13:02:44 +0300 Subject: RDMA/nldev: Allow counter manual mode configration through RDMA netlink Provide an option to allow users to manually bind a qp with a counter through RDMA netlink. Limit it to users with ADMIN capability only. Signed-off-by: Mark Zhang Reviewed-by: Majd Dibbiny Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- include/rdma/rdma_counter.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/rdma/rdma_counter.h') diff --git a/include/rdma/rdma_counter.h b/include/rdma/rdma_counter.h index 6603e10eb352..68827700ba95 100644 --- a/include/rdma/rdma_counter.h +++ b/include/rdma/rdma_counter.h @@ -58,5 +58,8 @@ 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_ */ -- cgit v1.2.3