RDMA/counter: Allow manual mode configuration support

In manual mode a QP is bound to a counter manually. If counter is not
specified then a new one will be allocated.

Manual mode is enabled when user binds a QP, and disabled when the last
manually bound QP is unbound.

When auto-mode is turned off and there are counters left, manual mode is
enabled so that the user is able to access these counters.

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>
This commit is contained in:
Mark Zhang
2019-07-02 13:02:43 +03:00
committed by Jason Gunthorpe
parent f34a55e497
commit 1bd8e0a9d0
3 changed files with 229 additions and 3 deletions

View File

@@ -536,6 +536,12 @@ enum rdma_nl_counter_mode {
*/
RDMA_COUNTER_MODE_AUTO,
/*
* Which qp are bound with which counter is explicitly specified
* by the user
*/
RDMA_COUNTER_MODE_MANUAL,
/*
* Always the end
*/