RDMA/counter: Add "auto" configuration mode support
authorMark Zhang <markz@mellanox.com>
Tue, 2 Jul 2019 10:02:35 +0000 (13:02 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 5 Jul 2019 13:22:54 +0000 (10:22 -0300)
commit99fa331dc8629be55ac7a0cca0dc56492070ddac
treeab4e61964fb24e80fd79ed148fb211d0d91c4c41
parent413d3347503bc39e17577eaf16451fd492a68558
RDMA/counter: Add "auto" configuration mode support

In auto mode all QPs belong to one category are bind automatically to a
single counter set. Currently only "qp type" is supported.

In this mode the qp counter is set in RST2INIT modification, and when a qp
is destroyed the counter is unbound.

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>
drivers/infiniband/core/counters.c
drivers/infiniband/core/device.c
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h
include/rdma/rdma_counter.h